Hello
I have a problem with WSS4j. The elements I want to configure are: Signature and Encryption. According to documentations and examples I've found in the internet I created client-deploy.wsdd configure file for my client and server-config.wsdd file that describes web service access rules.
Here are the most important parts of the files:
client-deploy.wsdd
(...)
<requestFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="Signature Encrypt"/>
<parameter name="passwordCallbackClass" value="MyPWCallback"/>
<parameter name="user" value="me"/>
<parameter name="signatureKeyIdentifier" value="DirectReference" />
<parameter name="signaturePropFile" value="crypto.properties" />
<parameter name="encryptionUser" value="serwer"/>
</handler>
</requestFlow>
(...)
server-config.wsdd
(...)
<requestFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
<parameter name="passwordCallbackClass" value="MyPWCallback"/>
<parameter name="action" value="Signature Encrypt"/>
<parameter name="signaturePropFile" value="crypto.properties" />
</handler>
</requestFlow>
(...)
And crypto.properties files for the client and serwer:
client:
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=changeit
org.apache.ws.security.crypto.merlin.keystore.alias=me
org.apache.ws.security.crypto.merlin.file=C://client//.keystore
serwer:
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=changeit
org.apache.ws.security.crypto.merlin.keystore.alias=serwer
org.apache.ws.security.crypto.merlin.file=C://serwer//.keystore
In client/.keystore I have keyEntry with alias "me" and trustCertEntry with alias "serwer", in serwer/,keystore I have keyEntry with alias "serwer" and trustCertEntry with alias "me".
But I does not work. I get a lot of errors, they vary depending on changes I am making in the cofinguring files. What am I doing wrong? I don;t know much about the whole certificate system, I suspect this is the reason of my collapse. I assume that keyEntry is a public and private key in one and trustCertEntry is a public key that I can verify signatures, am I right?
Help! I need to have it working on monday and I got stucked
ania