Referencing BouncyCastle

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Referencing BouncyCastle

Rebecca Searls

Need wildFly to use bouncycastle for cxf tests.
Add bouncycastle ref in standalone.xml as follows:

<subsystem xmlns="urn:jboss:domain:ee:2.0">
            <global-modules>
                <module name="org.bouncycastle" slot="main"/>
            </global-modules>
  :


But it does not appear to be found and getting stacktrace.
Any suggestions?


13:45:10,529 ERROR [stderr] (default task-3) java.lang.Exception: Please check that the Bouncy Castle provider is installed.
13:45:10,529 ERROR [stderr] (default task-3) at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.invoke(SignEncryptHelper.java:94)
13:45:10,529 ERROR [stderr] (default task-3) at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.testSignEncryptUsingConfigProperties(SignEncryptHelper.java:72)
13:45:10,529 ERROR [stderr] (default task-3) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:45:10,529 ERROR [stderr] (default task-3) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
13:45:10,529 ERROR [stderr] (default task-3) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
13:45:10,529 ERROR [stderr] (default task-3) at java.lang.reflect.Method.invoke(Method.java:606)
13:45:10,530 ERROR [stderr] (default task-3) at org.jboss.wsf.test.TestServlet.invokeMethod(TestServlet.java:152)
13:45:10,530 ERROR [stderr] (default task-3) at org.jboss.wsf.test.TestServlet.doGet(TestServlet.java:89)
13:45:10,530 ERROR [stderr] (default task-3) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
13:45:10,530 ERROR [stderr] (default task-3) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
13:45:10,530 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:87)
13:45:10,530 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)
13:45:10,530 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
13:45:10,531 ERROR [stderr] (default task-3) at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:70)
13:45:10,531 ERROR [stderr] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
13:45:10,531 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113)
13:45:10,531 ERROR [stderr] (default task-3) at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52)
13:45:10,531 ERROR [stderr] (default task-3) at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)
13:45:10,531 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61)
13:45:10,531 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:67)
13:45:10,532 ERROR [stderr] (default task-3) at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:70)
13:45:10,532 ERROR [stderr] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
13:45:10,532 ERROR [stderr] (default task-3) at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
13:45:10,532 ERROR [stderr] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
13:45:10,532 ERROR [stderr] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
13:45:10,532 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240)
13:45:10,532 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)
13:45:10,533 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73)
13:45:10,533 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146)
13:45:10,533 ERROR [stderr] (default task-3) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:164)
13:45:10,533 ERROR [stderr] (default task-3) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:654)
13:45:10,533 ERROR [stderr] (default task-3) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
13:45:10,533 ERROR [stderr] (default task-3) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
13:45:10,533 ERROR [stderr] (default task-3) at java.lang.Thread.run(Thread.java:724)
13:45:10,534 ERROR [stderr] (default task-3) Caused by: javax.xml.ws.soap.SOAPFaultException: Cannot encrypt data
13:45:10,534 ERROR [stderr] (default task-3) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)
13:45:10,534 ERROR [stderr] (default task-3) at com.sun.proxy.$Proxy280.sayHello(Unknown Source)
13:45:10,534 ERROR [stderr] (default task-3) at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.invoke(SignEncryptHelper.java:90)
13:45:10,534 ERROR [stderr] (default task-3) ... 33 more
13:45:10,534 ERROR [stderr] (default task-3) Caused by: org.apache.cxf.ws.policy.PolicyException: Cannot encrypt data
13:45:10,535 ERROR [stderr] (default task-3) at org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractBindingBuilder.policyNotAsserted(AbstractBindingBuilder.java:294)
13:45:10,535 ERROR [stderr] (default task-3) at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doEncryption(AsymmetricBindingHandler.java:461)
13:45:10,535 ERROR [stderr] (default task-3) at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doSignBeforeEncrypt(AsymmetricBindingHandler.java:190)
13:45:10,535 ERROR [stderr] (default task-3) at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.handleBinding(AsymmetricBindingHandler.java:98)
13:45:10,535 ERROR [stderr] (default task-3) at org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.java:176)
13:45:10,535 ERROR [stderr] (default task-3) at org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.java:90)
13:45:10,535 ERROR [stderr] (default task-3) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
13:45:10,535 ERROR [stderr] (default task-3) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:565)
13:45:10,536 ERROR [stderr] (default task-3) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
13:45:10,536 ERROR [stderr] (default task-3) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
13:45:10,536 ERROR [stderr] (default task-3) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
13:45:10,536 ERROR [stderr] (default task-3) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
13:45:10,536 ERROR [stderr] (default task-3) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
13:45:10,536 ERROR [stderr] (default task-3) ... 35 more
13:45:12,533 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-6) JBAS017535: Unregister web context: /jaxws-samples-wsse-policy-sign-encrypt-gcm
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Referencing BouncyCastle

Alessio Soldano
Hi Rebecca,
the test you're running here is also run with an equivalent client
executed out of container; is that failing too? (and hence is the
problem a more general one, unrelated to WildFly dependencies?)
Is the org.bouncycastle.jce.provider.BouncyCastleProvider security
provider registered in your JDK /jre/lib/security/java.security file?

Cheers
Alessio

On 14/01/14 20:20, Rebecca Searls wrote:

> Need wildFly to use bouncycastle for cxf tests.
> Add bouncycastle ref in standalone.xml as follows:
>
> <subsystem xmlns="urn:jboss:domain:ee:2.0">
>              <global-modules>
>                  <module name="org.bouncycastle" slot="main"/>
>              </global-modules>
>    :
>
>
> But it does not appear to be found and getting stacktrace.
> Any suggestions?
>
>
> 13:45:10,529 ERROR [stderr] (default task-3) java.lang.Exception: Please check that the Bouncy Castle provider is installed.
> 13:45:10,529 ERROR [stderr] (default task-3) at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.invoke(SignEncryptHelper.java:94)
> 13:45:10,529 ERROR [stderr] (default task-3) at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.testSignEncryptUsingConfigProperties(SignEncryptHelper.java:72)
> 13:45:10,529 ERROR [stderr] (default task-3) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 13:45:10,529 ERROR [stderr] (default task-3) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 13:45:10,529 ERROR [stderr] (default task-3) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 13:45:10,529 ERROR [stderr] (default task-3) at java.lang.reflect.Method.invoke(Method.java:606)
> 13:45:10,530 ERROR [stderr] (default task-3) at org.jboss.wsf.test.TestServlet.invokeMethod(TestServlet.java:152)
> 13:45:10,530 ERROR [stderr] (default task-3) at org.jboss.wsf.test.TestServlet.doGet(TestServlet.java:89)
> 13:45:10,530 ERROR [stderr] (default task-3) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
> 13:45:10,530 ERROR [stderr] (default task-3) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> 13:45:10,530 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:87)
> 13:45:10,530 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)
> 13:45:10,530 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
> 13:45:10,531 ERROR [stderr] (default task-3) at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:70)
> 13:45:10,531 ERROR [stderr] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
> 13:45:10,531 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113)
> 13:45:10,531 ERROR [stderr] (default task-3) at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52)
> 13:45:10,531 ERROR [stderr] (default task-3) at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)
> 13:45:10,531 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61)
> 13:45:10,531 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:67)
> 13:45:10,532 ERROR [stderr] (default task-3) at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:70)
> 13:45:10,532 ERROR [stderr] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
> 13:45:10,532 ERROR [stderr] (default task-3) at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> 13:45:10,532 ERROR [stderr] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
> 13:45:10,532 ERROR [stderr] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
> 13:45:10,532 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240)
> 13:45:10,532 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)
> 13:45:10,533 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73)
> 13:45:10,533 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146)
> 13:45:10,533 ERROR [stderr] (default task-3) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:164)
> 13:45:10,533 ERROR [stderr] (default task-3) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:654)
> 13:45:10,533 ERROR [stderr] (default task-3) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 13:45:10,533 ERROR [stderr] (default task-3) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 13:45:10,533 ERROR [stderr] (default task-3) at java.lang.Thread.run(Thread.java:724)
> 13:45:10,534 ERROR [stderr] (default task-3) Caused by: javax.xml.ws.soap.SOAPFaultException: Cannot encrypt data
> 13:45:10,534 ERROR [stderr] (default task-3) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)
> 13:45:10,534 ERROR [stderr] (default task-3) at com.sun.proxy.$Proxy280.sayHello(Unknown Source)
> 13:45:10,534 ERROR [stderr] (default task-3) at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.invoke(SignEncryptHelper.java:90)
> 13:45:10,534 ERROR [stderr] (default task-3) ... 33 more
> 13:45:10,534 ERROR [stderr] (default task-3) Caused by: org.apache.cxf.ws.policy.PolicyException: Cannot encrypt data
> 13:45:10,535 ERROR [stderr] (default task-3) at org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractBindingBuilder.policyNotAsserted(AbstractBindingBuilder.java:294)
> 13:45:10,535 ERROR [stderr] (default task-3) at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doEncryption(AsymmetricBindingHandler.java:461)
> 13:45:10,535 ERROR [stderr] (default task-3) at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doSignBeforeEncrypt(AsymmetricBindingHandler.java:190)
> 13:45:10,535 ERROR [stderr] (default task-3) at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.handleBinding(AsymmetricBindingHandler.java:98)
> 13:45:10,535 ERROR [stderr] (default task-3) at org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.java:176)
> 13:45:10,535 ERROR [stderr] (default task-3) at org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.java:90)
> 13:45:10,535 ERROR [stderr] (default task-3) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
> 13:45:10,535 ERROR [stderr] (default task-3) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:565)
> 13:45:10,536 ERROR [stderr] (default task-3) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
> 13:45:10,536 ERROR [stderr] (default task-3) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
> 13:45:10,536 ERROR [stderr] (default task-3) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
> 13:45:10,536 ERROR [stderr] (default task-3) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
> 13:45:10,536 ERROR [stderr] (default task-3) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
> 13:45:10,536 ERROR [stderr] (default task-3) ... 35 more
> 13:45:12,533 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-6) JBAS017535: Unregister web context: /jaxws-samples-wsse-policy-sign-encrypt-gcm
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev


--
Alessio Soldano
Web Service Lead, JBoss

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Referencing BouncyCastle

Rebecca Searls
Hi Alessio,

My JDK /jre/lib/security/java.security is set as follows. BouncyCastleProvider is security.provider.10.
       security.provider.1=sun.security.provider.Sun
       security.provider.2=sun.security.rsa.SunRsaSign
       security.provider.3=sun.security.ec.SunEC
       security.provider.4=com.sun.net.ssl.internal.ssl.Provider
       security.provider.5=com.sun.crypto.provider.SunJCE
       security.provider.6=sun.security.jgss.SunProvider
       security.provider.7=com.sun.security.sasl.Provider
       security.provider.8=org.jcp.xml.dsig.internal.dom.XMLDSigRI
       security.provider.9=sun.security.smartcardio.SunPCSC
       security.provider.10=org.bouncycastle.jce.provider.BouncyCastleProvider

Here is one of the tests that is failing.  If the method name is an accurate description of its function, then this
is a serverSide issue of some type.

Failed tests:      testServerSideUsingConfigProperties(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptGCMTestCase): expected:<[1]> but was:<[# Failed tests:  # Error tests: testSignEncryptUsingConfigProperties: java.lang.Exception Please check that the Bouncy Castle provider is installed.]>








----- Original Message -----

> From: "Alessio Soldano" <[hidden email]>
> To: [hidden email]
> Sent: Wednesday, January 15, 2014 2:08:04 AM
> Subject: Re: [wildfly-dev] Referencing BouncyCastle
>
> Hi Rebecca,
> the test you're running here is also run with an equivalent client
> executed out of container; is that failing too? (and hence is the
> problem a more general one, unrelated to WildFly dependencies?)
> Is the org.bouncycastle.jce.provider.BouncyCastleProvider security
> provider registered in your JDK /jre/lib/security/java.security file?
>
> Cheers
> Alessio
>
> On 14/01/14 20:20, Rebecca Searls wrote:
> > Need wildFly to use bouncycastle for cxf tests.
> > Add bouncycastle ref in standalone.xml as follows:
> >
> > <subsystem xmlns="urn:jboss:domain:ee:2.0">
> >              <global-modules>
> >                  <module name="org.bouncycastle" slot="main"/>
> >              </global-modules>
> >    :
> >
> >
> > But it does not appear to be found and getting stacktrace.
> > Any suggestions?
> >
> >
> > 13:45:10,529 ERROR [stderr] (default task-3) java.lang.Exception: Please
> > check that the Bouncy Castle provider is installed.
> > 13:45:10,529 ERROR [stderr] (default task-3) at
> > org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.invoke(SignEncryptHelper.java:94)
> > 13:45:10,529 ERROR [stderr] (default task-3) at
> > org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.testSignEncryptUsingConfigProperties(SignEncryptHelper.java:72)
> > 13:45:10,529 ERROR [stderr] (default task-3) at
> > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > 13:45:10,529 ERROR [stderr] (default task-3) at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> > 13:45:10,529 ERROR [stderr] (default task-3) at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > 13:45:10,529 ERROR [stderr] (default task-3) at
> > java.lang.reflect.Method.invoke(Method.java:606)
> > 13:45:10,530 ERROR [stderr] (default task-3) at
> > org.jboss.wsf.test.TestServlet.invokeMethod(TestServlet.java:152)
> > 13:45:10,530 ERROR [stderr] (default task-3) at
> > org.jboss.wsf.test.TestServlet.doGet(TestServlet.java:89)
> > 13:45:10,530 ERROR [stderr] (default task-3) at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
> > 13:45:10,530 ERROR [stderr] (default task-3) at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> > 13:45:10,530 ERROR [stderr] (default task-3) at
> > io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:87)
> > 13:45:10,530 ERROR [stderr] (default task-3) at
> > io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)
> > 13:45:10,530 ERROR [stderr] (default task-3) at
> > io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
> > 13:45:10,531 ERROR [stderr] (default task-3) at
> > org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:70)
> > 13:45:10,531 ERROR [stderr] (default task-3) at
> > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
> > 13:45:10,531 ERROR [stderr] (default task-3) at
> > io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113)
> > 13:45:10,531 ERROR [stderr] (default task-3) at
> > io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52)
> > 13:45:10,531 ERROR [stderr] (default task-3) at
> > io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)
> > 13:45:10,531 ERROR [stderr] (default task-3) at
> > io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61)
> > 13:45:10,531 ERROR [stderr] (default task-3) at
> > io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:67)
> > 13:45:10,532 ERROR [stderr] (default task-3) at
> > io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:70)
> > 13:45:10,532 ERROR [stderr] (default task-3) at
> > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
> > 13:45:10,532 ERROR [stderr] (default task-3) at
> > org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> > 13:45:10,532 ERROR [stderr] (default task-3) at
> > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
> > 13:45:10,532 ERROR [stderr] (default task-3) at
> > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
> > 13:45:10,532 ERROR [stderr] (default task-3) at
> > io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240)
> > 13:45:10,532 ERROR [stderr] (default task-3) at
> > io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)
> > 13:45:10,533 ERROR [stderr] (default task-3) at
> > io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73)
> > 13:45:10,533 ERROR [stderr] (default task-3) at
> > io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146)
> > 13:45:10,533 ERROR [stderr] (default task-3) at
> > io.undertow.server.Connectors.executeRootHandler(Connectors.java:164)
> > 13:45:10,533 ERROR [stderr] (default task-3) at
> > io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:654)
> > 13:45:10,533 ERROR [stderr] (default task-3) at
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> > 13:45:10,533 ERROR [stderr] (default task-3) at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> > 13:45:10,533 ERROR [stderr] (default task-3) at
> > java.lang.Thread.run(Thread.java:724)
> > 13:45:10,534 ERROR [stderr] (default task-3) Caused by:
> > javax.xml.ws.soap.SOAPFaultException: Cannot encrypt data
> > 13:45:10,534 ERROR [stderr] (default task-3) at
> > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)
> > 13:45:10,534 ERROR [stderr] (default task-3) at
> > com.sun.proxy.$Proxy280.sayHello(Unknown Source)
> > 13:45:10,534 ERROR [stderr] (default task-3) at
> > org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.invoke(SignEncryptHelper.java:90)
> > 13:45:10,534 ERROR [stderr] (default task-3) ... 33 more
> > 13:45:10,534 ERROR [stderr] (default task-3) Caused by:
> > org.apache.cxf.ws.policy.PolicyException: Cannot encrypt data
> > 13:45:10,535 ERROR [stderr] (default task-3) at
> > org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractBindingBuilder.policyNotAsserted(AbstractBindingBuilder.java:294)
> > 13:45:10,535 ERROR [stderr] (default task-3) at
> > org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doEncryption(AsymmetricBindingHandler.java:461)
> > 13:45:10,535 ERROR [stderr] (default task-3) at
> > org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doSignBeforeEncrypt(AsymmetricBindingHandler.java:190)
> > 13:45:10,535 ERROR [stderr] (default task-3) at
> > org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.handleBinding(AsymmetricBindingHandler.java:98)
> > 13:45:10,535 ERROR [stderr] (default task-3) at
> > org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.java:176)
> > 13:45:10,535 ERROR [stderr] (default task-3) at
> > org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.java:90)
> > 13:45:10,535 ERROR [stderr] (default task-3) at
> > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
> > 13:45:10,535 ERROR [stderr] (default task-3) at
> > org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:565)
> > 13:45:10,536 ERROR [stderr] (default task-3) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
> > 13:45:10,536 ERROR [stderr] (default task-3) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
> > 13:45:10,536 ERROR [stderr] (default task-3) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
> > 13:45:10,536 ERROR [stderr] (default task-3) at
> > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
> > 13:45:10,536 ERROR [stderr] (default task-3) at
> > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
> > 13:45:10,536 ERROR [stderr] (default task-3) ... 35 more
> > 13:45:12,533 INFO  [org.wildfly.extension.undertow] (MSC service thread
> > 1-6) JBAS017535: Unregister web context:
> > /jaxws-samples-wsse-policy-sign-encrypt-gcm
> > _______________________________________________
> > wildfly-dev mailing list
> > [hidden email]
> > https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
>
> --
> Alessio Soldano
> Web Service Lead, JBoss
>
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Referencing BouncyCastle

Rebecca Searls

Getting the unlimited crypto jdk extension installed properly and adding
<module name="org.bouncycastle" slot="main"/> to standalone.xml has resolved
these test failures.


----- Original Message -----

> From: "Rebecca Searls" <[hidden email]>
> To: "Alessio Soldano" <[hidden email]>
> Cc: [hidden email]
> Sent: Wednesday, January 15, 2014 8:13:36 AM
> Subject: Re: [wildfly-dev] Referencing BouncyCastle
>
> Hi Alessio,
>
> My JDK /jre/lib/security/java.security is set as follows.
> BouncyCastleProvider is security.provider.10.
>        security.provider.1=sun.security.provider.Sun
>        security.provider.2=sun.security.rsa.SunRsaSign
>        security.provider.3=sun.security.ec.SunEC
>        security.provider.4=com.sun.net.ssl.internal.ssl.Provider
>        security.provider.5=com.sun.crypto.provider.SunJCE
>        security.provider.6=sun.security.jgss.SunProvider
>        security.provider.7=com.sun.security.sasl.Provider
>        security.provider.8=org.jcp.xml.dsig.internal.dom.XMLDSigRI
>        security.provider.9=sun.security.smartcardio.SunPCSC
>        security.provider.10=org.bouncycastle.jce.provider.BouncyCastleProvider
>
> Here is one of the tests that is failing.  If the method name is an accurate
> description of its function, then this
> is a serverSide issue of some type.
>
> Failed tests:
> testServerSideUsingConfigProperties(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptGCMTestCase):
> expected:<[1]> but was:<[# Failed tests:  # Error tests:
> testSignEncryptUsingConfigProperties: java.lang.Exception Please check that
> the Bouncy Castle provider is installed.]>
>
>
>
>
>
>
>
>
> ----- Original Message -----
> > From: "Alessio Soldano" <[hidden email]>
> > To: [hidden email]
> > Sent: Wednesday, January 15, 2014 2:08:04 AM
> > Subject: Re: [wildfly-dev] Referencing BouncyCastle
> >
> > Hi Rebecca,
> > the test you're running here is also run with an equivalent client
> > executed out of container; is that failing too? (and hence is the
> > problem a more general one, unrelated to WildFly dependencies?)
> > Is the org.bouncycastle.jce.provider.BouncyCastleProvider security
> > provider registered in your JDK /jre/lib/security/java.security file?
> >
> > Cheers
> > Alessio
> >
> > On 14/01/14 20:20, Rebecca Searls wrote:
> > > Need wildFly to use bouncycastle for cxf tests.
> > > Add bouncycastle ref in standalone.xml as follows:
> > >
> > > <subsystem xmlns="urn:jboss:domain:ee:2.0">
> > >              <global-modules>
> > >                  <module name="org.bouncycastle" slot="main"/>
> > >              </global-modules>
> > >    :
> > >
> > >
> > > But it does not appear to be found and getting stacktrace.
> > > Any suggestions?
> > >
> > >
> > > 13:45:10,529 ERROR [stderr] (default task-3) java.lang.Exception: Please
> > > check that the Bouncy Castle provider is installed.
> > > 13:45:10,529 ERROR [stderr] (default task-3) at
> > > org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.invoke(SignEncryptHelper.java:94)
> > > 13:45:10,529 ERROR [stderr] (default task-3) at
> > > org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.testSignEncryptUsingConfigProperties(SignEncryptHelper.java:72)
> > > 13:45:10,529 ERROR [stderr] (default task-3) at
> > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > 13:45:10,529 ERROR [stderr] (default task-3) at
> > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> > > 13:45:10,529 ERROR [stderr] (default task-3) at
> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > > 13:45:10,529 ERROR [stderr] (default task-3) at
> > > java.lang.reflect.Method.invoke(Method.java:606)
> > > 13:45:10,530 ERROR [stderr] (default task-3) at
> > > org.jboss.wsf.test.TestServlet.invokeMethod(TestServlet.java:152)
> > > 13:45:10,530 ERROR [stderr] (default task-3) at
> > > org.jboss.wsf.test.TestServlet.doGet(TestServlet.java:89)
> > > 13:45:10,530 ERROR [stderr] (default task-3) at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
> > > 13:45:10,530 ERROR [stderr] (default task-3) at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> > > 13:45:10,530 ERROR [stderr] (default task-3) at
> > > io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:87)
> > > 13:45:10,530 ERROR [stderr] (default task-3) at
> > > io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)
> > > 13:45:10,530 ERROR [stderr] (default task-3) at
> > > io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
> > > 13:45:10,531 ERROR [stderr] (default task-3) at
> > > org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:70)
> > > 13:45:10,531 ERROR [stderr] (default task-3) at
> > > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
> > > 13:45:10,531 ERROR [stderr] (default task-3) at
> > > io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113)
> > > 13:45:10,531 ERROR [stderr] (default task-3) at
> > > io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52)
> > > 13:45:10,531 ERROR [stderr] (default task-3) at
> > > io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)
> > > 13:45:10,531 ERROR [stderr] (default task-3) at
> > > io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61)
> > > 13:45:10,531 ERROR [stderr] (default task-3) at
> > > io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:67)
> > > 13:45:10,532 ERROR [stderr] (default task-3) at
> > > io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:70)
> > > 13:45:10,532 ERROR [stderr] (default task-3) at
> > > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
> > > 13:45:10,532 ERROR [stderr] (default task-3) at
> > > org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> > > 13:45:10,532 ERROR [stderr] (default task-3) at
> > > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
> > > 13:45:10,532 ERROR [stderr] (default task-3) at
> > > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
> > > 13:45:10,532 ERROR [stderr] (default task-3) at
> > > io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240)
> > > 13:45:10,532 ERROR [stderr] (default task-3) at
> > > io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)
> > > 13:45:10,533 ERROR [stderr] (default task-3) at
> > > io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73)
> > > 13:45:10,533 ERROR [stderr] (default task-3) at
> > > io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146)
> > > 13:45:10,533 ERROR [stderr] (default task-3) at
> > > io.undertow.server.Connectors.executeRootHandler(Connectors.java:164)
> > > 13:45:10,533 ERROR [stderr] (default task-3) at
> > > io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:654)
> > > 13:45:10,533 ERROR [stderr] (default task-3) at
> > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> > > 13:45:10,533 ERROR [stderr] (default task-3) at
> > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> > > 13:45:10,533 ERROR [stderr] (default task-3) at
> > > java.lang.Thread.run(Thread.java:724)
> > > 13:45:10,534 ERROR [stderr] (default task-3) Caused by:
> > > javax.xml.ws.soap.SOAPFaultException: Cannot encrypt data
> > > 13:45:10,534 ERROR [stderr] (default task-3) at
> > > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)
> > > 13:45:10,534 ERROR [stderr] (default task-3) at
> > > com.sun.proxy.$Proxy280.sayHello(Unknown Source)
> > > 13:45:10,534 ERROR [stderr] (default task-3) at
> > > org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.invoke(SignEncryptHelper.java:90)
> > > 13:45:10,534 ERROR [stderr] (default task-3) ... 33 more
> > > 13:45:10,534 ERROR [stderr] (default task-3) Caused by:
> > > org.apache.cxf.ws.policy.PolicyException: Cannot encrypt data
> > > 13:45:10,535 ERROR [stderr] (default task-3) at
> > > org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractBindingBuilder.policyNotAsserted(AbstractBindingBuilder.java:294)
> > > 13:45:10,535 ERROR [stderr] (default task-3) at
> > > org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doEncryption(AsymmetricBindingHandler.java:461)
> > > 13:45:10,535 ERROR [stderr] (default task-3) at
> > > org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doSignBeforeEncrypt(AsymmetricBindingHandler.java:190)
> > > 13:45:10,535 ERROR [stderr] (default task-3) at
> > > org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.handleBinding(AsymmetricBindingHandler.java:98)
> > > 13:45:10,535 ERROR [stderr] (default task-3) at
> > > org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.java:176)
> > > 13:45:10,535 ERROR [stderr] (default task-3) at
> > > org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.java:90)
> > > 13:45:10,535 ERROR [stderr] (default task-3) at
> > > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
> > > 13:45:10,535 ERROR [stderr] (default task-3) at
> > > org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:565)
> > > 13:45:10,536 ERROR [stderr] (default task-3) at
> > > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
> > > 13:45:10,536 ERROR [stderr] (default task-3) at
> > > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
> > > 13:45:10,536 ERROR [stderr] (default task-3) at
> > > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
> > > 13:45:10,536 ERROR [stderr] (default task-3) at
> > > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
> > > 13:45:10,536 ERROR [stderr] (default task-3) at
> > > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
> > > 13:45:10,536 ERROR [stderr] (default task-3) ... 35 more
> > > 13:45:12,533 INFO  [org.wildfly.extension.undertow] (MSC service thread
> > > 1-6) JBAS017535: Unregister web context:
> > > /jaxws-samples-wsse-policy-sign-encrypt-gcm
> > > _______________________________________________
> > > wildfly-dev mailing list
> > > [hidden email]
> > > https://lists.jboss.org/mailman/listinfo/wildfly-dev
> >
> >
> > --
> > Alessio Soldano
> > Web Service Lead, JBoss
> >
> > _______________________________________________
> > wildfly-dev mailing list
> > [hidden email]
> > https://lists.jboss.org/mailman/listinfo/wildfly-dev
> >
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev