I am trying to run the TestWSSecurityNewST2 and I get "org.apache.ws.security.WSSecurityException: General security error (No certificates were found for SAML signature)" on each one of the methods.
I am currently trying to use WSS4J with Spring to build SAML Assertions and I get the same exceptions.
Any thoughts?
Thanks...jay
[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/maven2Downloading:
http://repo1.maven.org/maven2/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pomurl =
http://static.appfuse.org/repositoryDownloading:
http://static.appfuse.org/repository/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pomurl =
http://repository.jboss.com/maven2Downloading:
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/maven2Downloading:
http://repo1.maven.org/maven2/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pomurl =
http://static.appfuse.org/repositoryDownloading:
http://static.appfuse.org/repository/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pomurl =
http://repository.jboss.com/maven2Downloading:
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/maven2Downloading:
http://repo1.maven.org/maven2/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pomurl =
http://static.appfuse.org/repositoryDownloading:
http://static.appfuse.org/repository/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pomurl =
http://repository.jboss.com/maven2Downloading:
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/maven2Downloading:
http://repo1.maven.org/maven2/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pomurl =
http://static.appfuse.org/repositoryDownloading:
http://static.appfuse.org/repository/com/sun/xml/wss/xws-security/2.0-FCS/xws-security-2.0-FCS.pomurl =
http://repository.jboss.com/maven2Downloading:
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$AppClassLoader@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$AppClassLoader@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$AppClassLoader@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$AppClassLoader@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$AppClassLoader@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$AppClassLoader@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$AppClassLoader@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$AppClassLoader@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$AppClassLoader@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$AppClassLoader@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$AppClassLoader@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$AppClassLoader@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)