(Please keep all correspondence to the wss4j-dev list).
I think the bug you're running into is something I fixed recently: https://issues.apache.org/jira/browse/WSS-196 Can you try again using WSS4J 1.5.8-SNAPSHOT? http://people.apache.org/maven-snapshot-repository/org/apache/ws/securit y/wss4j/1.5.8-SNAPSHOT/ Colm. ________________________________ From: R1ch [mailto:[email protected]] Sent: 06 July 2009 14:36 To: Colm O hEigeartaigh Subject: Re: CXF Signed SAML Thanks for responding Colm. I found the problem. I'm actually on WSS4J 1.56, and I had checked out the trunk (bad habit) which the pom says is 1.6 snapshot. The keystore property in crypto.properties file has changed between these two version. 1.5.6 it is ---> org.apache.ws.security.crypto.merlin.file trunk it is ---> org.apache.ws.security.crypto.merlin.keystore.file I'm having another issue now. Here is the config I have so far .... saml.properties and crypto.properties are taken from the test cases in 1.5.6. <jaxws:endpoint id=" ... enpoint stuff ..... <jaxws:outInterceptors> <bean class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor"> <constructor-arg> <map> <entry key="action" value="SAMLTokenSigned"/> <entry key="signatureKeyIdentifier" value="DirectReference"/> <entry key="samlPropFile" value="saml.properties"/> </map> </constructor-arg> </bean> </jaxws:outInterceptors> </jaxws:endpoint> this is the exception Caused by: org.apache.ws.security.WSSecurityException: Signature creation failed; nested exception is: org.apache.xml.security.signature.XMLSignatureException: No message with ID "no WSDocInfo found" found in resource bundle "org/apache/xml/security/resource/xmlsecurity" Original Exception was org.apache.xml.security.signature.ReferenceNotInitializedException: No message with ID "no WSDocInfo found" found in resource bundle "org/apache/xml/security/resource/xmlsecurity" Original Exception was org.apache.xml.security.signature.ReferenceNotInitializedException: No message with ID "no WSDocInfo found" found in resource bundle "org/apache/xml/security/resource/xmlsecurity" Original Exception was org.apache.xml.security.signature.XMLSignatureException: No message with ID "no WSDocInfo found" found in resource bundle "org/apache/xml/security/resource/xmlsecurity" Original Exception was org.apache.xml.security.transforms.TransformationException: No message with ID "no WSDocInfo found" found in resource bundle "org/apache/xml/security/resource/xmlsecurity" Original Exception was org.apache.xml.security.c14n.CanonicalizationException: No message with ID "no WSDocInfo found" found in resource bundle "org/apache/xml/security/resource/xmlsecurity" at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSig natureSAML.java:620) at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML. java:152) at org.apache.ws.security.action.SAMLTokenSignedAction.execute(SAMLTokenSig nedAction.java:99) ... 32 more On Fri, Jul 3, 2009 at 5:52 AM, Colm O hEigeartaigh <[email protected]> wrote: Can you attach the configuration you're using? If possible, can you provide a test-case? Colm. ________________________________ From: R D [mailto:[email protected]] Sent: 01 July 2009 19:57 To: [email protected] Subject: CXF Signed SAML Hello All, I'm using CXF 2.2, WSS4J 1.57. I have configured a WSS4JOutInterceptor in the cxf-context.xml for a service which should return a saml assertion in the soap header. When I configure the interceptor to send an Unsigned SAML token, everything works fine. When I configure it to send a Singed SAML token, im getting the following error. Caused by: org.apache.ws.security.WSSecurityException: Error when signing the SAML token: ; nested exception is: org.apache.ws.security.WSSecurityException: General security error (No certificates were found for SAML signature) at org.apache.ws.security.action.SAMLTokenSignedAction.execute(SAMLTokenSig nedAction.java:109) at org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:2 01) at org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.access$200(WSS4JOut Interceptor.java:47) at org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptor Internal.handleMessage(WSS4JOutInterceptor.java:221) ... 29 more I'm using my own certificate with a saml.properties and crypto.properties file. I thougth it was the certificate so, I have checked out wss4j from svn and replaced my certificate for one of the test and it worked, so i think my certificate is good. I have web application and the service (with the properties file, cert) are in a jar in the WEB-INF\lib directory. I tried copying the certificate in \lib in \classes and in the webapp root folder, but i still get the same errror. Anyone have any ideas of how to solve this? Thanks
