WS Security
WS-S-2 Symmetric Encryption
Secure SOAP Client using Symmetric Encryption (3DES)
Example
This section describes how to make secure web services call, using a symmetric key encryption. The algorithm used for these examples is tripple-des.
- Both server and client have a shared secret, which is used to encryt and decrypt the SOAP message.
- In practice the key is transfered by some secure way between client and server, as if it's captured the all traffic between server and client can be compromised.
- Virtuoso keeps keys internally and can be instantiated with xenc_key_instance_create ().
- In this example we are using a key 'WSDK Sample Symmetric Key', imported from WSDK.NET SymmetricEncryption example. This is to have the same key in all places: .NET server and client, Virtuoso server and client.
- Another posibillity is to generate the key on Virtuoso side with xenc_key_3DES_rand_create() and export to the .NET client and server configuration. To export the 3DES key can be used xenc_key_serialize () function.
The Virtuoso VSP based clients demonstrate
- accessing Virtuoso Web Service with Virtuoso client
- accessing .NET Web service with Virtuoso client
To run .NET client against Virtuoso service you need:
- This example works with MS WSDK; MS WSE 2.0 obsolete the data encryption directly a key data.
- to change <virtuoso:port> to host and port where your virtuoso HTTP server is listening.
- compile the example issuing nmake command in the tutorial/services/ws_s_2 directory.
- if you going to compile the client on an other box, make sure that .config file is in the same directory where is .exe file.
| View the source | Action |
|---|---|
| 1. SymClient.cs | |
| 2. symmeric_encryption_client.vsp | Run |
| 3. virt_symmeric_encryption_client.vsp | Run |
OpenLink Home
Technical Support