Skip to Content.
Sympa Menu

mace-opensaml-users - SAML 2.0 profile of XACML 2.0 (XACMLAuthzDecisionStatement)

Subject: OpenSAML user discussion

List archive

SAML 2.0 profile of XACML 2.0 (XACMLAuthzDecisionStatement)


Chronological Thread 
  • From:
  • To:
  • Subject: SAML 2.0 profile of XACML 2.0 (XACMLAuthzDecisionStatement)
  • Date: Thu, 2 Aug 2007 16:14:19 -0400 (EDT)

Hi all,

Within the framework of my engineering school and my internship at the
University of Amsterdam, I am working on a project about SAML2.0 and the
library opensaml2.0.

In a first step, I implemented the opensaml2.0 library successfully by using
the
Web site and documentations. And now, I try to implement the SAML 2.0 profile
of
XACML 2.0.

I would like to construct an <saml:Statement
xsi:type"xacml-saml:XACMLAuthzDecisionStatementType"> and (in the future) an
<saml:Statement xsi:type"xacml-saml:XACMLPolicyStatementType"> in order to get
something like that :
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="saml:Statement"/>
<XACMLAuthzDecisionStatement with request and response> or
<XACMLPolicyStatement with policy and policySet>
<element ref="saml:AuthnStatement"/>
<element ref="saml:AuthzDecisionStatement"/>
<element ref="saml:AttributeStatement"/>
</choice>

First, I created a new SAML Object XACMLAuthzDecisionStatement with
- the interface,
- the implementation,
- the builder,
- the marshaller and
- the unmarshaller (like on the openSAML manual
https://spaces.internet2.edu/display/SHIB/OSTwoDeveloperManual). I added
these java programs in my opensaml2.0 library (saml2.core for the first and
saml2.core.impl for the others).

I used an element QName to create the SAML Object. But, I have a problem and
I think it is here (XACMLAuthzDecisionStatement.java) :
/** Element local name. */
public static final String DEFAULT_ELEMENT_LOCAL_NAME =
"XACMLAuthzDecisionStatement";

/** Default element name. */
public static final QName DEFAULT_ELEMENT_NAME = new QName(
SAMLConstants.SAML20_NS,DEFAULT_ELEMENT_LOCAL_NAME,SAMLConstants.SAML20_PREFIX);

/** Local name of the XSI type. */
public static final String TYPE_LOCAL_NAME =
"XACMLAuthzDecisionStatementType";

/** QName of the XSI type. */
public static final QName TYPE_NAME = new QName(SAMLConstants.SAML20_NS,
TYPE_LOCAL_NAME, SAMLConstants.SAML20_PREFIX);

It's the same thing in the other files. I don't know what I have to make or
modify (for example in the SAMLConstants.java file and schemas).

Then, when I integrate this new object in my Java program, I always have the
same error (java.lang.NullPointerException). I think the problem comes that
my program doesn't know the new type (XACMLAuthzDecisionStatementType).

// Get the builder factory
XMLObjectBuilderFactory builderFactory =
org.opensaml.xml.Configuration.getBuilderFactory();

//===> Error XACMLAuthzDecisionStatementBuilder
XACMLAuthzDecisionStatementBuilder xacmlauthz=
(XACMLAuthzDecisionStatementBuilder)builderFactory.getBuilder(XACMLAuthzDecisionStatement.DEFAULT_ELEMENT_NAME);

//Use XACMLAuthzDecisionStatement
XACMLAuthzDecisionStatement objectxacmlauthz = xacmlauthz.buildObject();

For information, I don't use schemas, I just try to get a SAML2.0 XML file
(profile of XACML 2.0).

I hope that you can give me some advices and I thank you in advance for your
help.

Yours faithfully,

RAYNAL Sylvain



Archive powered by MHonArc 2.6.16.

Top of Page