0 Replies Latest reply on Apr 28, 2011 10:09 AM by sacha

    XACML 2.0.6  xpath-node-match are not supported by this factory

    sacha Newbie

      Hi all,

       

      I try to use Xacml with JBossPDP but when i execute this code :

       

                   FileInputStream ruleAsXML = new FileInputStream("ConfigXACML_OpenEA.xml");

                   InputStream is = (InputStream)ruleAsXML;

       

                   pdp = new JBossPDP(is);

       

      [...]

       

                  FileInputStream requestAsXML = new FileInputStream("Request.xml");

                  InputStream isRequest = (InputStream)requestAsXML;

                  RequestContext requestContext = new JBossRequestContext(); //RequestResponseContextFactory.createRequestCtx();

                  //Read the xacml request from input stream

                  requestContext.readRequest( isRequest );

       

                  //requestContext.readRequest( node );  //Parse xacml request as DOM node

                  ResponseContext pdpResponse;

       

                  pdpResponse = pdp.evaluate(requestContext);

       

       

      i get this exception :

       

       

      13:35:26,131 INFO  [JBossPDP] Reading policysets from location=http://localhost/xacml-policySet.xml

      13:35:26,138 ERROR [SOAPFaultHelperJAXWS] SOAP request exception

      java.lang.IllegalStateException: Cannot get target bean instance

          at org.jboss.wsf.container.jboss50.invocation.InvocationHandlerJSE.getTargetBean(InvocationHandlerJSE.java:82)

          at org.jboss.wsf.container.jboss50.invocation.InvocationHandlerJSE.invoke(InvocationHandlerJSE.java:97)

          at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:222)

          at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:474)

          at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:295)

          at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:205)

          at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)

          at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

          at java.lang.Thread.run(Thread.java:619)

      Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

          at org.jboss.security.xacml.core.JBossPDP.<init>(JBossPDP.java:161)

          at org.openea.portal.ws.WSCollabManager.<init>(WSCollabManager.java:82)

          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

          at java.lang.Class.newInstance0(Class.java:355)

          at java.lang.Class.newInstance(Class.java:308)

          at org.jboss.wsf.container.jboss50.invocation.InvocationHandlerJSE.getTargetBean(InvocationHandlerJSE.java:77)

          ... 28 more

      Caused by: java.lang.reflect.InvocationTargetException

          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

          at org.jboss.security.xacml.factories.PolicyFactory.createPolicy(PolicyFactory.java:111)

          at org.jboss.security.xacml.core.JBossPDP.addPolicies(JBossPDP.java:499)

          at org.jboss.security.xacml.core.JBossPDP.addPolicySets(JBossPDP.java:479)

          at org.jboss.security.xacml.core.JBossPDP.bootstrap(JBossPDP.java:344)

          at org.jboss.security.xacml.core.JBossPDP.<init>(JBossPDP.java:157)

          ... 36 more

      Caused by: org.jboss.security.xacml.sunxacml.ParsingException: Unknown MatchId

          at org.jboss.security.xacml.sunxacml.TargetMatch.getInstance(TargetMatch.java:224)

          at org.jboss.security.xacml.sunxacml.TargetMatchGroup.getInstance(TargetMatchGroup.java:107)

          at org.jboss.security.xacml.sunxacml.TargetSection.getInstance(TargetSection.java:117)

          at org.jboss.security.xacml.sunxacml.Target.getInstance(Target.java:185)

          at org.jboss.security.xacml.sunxacml.Rule.getInstance(Rule.java:206)

          at org.jboss.security.xacml.sunxacml.Policy.<init>(Policy.java:343)

          at org.jboss.security.xacml.sunxacml.Policy.getInstance(Policy.java:428)

          at org.jboss.security.xacml.util.XACMLPolicyUtil.createPolicy(XACMLPolicyUtil.java:114)

          at org.jboss.security.xacml.core.JBossXACMLPolicy.<init>(JBossXACMLPolicy.java:109)

          ... 45 more

      Caused by: org.jboss.security.xacml.sunxacml.UnknownIdentifierException: functions of type urn:oasis:names:tc:xacml:1.0:function:xpath-node-match are not supported by this factory

          at org.jboss.security.xacml.sunxacml.cond.BaseFunctionFactory.createFunction(BaseFunctionFactory.java:266)

          at org.jboss.security.xacml.sunxacml.cond.BaseFunctionFactory.createFunction(BaseFunctionFactory.java:238)

          at org.jboss.security.xacml.sunxacml.TargetMatch.getInstance(TargetMatch.java:220)

          ... 53 more

       

       

       

      Have you any idea ? I have look inside the functionsMap of BaseFunctionFactory class and xpath-node-match is not inside... is it normal ?

       

      Bests regards