ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suresh Attanayake (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIOM-423) WSS4J fails when processing SAML Tokens since org.apache.axiom.om.impl.dom.NodeImpl has not implemented some required methods such as lookupNamespaceURI(), hence Rampart Trust module fails.
Date Wed, 11 Jul 2012 05:07:35 GMT

    [ https://issues.apache.org/jira/browse/AXIOM-423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13411241#comment-13411241
] 

Suresh Attanayake commented on AXIOM-423:
-----------------------------------------

Hi All,

The test case org.apache.axiom.ts.dom.attr.TestLookpNamespaceURI is failing for a reason I
could not figure out. This test was successful when I ran it as a simple Java program, but
when I run it with JUnit tests it fails, following is what I see in the surefire reports.


Test set: org.apache.axiom.ts.dom.XercesTest
-------------------------------------------------------------------------------
Tests run: 56, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.283 sec <<< FAILURE!
org.apache.axiom.ts.dom.attr.TestLookpNamespaceURI(org.apache.axiom.ts.dom.attr.TestLookpNamespaceURI)
 Time elapsed: 0.008 sec  <<< FAILURE!
junit.framework.ComparisonFailure: Incorrect namespace returned for the attribute expected:<http://apache/axiom/dom/ns>
but was:<null>
        at junit.framework.Assert.assertEquals(Assert.java:85)
        at org.apache.axiom.ts.dom.attr.TestLookpNamespaceURI.runTest(TestLookpNamespaceURI.java:46)
        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:243)
        at junit.framework.TestSuite.run(TestSuite.java:238)
        at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
        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:597)
        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
        at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
        at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)

Please help me with this.

Thanks,
-Suresh

                
> WSS4J fails when processing SAML Tokens since org.apache.axiom.om.impl.dom.NodeImpl has
not implemented some required methods such as lookupNamespaceURI(), hence Rampart Trust module
fails. 
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIOM-423
>                 URL: https://issues.apache.org/jira/browse/AXIOM-423
>             Project: Axiom
>          Issue Type: Improvement
>    Affects Versions: 1.2.13
>         Environment: WSS4J 1.6.4, Java 1.6.0.26, Linux
>            Reporter: Suresh Attanayake
>            Priority: Blocker
>         Attachments: Issue-AXIOM-423-resubmit.patch, Issue-AXIOM-423.patch, issue-AXIOM-423-WithTestCases.patch
>
>
> Axiom 1.2.13 implementation's NodeImpl has not implemented methods such as lookupPrefix(),
isDefaultNamespace(), lookupNamespaceURI() etc and they throws UnsupportedOperationException.
But these methods are required methods for WSS4J libraries such as OpenSAML. Since these methods
are not implemented WSS4J fails when processing SAML assertions and hence Rampart Trust module
fails. This is a blocking issue for Apache Rampart. 
> Following is the stack trace you get when trying Apache Rampart policy sample05. For
further info on how to run Rampart samples please refer this http://axis.apache.org/axis2/java/rampart/samples.html.
 
> java.lang.UnsupportedOperationException: TODO
> 	at org.apache.axiom.om.impl.dom.NodeImpl.lookupNamespaceURI(NodeImpl.java:347)
> 	at org.opensaml.xml.util.XMLHelper.getXSIType(XMLHelper.java:132)
> 	at org.opensaml.xml.io.UnmarshallerFactory.getUnmarshaller(UnmarshallerFactory.java:77)
> 	at org.opensaml.xml.io.AbstractXMLObjectUnmarshaller.unmarshallChildElement(AbstractXMLObjectUnmarshaller.java:317)
> 	at org.opensaml.xml.io.AbstractXMLObjectUnmarshaller.unmarshall(AbstractXMLObjectUnmarshaller.java:121)
> 	at org.opensaml.xml.io.AbstractXMLObjectUnmarshaller.unmarshallChildElement(AbstractXMLObjectUnmarshaller.java:334)
> 	at org.opensaml.xml.io.AbstractXMLObjectUnmarshaller.unmarshall(AbstractXMLObjectUnmarshaller.java:121)
> 	at org.opensaml.xml.io.AbstractXMLObjectUnmarshaller.unmarshallChildElement(AbstractXMLObjectUnmarshaller.java:334)
> 	at org.opensaml.xml.io.AbstractXMLObjectUnmarshaller.unmarshall(AbstractXMLObjectUnmarshaller.java:121)
> 	at org.opensaml.saml1.core.impl.AssertionUnmarshaller.unmarshall(AssertionUnmarshaller.java:43)
> 	at org.apache.ws.security.saml.ext.OpenSAMLUtil.fromDom(OpenSAMLUtil.java:84)
> 	at org.apache.ws.security.saml.ext.AssertionWrapper.parseElement(AssertionWrapper.java:678)
> 	at org.apache.ws.security.saml.ext.AssertionWrapper.<init>(AssertionWrapper.java:152)
> 	at org.apache.ws.security.processor.SAMLTokenProcessor.handleSAMLToken(SAMLTokenProcessor.java:109)
> 	at org.apache.ws.security.processor.SAMLTokenProcessor.handleToken(SAMLTokenProcessor.java:53)
> 	at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:396)
> 	at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:304)
> 	at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:249)
> 	at org.apache.rampart.RampartEngine.process(RampartEngine.java:132)
> 	at org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:92)
> 	at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
> 	at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
> 	at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
> 	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:168)
> 	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
> 	at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:307)
> 	at org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
> 	at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
> 	at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:662)
> [ERROR] Error in SAMLToken
> org.apache.axis2.AxisFault: Error in SAMLToken
> 	at org.apache.rampart.handler.RampartReceiver.setFaultCodeAndThrowAxisFault(RampartReceiver.java:180)
> 	at org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:95)
> 	at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
> 	at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
> 	at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
> 	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:168)
> 	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
> 	at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:307)
> 	at org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
> 	at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
> 	at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:662)
> Caused by: org.apache.ws.security.WSSecurityException: Error in SAMLToken
> 	at org.apache.ws.security.processor.SAMLTokenProcessor.handleSAMLToken(SAMLTokenProcessor.java:112)
> 	at org.apache.ws.security.processor.SAMLTokenProcessor.handleToken(SAMLTokenProcessor.java:53)
> 	at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:396)
> 	at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:304)
> 	at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:249)
> 	at org.apache.rampart.RampartEngine.process(RampartEngine.java:132)
> 	at org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:92)
> 	... 12 more
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


Mime
View raw message