Providing the Security Data and Code

The example configurations in Defining the Axis2 Security Configuration specify an encryption property file and password call back routine, which would be used in the process of encrypting your web service data.

The value of signaturePropFile specifies the name of the signature crypto property file to use. This file contains the properties used for signing and encrypting the SOAP message. An example server crypto property file is shown below in Providing the Security Data and Code. When using a Rampart policy file, as shown in Defining the Axis2 Security Configuration, these property files are not used as the policy itself contains the equivalent settings.

Figure 1. Example Rampart server-crypto.properties File
org.apache.ws.security.crypto.provider=
org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=password
org.apache.ws.security.crypto.merlin.file=server.keystore

The client-crypto.properties file would have similar properties as above, but with client-specific values:

org.apache.ws.security.crypto.provider=
org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=password
org.apache.ws.security.crypto.merlin.file=client.keystore

The creation of the keystore file and the related properties are discussed in Keystore File Creation.

When configuring a secure web service the server signature property file and keystore file (server-crypto.properties and server.keystore) must be placed in the %SERVER_DIR%/project/config/wss/ directory so that the build will package them and they will be available on the classpath at execution time.

The password callback handlers specified in the passwordCallbackClass parameter entities are illustrated in Modeling Secure Web Services and Client Side Configuration.