[jboss-user] [Security & JAAS/JBoss] - rough start with JBossPDP
mario_lanza
do-not-reply at jboss.com
Fri Aug 3 12:05:23 EDT 2007
Hello,
I'm just starting to look into this XACML stuff so I downloaded SX and SPI and AXCML modules, and using JAXB 2.0 with them.
Regardless of Java version (1.5.6 or 1.6) I get with this code (which reads fine the file, checked that):
ClassLoader tcl = Thread.currentThread().getContextClassLoader();
| InputStream is = tcl.getResourceAsStream("test-policy.xml");
| try
| {
| PolicyDecisionPoint pdp = new JBossPDP(is);
a nice exception like this:java.lang.RuntimeException: javax.xml.bind.UnmarshalException
| - with linked exception:
| [org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'Policy'.]
| at org.jboss.security.xacml.core.JBossPDP.<init>(JBossPDP.java:103)
| at TestApp.main(TestApp.java:38)
caused by the line:JAXBElement<?> jxb = (JAXBElement<?>) unmarshaller.unmarshal(configFile);The policy starts like this, nothing fancy:
<?xml version="1.0" encoding="UTF-8"?>
| <Policy
| xmlns="urn:oasis:names:tc:xacml:1.0:policy"
| RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:permit-overrides"
| PolicyId="ExamplePolicy">
| <Target>
| <Resources>
| <Resource>
| ...
so I suppose there's something wrong with the environment, or stuff missing... or something else. Yes, I've read the XACML User Guide.
Thank you in advance,
M
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070701#4070701
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070701
More information about the jboss-user
mailing list