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/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.