[ https://issues.apache.org/jira/browse/WSS-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770473#action_12770473 ]
Colm O hEigeartaigh commented on WSS-213: ----------------------------------------- You need to change three things: 1) Change the saml issuer key name in saml.properties to be "fooprod". 2) Change the password that's set by the callback handler in TestWSSecurityNewST2 from "security" to "password". 3) Change the keystore filename property in crypto.properties to "org.apache.ws.security.crypto.merlin.file" from "org.apache.ws.security.crypto.merlin.keystore.file". Colm. > Running TestWSSecurityNewST2 Fails - General security error (No certificates > were found for SAML signature) > ----------------------------------------------------------------------------------------------------------- > > Key: WSS-213 > URL: https://issues.apache.org/jira/browse/WSS-213 > Project: WSS4J > Issue Type: Bug > Affects Versions: 1.5.8 > Environment: OS = Ubuntu 9.04 > Eclipse = JEE Eclipse, Galileo, STS, m2eclipse > JDK = java-6-sun-1.6.0.16, java-1.5.0-sun-1.5.0.19 (attempted as well) > Reporter: Jay Blanton > Assignee: Ruchith Udayanga Fernando > Priority: Critical > Attachments: wss4j.saml-jks.tar.gz, wss4j.saml.tar.gz > > > I pulled down the 1.5.8, 1.5.8-SNAPSHOT, and pulled down the trunk for 1.6. > I tried to build the trunk by doing a mvn package -Dmaven.test.skip=true > (because quite a few unit tests fail). > Then I try to run TestWSSecurityNewST2 and it fails. > This is the exact issue I am having when trying to get my Spring Web Service > Implementation to work with WSS4J's SAML Support (which it appears that > Spring does not expose so I have to create a custom Interceptor). > I have working examples of a digital signature, encryption, and UsernameToken > with Spring Web Services support for SAML, but the SAML is not working. So I > specifically went to the WSS4J examples to see if I could get those working > first, and then working with my keystores, but the default test does not work > for me that shipped with WSS4J. > [INFO] Scanning for projects... > [INFO] > ------------------------------------------------------------------------ > [INFO] Building Ping Web Service Client > [INFO] > [INFO] Id: com.foo:ping.ws-saml:jar:0.0.1-SNAPSHOT > [INFO] task-segment: [package] > [INFO] > ------------------------------------------------------------------------ > [INFO] [resources:resources] > [INFO] Using default encoding to copy filtered resources. > url = http://repo1.maven.org/maven2 > Downloading: > http://repo1.maven.org/maven2/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pom > url = http://static.appfuse.org/repository > Downloading: > http://static.appfuse.org/repository/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pom > url = http://repository.jboss.com/maven2 > Downloading: > http://repository.jboss.com/maven2/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pom > [INFO] [compiler:compile] > [INFO] Compiling 10 source files to > /home/a068071/Public/Development/eclipse3.5-workspace/ping.ws-saml/target/classes > url = http://repo1.maven.org/maven2 > Downloading: > http://repo1.maven.org/maven2/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pom > url = http://static.appfuse.org/repository > Downloading: > http://static.appfuse.org/repository/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pom > url = http://repository.jboss.com/maven2 > Downloading: > http://repository.jboss.com/maven2/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pom > [INFO] [jibx:bind] > [INFO] Not running JiBX binding compiler (single-module mode) - no binding > files > [INFO] [resources:testResources] > [INFO] Using default encoding to copy filtered resources. > url = http://repo1.maven.org/maven2 > Downloading: > http://repo1.maven.org/maven2/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pom > url = http://static.appfuse.org/repository > Downloading: > http://static.appfuse.org/repository/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pom > url = http://repository.jboss.com/maven2 > Downloading: > http://repository.jboss.com/maven2/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pom > [INFO] [compiler:testCompile] > [INFO] Compiling 4 source files to > /home/a068071/Public/Development/eclipse3.5-workspace/ping.ws-saml/target/test-classes > url = http://repo1.maven.org/maven2 > Downloading: > http://repo1.maven.org/maven2/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pom > url = http://static.appfuse.org/repository > Downloading: > http://static.appfuse.org/repository/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pom > url = http://repository.jboss.com/maven2 > Downloading: > http://repository.jboss.com/maven2/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pom > [INFO] [surefire:test] > [INFO] Surefire report directory: > /home/a068071/Public/Development/eclipse3.5-workspace/ping.ws-saml/target/surefire-reports > DEBUG [security.util.Loader] Trying to find [crypto.properties] using > sun.misc.launcher$appclassloa...@133056f class loader. > DEBUG [components.crypto.CryptoFactory] Using Crypto Engine > [org.apache.ws.security.components.crypto.Merlin] > DEBUG [components.crypto.AbstractCrypto] CA certs have been loaded > DEBUG [security.util.Loader] Trying to find [crypto.properties] using > sun.misc.launcher$appclassloa...@133056f class loader. > DEBUG [components.crypto.CryptoFactory] Using Crypto Engine > [org.apache.ws.security.components.crypto.Merlin] > DEBUG [components.crypto.AbstractCrypto] CA certs have been loaded > DEBUG [security.util.Loader] Trying to find [crypto.properties] using > sun.misc.launcher$appclassloa...@133056f class loader. > DEBUG [components.crypto.CryptoFactory] Using Crypto Engine > [org.apache.ws.security.components.crypto.Merlin] > DEBUG [components.crypto.AbstractCrypto] CA certs have been loaded > DEBUG [security.util.Loader] Trying to find [crypto.properties] using > sun.misc.launcher$appclassloa...@133056f class loader. > DEBUG [components.crypto.CryptoFactory] Using Crypto Engine > [org.apache.ws.security.components.crypto.Merlin] > DEBUG [components.crypto.AbstractCrypto] CA certs have been loaded > ------------------------------------------------------- > T E S T S > ------------------------------------------------------- > Running wssec.TestWSSecurityNewST2 > DEBUG [security.util.Loader] Trying to find [saml.properties] using > sun.misc.launcher$appclassloa...@133056f class loader. > INFO [security.saml.SAMLIssuerFactory] Using Crypto Engine > [org.apache.ws.security.saml.SAMLIssuerImpl] > DEBUG [security.util.Loader] Trying to find [crypto.properties] using > sun.misc.launcher$appclassloa...@133056f class loader. > DEBUG [components.crypto.CryptoFactory] Using Crypto Engine > [org.apache.ws.security.components.crypto.Merlin] > DEBUG [components.crypto.AbstractCrypto] CA certs have been loaded > DEBUG [security.saml.SAMLIssuerImpl] Begin add SAMLAssertion token... > INFO [wssec.TestWSSecurityNewST2] Before SAMLSignedSenderVouches.... > DEBUG [security.saml.WSSecSignatureSAML] Beginning ST signing... > DEBUG [security.util.Loader] Trying to find [saml.properties] using > sun.misc.launcher$appclassloa...@133056f class loader. > INFO [security.saml.SAMLIssuerFactory] Using Crypto Engine > [org.apache.ws.security.saml.SAMLIssuerImpl] > DEBUG [security.util.Loader] Trying to find [crypto.properties] using > sun.misc.launcher$appclassloa...@133056f class loader. > DEBUG [components.crypto.CryptoFactory] Using Crypto Engine > [org.apache.ws.security.components.crypto.Merlin] > DEBUG [components.crypto.AbstractCrypto] CA certs have been loaded > DEBUG [security.saml.SAMLIssuerImpl] Begin add SAMLAssertion token... > INFO [wssec.TestWSSecurityNewST2] Before SAMLSignedSenderVouches.... > DEBUG [security.saml.WSSecSignatureSAML] Beginning ST signing... > DEBUG [security.util.Loader] Trying to find [saml3.properties] using > sun.misc.launcher$appclassloa...@133056f class loader. > INFO [security.saml.SAMLIssuerFactory] Using Crypto Engine > [org.apache.ws.security.saml.SAMLIssuerImpl] > DEBUG [security.util.Loader] Trying to find [crypto.properties] using > sun.misc.launcher$appclassloa...@133056f class loader. > DEBUG [components.crypto.CryptoFactory] Using Crypto Engine > [org.apache.ws.security.components.crypto.Merlin] > DEBUG [components.crypto.AbstractCrypto] CA certs have been loaded > DEBUG [security.saml.SAMLIssuerImpl] Begin add SAMLAssertion token... > INFO [wssec.TestWSSecurityNewST2] Before SAMLSignedSenderVouches.... > DEBUG [security.saml.WSSecSignatureSAML] Beginning ST signing... > DEBUG [security.util.Loader] Trying to find [saml.properties] using > sun.misc.launcher$appclassloa...@133056f class loader. > INFO [security.saml.SAMLIssuerFactory] Using Crypto Engine > [org.apache.ws.security.saml.SAMLIssuerImpl] > DEBUG [security.util.Loader] Trying to find [crypto.properties] using > sun.misc.launcher$appclassloa...@133056f class loader. > DEBUG [components.crypto.CryptoFactory] Using Crypto Engine > [org.apache.ws.security.components.crypto.Merlin] > DEBUG [components.crypto.AbstractCrypto] CA certs have been loaded > DEBUG [security.saml.SAMLIssuerImpl] Begin add SAMLAssertion token... > DEBUG [security.saml.WSSecSignatureSAML] Beginning ST signing... > Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 0.222 sec <<< > FAILURE! > Results : > Tests in error: > testSAMLSignedSenderVouches(wssec.TestWSSecurityNewST2) > testSAMLSignedSenderVouchesKeyIdentifier(wssec.TestWSSecurityNewST2) > testDefaultIssuerClass(wssec.TestWSSecurityNewST2) > testWSS62(wssec.TestWSSecurityNewST2) > Tests run: 5, Failures: 0, Errors: 5, Skipped: 0 > [ERROR] > Mojo: > org.apache.maven.plugins:maven-surefire-plugin:2.4.2:test > FAILED for project: > com.foo:ping.ws-saml:jar:0.0.1-SNAPSHOT > Reason: > There are test failures. > Please refer to > /home/jay/Public/Development/eclipse3.5-workspace/ping.ws-saml/target/surefire-reports > for the individual test results. > [INFO] > ------------------------------------------------------------------------ > [INFO] For more information, run with the -e flag > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD FAILED > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 16 seconds > [INFO] Finished at: Wed Oct 07 13:29:03 PDT 2009 > [INFO] Final Memory: 4M/25M > [INFO] > ------------------------------------------------------------------------ > Here is the errors from the test report: > ------------------------------------------------------------------------------- > Test set: wssec.TestWSSecurityNewST2 > ------------------------------------------------------------------------------- > Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 0.731 sec <<< > FAILURE! > testSAMLSignedSenderVouches(wssec.TestWSSecurityNewST2) Time elapsed: 0.486 > sec <<< ERROR! > org.apache.ws.security.WSSecurityException: General security error (No > certificates were found for SAML signature) > at > org.apache.ws.security.saml.WSSecSignatureSAML.prepare(WSSecSignatureSAML.java:276) > at > org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:110) > at > wssec.TestWSSecurityNewST2.testSAMLSignedSenderVouches(TestWSSecurityNewST2.java:114) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at junit.framework.TestCase.runTest(TestCase.java:168) > at junit.framework.TestCase.runBare(TestCase.java:134) > at junit.framework.TestResult$1.protect(TestResult.java:110) > at junit.framework.TestResult.runProtected(TestResult.java:128) > at junit.framework.TestResult.run(TestResult.java:113) > at junit.framework.TestCase.run(TestCase.java:124) > at junit.framework.TestSuite.runTest(TestSuite.java:232) > at junit.framework.TestSuite.run(TestSuite.java:227) > at > org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81) > at > org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) > at > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) > at > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) > at org.apache.maven.surefire.Surefire.run(Surefire.java:177) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338) > at > org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997) > testSAMLSignedSenderVouchesKeyIdentifier(wssec.TestWSSecurityNewST2) Time > elapsed: 0.064 sec <<< ERROR! > org.apache.ws.security.WSSecurityException: General security error (No > certificates were found for SAML signature) > at > org.apache.ws.security.saml.WSSecSignatureSAML.prepare(WSSecSignatureSAML.java:276) > at > org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:110) > at > wssec.TestWSSecurityNewST2.testSAMLSignedSenderVouchesKeyIdentifier(TestWSSecurityNewST2.java:156) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at junit.framework.TestCase.runTest(TestCase.java:168) > at junit.framework.TestCase.runBare(TestCase.java:134) > at junit.framework.TestResult$1.protect(TestResult.java:110) > at junit.framework.TestResult.runProtected(TestResult.java:128) > at junit.framework.TestResult.run(TestResult.java:113) > at junit.framework.TestCase.run(TestCase.java:124) > at junit.framework.TestSuite.runTest(TestSuite.java:232) > at junit.framework.TestSuite.run(TestSuite.java:227) > at > org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81) > at > org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) > at > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) > at > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) > at org.apache.maven.surefire.Surefire.run(Surefire.java:177) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338) > at > org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997) > testDefaultIssuerClass(wssec.TestWSSecurityNewST2) Time elapsed: 0.156 sec > <<< ERROR! > org.apache.ws.security.WSSecurityException: General security error (No > certificates were found for SAML signature) > at > org.apache.ws.security.saml.WSSecSignatureSAML.prepare(WSSecSignatureSAML.java:276) > at > org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:110) > at > wssec.TestWSSecurityNewST2.testDefaultIssuerClass(TestWSSecurityNewST2.java:200) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at junit.framework.TestCase.runTest(TestCase.java:168) > at junit.framework.TestCase.runBare(TestCase.java:134) > at junit.framework.TestResult$1.protect(TestResult.java:110) > at junit.framework.TestResult.runProtected(TestResult.java:128) > at junit.framework.TestResult.run(TestResult.java:113) > at junit.framework.TestCase.run(TestCase.java:124) > at junit.framework.TestSuite.runTest(TestSuite.java:232) > at junit.framework.TestSuite.run(TestSuite.java:227) > at > org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81) > at > org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) > at > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) > at > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) > at org.apache.maven.surefire.Surefire.run(Surefire.java:177) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338) > at > org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997) > testWSS62(wssec.TestWSSecurityNewST2) Time elapsed: 0.011 sec <<< ERROR! > org.apache.ws.security.WSSecurityException: General security error (No > certificates were found for SAML signature) > at > org.apache.ws.security.saml.WSSecSignatureSAML.prepare(WSSecSignatureSAML.java:276) > at > org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:110) > at wssec.TestWSSecurityNewST2.testWSS62(TestWSSecurityNewST2.java:241) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at junit.framework.TestCase.runTest(TestCase.java:168) > at junit.framework.TestCase.runBare(TestCase.java:134) > at junit.framework.TestResult$1.protect(TestResult.java:110) > at junit.framework.TestResult.runProtected(TestResult.java:128) > at junit.framework.TestResult.run(TestResult.java:113) > at junit.framework.TestCase.run(TestCase.java:124) > at junit.framework.TestSuite.runTest(TestSuite.java:232) > at junit.framework.TestSuite.run(TestSuite.java:227) > at > org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81) > at > org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) > at > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) > at > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) > at org.apache.maven.surefire.Surefire.run(Surefire.java:177) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338) > at > org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997) > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: wss4j-dev-unsubscr...@ws.apache.org For additional commands, e-mail: wss4j-dev-h...@ws.apache.org