[jboss-dev-forums] [PicketBox Development] - Loading many policy sets from the code

john john do-not-reply at jboss.com
Fri Jul 1 09:21:14 EDT 2011


john john [http://community.jboss.org/people/john78] created the discussion

"Loading many policy sets from the code"

To view the discussion, visit: http://community.jboss.org/message/612980#612980

--------------------------------------------------------------
Hi,
Is it possible to load many policy sets from the code instead dynamicall from a file (as it is described  http://community.jboss.org/docs/DOC-16676 http://community.jboss.org/wiki/XACMLRBACLocator).

When I try:
XACMLPolicy ps1 = PolicyFactory.createPolicySet(new FileInputStream(new File("ps1")));
XACMLPolicy ps2 = PolicyFactory.createPolicySet(new FileInputStream(new File("ps2")));

HashSet<XACMLPolicy> policies = new HashSet<XACMLPolicy>();
policies.add(ps1);
policies.add(ps2);

PolicyFinder pf = new PolicyFinder();
JBossPolicySetLocator psl = new JBossPolicySetLocator();
psl.setPolicies(policies);

RequestContext req1 = RequestResponseContextFactory.createRequestCtx();
req1.readRequest(new FileInputStream(new File("req.xml")));

JBossPDP pdp = new JBossPDP();
ResponseContext resp1 = pdp.evaluate(req1);


I get:
2011-07-01 15:18:05 org.jboss.security.xacml.sunxacml.finder.PolicyFinder findPolicy
INFO: More than one top-level applicable policy for the request

independently on what are the attributes which specify the roles within these two policy sets.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/612980#612980]

Start a new discussion in PicketBox Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2088]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20110701/af142d4f/attachment.html 


More information about the jboss-dev-forums mailing list