ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giriraj Bhojak <girira...@gmail.com>
Subject Supplying password for private key via keystore properties file not working
Date Wed, 07 May 2014 20:10:28 GMT
Here is my wss4j keystore properties file:

org.apache.ws.security.crypto.merlin.keystore.file=Key.jks
org.apache.ws.security.crypto.merlin.keystore.password=pass!32
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.alias=aliasOne
org.apache.ws.security.crypto.merlin.keystore.private.password=password

I get following error:

    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.apache.ws.security.WSSecurityException: WSHandler: *application
provided null or empty password*
    at
org.apache.ws.security.handler.WSHandler.getPasswordCB(WSHandler.java:1048)
    at
org.apache.ws.security.action.SignatureAction.execute(SignatureAction.java:43)

I am using wss4j 1.6.13 and CXF 2.7.8.

If I supply a password callback handler: <entry key="passwordCallbackRef"
value-ref="cryptoProperties" />, then it works properly while unit testing.

But I am running into class cast exceptions when I use the callback handler
in the deployed app:
Caused by: java.lang.ClassCastException:
org.apache.ws.security.WSPasswordCallback incompatible with
org.apache.ws.security.WSPasswordCallback


Hence I am trying to set
'org.apache.ws.security.crypto.merlin.keystore.private.password' to actual
password.

I see  String password = getPassword(requestData.getMsgContext()); in
org.apache.ws.security.handler.WSHandler.getPasswordCB(String, int,
CallbackHandler, RequestData). But *getPassword *returns null.
I don't know how to set password in the *requestData.getMsgContext().*

Can someone please help me figure out what's wrong here?

Thanks,
Giriraj.

Mime
View raw message