I am currently walking the code, but figured I would see if the question could get answered before I find a solution.
I have a custom policy combining algorithm that I am trying to add to my PDP.
From the SunXACML documentation, it should be as simple as:
CombiningAlgFactory factory = CombiningAlgFactory.getInstance(); factory.addAlgorithm(new PermitOrDenyRuleAlg()); factory.addAlgorithm(new PermitOrDenyPolicyAlg());
However I can not figure out where to place that code.
I tried to add it to my PDP creation block:
private PolicyDecisionPoint getPDP() throws PrivilegedActionException {
CombiningAlgFactory factory = CombiningAlgFactory.getInstance();
factory.addAlgorithm(new MySpecialAlg());
ClassLoader tcl = SecurityActions.getContextClassLoader();
InputStream is = tcl.getResourceAsStream(this.policyConfigFileName);
if (is == null)
throw new IllegalStateException(policyConfigFileName + " could not be located");
return new JBossPDP(is);
}
However this does not work. When I try to deploy, I get an unknown algorithm error.
Thanks for any help. If I figure it out before a reply, I will post the solution.