choongjoey
13 years agoOccasional Visitor
Signature Algorithm Causing Exceptions?
Hi all,
I'm facing an issue with using SOAPUI to generate a SOAP request with SAMLv2 and message signing and encryption.
I've created my keystores and is able to generate requests properly, however once i change my signature algorithm to http://www.w3.org/2000/09/xmldsig#hmac-sha1
I am getting the following exception
Fri Aug 24 18:21:05 SGT 2012:ERROR:org.apache.ws.security.WSSecurityException: Signature creation failed
org.apache.ws.security.WSSecurityException: Signature creation failed
at org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:558)
at org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:478)
at org.apache.ws.security.message.WSSecSignature.build(WSSecSignature.java:384)
at com.eviware.soapui.impl.wsdl.support.wss.entries.SignatureEntry.process(SignatureEntry.java:194)
at com.eviware.soapui.impl.wsdl.support.wss.OutgoingWss.processOutgoing(OutgoingWss.java:192)
at com.eviware.soapui.impl.wsdl.submit.filters.WssRequestFilter.filterWsdlRequest(WssRequestFilter.java:58)
at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.filterAbstractHttpRequest(AbstractRequestFilter.java:37)
at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.filterRequest(AbstractRequestFilter.java:31)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:184)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: javax.xml.crypto.dsig.XMLSignatureException: java.security.InvalidKeyException: key must be SecretKey
at org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:401)
at org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:553)
... 15 more
Caused by: java.security.InvalidKeyException: key must be SecretKey
at org.apache.jcp.xml.dsig.internal.dom.DOMHMACSignatureMethod.sign(DOMHMACSignatureMethod.java:177)
at org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:397)
... 16 more
Any ideas?
I'm facing an issue with using SOAPUI to generate a SOAP request with SAMLv2 and message signing and encryption.
I've created my keystores and is able to generate requests properly, however once i change my signature algorithm to http://www.w3.org/2000/09/xmldsig#hmac-sha1
I am getting the following exception
Fri Aug 24 18:21:05 SGT 2012:ERROR:org.apache.ws.security.WSSecurityException: Signature creation failed
org.apache.ws.security.WSSecurityException: Signature creation failed
at org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:558)
at org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:478)
at org.apache.ws.security.message.WSSecSignature.build(WSSecSignature.java:384)
at com.eviware.soapui.impl.wsdl.support.wss.entries.SignatureEntry.process(SignatureEntry.java:194)
at com.eviware.soapui.impl.wsdl.support.wss.OutgoingWss.processOutgoing(OutgoingWss.java:192)
at com.eviware.soapui.impl.wsdl.submit.filters.WssRequestFilter.filterWsdlRequest(WssRequestFilter.java:58)
at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.filterAbstractHttpRequest(AbstractRequestFilter.java:37)
at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.filterRequest(AbstractRequestFilter.java:31)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:184)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: javax.xml.crypto.dsig.XMLSignatureException: java.security.InvalidKeyException: key must be SecretKey
at org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:401)
at org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:553)
... 15 more
Caused by: java.security.InvalidKeyException: key must be SecretKey
at org.apache.jcp.xml.dsig.internal.dom.DOMHMACSignatureMethod.sign(DOMHMACSignatureMethod.java:177)
at org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:397)
... 16 more
Any ideas?