You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by Miguel A Paraz <mp...@gmail.com> on 2007/02/13 04:57:43 UTC

WS-Security with symmetric key only

Hi,
I originally posted this to the XFire mailing list since I am using
that. I was advised to post here.

I started going through the wss4j code, and I see that the part that
opens the KeyStore (Merlin) works with certificates.

Is working with a SecretKey stored in the KeyStore supported?

---------- Forwarded message ----------
From: Miguel A Paraz <mp...@gmail.com>
Date: Feb 12, 2007 8:39 PM
Subject: WS-Security with symmetric key only
To: user@xfire.codehaus.org


Hi,
I would like to create WS-Security messages with a symmetric key
(SecretKey) only, without public key/private key/certificate.

I'm working with a service which precomputes and serializes the DESede
SecretKey, and manually constructs the SOAP XML document. So in my
attempt to connect to it using XFire, I do a -gensecretkey with a
JCEKS Keystore and try to use it.

I guess it's not supported? Thanks for any advice.


Exception in thread "main" org.codehaus.xfire.XFireRuntimeException:
Could not invoke service.. Nested exception is
org.codehaus.xfire.fault.XFireFault: WSHandler: Encryption: error
during message processingorg.apache.ws.security.WSSecurityException:
General security error (Unexpected number of X509Data: for Encryption)
org.codehaus.xfire.fault.XFireFault: WSHandler: Encryption: error
during message processingorg.apache.ws.security.WSSecurityException:
General security error (Unexpected number of X509Data: for Encryption)
        at org.codehaus.xfire.security.wss4j.WSS4JOutHandler.invoke(WSS4JOutHandler.java:176)
        at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)
        at org.codehaus.xfire.client.Client.invoke(Client.java:335)
        at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
        at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
        at $Proxy0.add(Unknown Source)
        at com.paraz.xfireuser.Main.main(Main.java:91)
Caused by: org.apache.ws.security.WSSecurityException: WSHandler:
Encryption: error during message
processingorg.apache.ws.security.WSSecurityException: General security
error (Unexpected number of X509Data: for Encryption)
        at org.apache.ws.security.action.EncryptionAction.execute(EncryptionAction.java:64)
        at org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:191)
        at org.codehaus.xfire.security.wss4j.WSS4JOutHandler.invoke(WSS4JOutHandler.java:154)
        ... 7 more

---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org