ericacm
15 years agoOccasional Contributor
Cannot create outgoing WSS signature
Hi all:
I have created a simple keystore using:
keytool -genkey -dname "cn=Mark Jones, ou=JavaSoft, o=Sun, c=US" -alias genkey -keystore gen.keystore -storepass genkey -keypass genkey
I have added the keystore to SoapUI and it says the keystore status is OK. On the keystore I set the default alias and alias password to genkey (I have also tried no alias/password).
Next I go to Outgoing WS-Security configurations, add a configuration and add a Signature to that configuration. When I choose the Keystore that I added previously it dumps an error to stdout and no aliases are available to choose from. Also if I send a request with this configuration no signature is added to the request.
Error message from stdout:
org.apache.ws.security.components.crypto.CredentialException: Failed to load credentials.
at org.apache.ws.security.components.crypto.AbstractCrypto.load(AbstractCrypto.java:174)
at com.eviware.soapui.impl.wsdl.support.wss.crypto.KeyMaterialWssCrypto$KeyMaterialCrypto.load(KeyMaterialWssCrypto.java:241)
at org.apache.ws.security.components.crypto.AbstractCrypto.(AbstractCrypto.java:135)
at org.apache.ws.security.components.crypto.AbstractCrypto.(AbstractCrypto.java:52)
at org.apache.ws.security.components.crypto.Merlin.(Merlin.java:66)
at com.eviware.soapui.impl.wsdl.support.wss.crypto.KeyMaterialWssCrypto$KeyMaterialCrypto.(KeyMaterialWssCrypto.java:222)
at com.eviware.soapui.impl.wsdl.support.wss.crypto.KeyMaterialWssCrypto$KeyMaterialCrypto.(KeyMaterialWssCrypto.java:218)
at com.eviware.soapui.impl.wsdl.support.wss.crypto.KeyMaterialWssCrypto.getCrypto(KeyMaterialWssCrypto.java:81)
at com.eviware.soapui.impl.wsdl.support.wss.entries.WssEntryBase$KeyAliasComboBoxModel.update(WssEntryBase.java:267)
at com.eviware.soapui.impl.wsdl.support.wss.entries.AddSignatureEntry$1.itemStateChanged(AddSignatureEntry.java:81)
...
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.io.IOException: Keystore was tampered with, or password was incorrect
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:771)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:38)
at java.security.KeyStore.load(KeyStore.java:1185)
at org.apache.ws.security.components.crypto.AbstractCrypto.load(AbstractCrypto.java:168)
... 64 more
Caused by: java.security.UnrecoverableKeyException: Password verification failed
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:769)
... 67 more
SoapUI 3.5.1 2010/04/09
Mac OSX 10.5.8
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-9M3125)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)
Thanks!
I have created a simple keystore using:
keytool -genkey -dname "cn=Mark Jones, ou=JavaSoft, o=Sun, c=US" -alias genkey -keystore gen.keystore -storepass genkey -keypass genkey
I have added the keystore to SoapUI and it says the keystore status is OK. On the keystore I set the default alias and alias password to genkey (I have also tried no alias/password).
Next I go to Outgoing WS-Security configurations, add a configuration and add a Signature to that configuration. When I choose the Keystore that I added previously it dumps an error to stdout and no aliases are available to choose from. Also if I send a request with this configuration no signature is added to the request.
Error message from stdout:
org.apache.ws.security.components.crypto.CredentialException: Failed to load credentials.
at org.apache.ws.security.components.crypto.AbstractCrypto.load(AbstractCrypto.java:174)
at com.eviware.soapui.impl.wsdl.support.wss.crypto.KeyMaterialWssCrypto$KeyMaterialCrypto.load(KeyMaterialWssCrypto.java:241)
at org.apache.ws.security.components.crypto.AbstractCrypto.
at org.apache.ws.security.components.crypto.AbstractCrypto.
at org.apache.ws.security.components.crypto.Merlin.
at com.eviware.soapui.impl.wsdl.support.wss.crypto.KeyMaterialWssCrypto$KeyMaterialCrypto.
at com.eviware.soapui.impl.wsdl.support.wss.crypto.KeyMaterialWssCrypto$KeyMaterialCrypto.
at com.eviware.soapui.impl.wsdl.support.wss.crypto.KeyMaterialWssCrypto.getCrypto(KeyMaterialWssCrypto.java:81)
at com.eviware.soapui.impl.wsdl.support.wss.entries.WssEntryBase$KeyAliasComboBoxModel.update(WssEntryBase.java:267)
at com.eviware.soapui.impl.wsdl.support.wss.entries.AddSignatureEntry$1.itemStateChanged(AddSignatureEntry.java:81)
...
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.io.IOException: Keystore was tampered with, or password was incorrect
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:771)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:38)
at java.security.KeyStore.load(KeyStore.java:1185)
at org.apache.ws.security.components.crypto.AbstractCrypto.load(AbstractCrypto.java:168)
... 64 more
Caused by: java.security.UnrecoverableKeyException: Password verification failed
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:769)
... 67 more
SoapUI 3.5.1 2010/04/09
Mac OSX 10.5.8
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-9M3125)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)
Thanks!