wso2 - Signing and Encrypting a SOAP message using Apache Rampart -
i want encrypt soap message public key of server , sign same message private key of client. ideally keys signing , encryption different.
was referring apache rampart examples wso2 team. 1 such sample rampart configuration given is:
rampartconfig rampartconfig = new rampartconfig(); properties merlinprop = new properties(); merlinprop.put("org.apache.ws.security.crypto.merlin.keystore.type", "jks"); merlinprop.put("org.apache.ws.security.crypto.merlin.file","c:/documents , settings/abdul.mujeeb/workspace/axis2clients/src/certs/oasis.jks"); merlinprop.put("org.apache.ws.security.crypto.merlin.keystore.password", "password"); cryptoconfig sigcryptoconfig = new cryptoconfig(); sigcryptoconfig.setprovider("org.apache.ws.security.components.crypto.merlin"); sigcryptoconfig.setprop(merlinprop); cryptoconfig encrcryptoconfig = new cryptoconfig(); encrcryptoconfig.setprovider("org.apache.ws.security.components.crypto.merlin"); encrcryptoconfig.setprop(merlinprop); rampartconfig.setusercertalias("alice"); rampartconfig.setencryptionuser("bob1"); rampartconfig.setsigcryptoconfig(sigcryptoconfig); rampartconfig.setencrcryptoconfig(encrcryptoconfig); rampartconfig.setpwcbclass("com.rolta.axis2.client.usernamecallbackhandler");
the example no specifies server public key used encrypt message.
a few questions above example:
1) rampartconfig.setencryptionuser() function stands ? how encrypt soap message using public key of server ?
2) rampartconfig.setusercertalias() function ? signing ? encrypting or both ?
thanks.
what have provided how programmatically set rampart config. set methods here equivalent parameters in rampart configuration. these parameters listed @ rampart config guide.
a more useful explanation of 2 properties can found in this blog post. in short,
encryptionuser
- alias public key used encrypting message. public key certificate available in keystore under alias.
usercertalias
- alias used retrieve password of corresponding private key callbackhandler signing.
Comments
Post a Comment