These samples use parameter based configuration model. This will be a great starting point to get a basic understanding of how WS Security really works.
These samples use WS Security Policy Language for configuration. It is recommended to use policy based configuration model for all production scenarios
Before beginning, please install Rampart as described here.
Now we'll look at how to run the first sample inside samples/policy folder.
- Open a console and change the directory to sample/policy and give the following command. This will start the server at port 8080
- Open a new console and change the directory to sample/policy and type the following command.
Congratulations! Now you have executed the first sample. Rest of the samples can be run by changing the sample number.
UsernameToken Authentication, The policy uses a TransportBinding and requires a SignedSupportingToken which
is a UsernameToken and the inclusion of a TimeStamp.
Sign only, An AsymmetricBinding is used. Entire headers and body to be signed.
Algorithm suite is TripleDesRsa15.
Sign and Encrypt messages, An AsymmetricBinding is used. Entire headers and body to be signed.
EncryptionParts specifies the Body to be encrypted.
SecureConversation , The secure session is bootstrapped using a SymetricBinding which uses derived keys based on an ephemeral key.
Messages in the secure conversation includes a timestamp, all headers are signed along with the timestamp, signature encrypted and body encrypted.
WS-Trust - RST - Resquest Security Token Service - Issuing a SAML token - issuing a token
WS-Trust ( With WS Metada Exchange) - RST - Resquest Security Token Service - Issuing a SAML token