Skip to Content.
Sympa Menu

mace-opensaml-users - Re: [OpenSAML] Attribute Values in XACMLAuthzQuery

Subject: OpenSAML user discussion

List archive

Re: [OpenSAML] Attribute Values in XACMLAuthzQuery


Chronological Thread 
  • From: Chad La Joie <>
  • To:
  • Subject: Re: [OpenSAML] Attribute Values in XACMLAuthzQuery
  • Date: Wed, 04 Jun 2008 22:38:27 +0200
  • Openpgp: id=146B2514
  • Organization: SWITCH

No, the schema says it can be a string or an XML element.

Rachana Ananthakrishnan wrote:
Hi,
Thanks. This API allows only string to be set as value of attribute. But
really the attribute value can be any Java object that is serializable,
right? Rachana


_____
From:


[mailto:]
On Behalf Of Håkon
Sagehaug
Sent: Wednesday, June 04, 2008 4:21 AM
To:

Subject: [OpenSAML] Attribute Values in XACMLAuthzQuery


Hi Rachana,

I see that my guide is wrong on that point. I made a attribute value like it
done in saml, but in saml the attribute value is defined like this

<element name="AttributeValue" type="anyType" nillable="true"/>

But in xacml like this
<xs:element name="AttributeValue" type="xacml-context:AttributeVa lueType"/>
<xs:complexType name="AttributeValueType" mixed="true">
<xs:sequence>
<xs:any namespace="##any" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute namespace="##any" processContents="lax"/>
</xs:complexType>

So the correct way of creating a attribute value is like this

AttributeValueTypeImplBuilder attributeValueBuilder =
(AttributeValueTypeImplBuilder) builderFactory
.getBuilder(AttributeValueType.DEFAULT_ELEMENT_NAME);

AttributeValueType actionAttributeValue = attributeValueBuilder
.buildObject();

actionAttributeValue.setValue(actionString);

Then the output is correct

<xacml-context:Attribute AttributeId="urn:action" Issuer="issuer">
<xacml-context:AttributeValue>action</xacml-context:AttributeValue>
</xacml-context:Attribute>



--
SWITCH
Serving Swiss Universities
--------------------------
Chad La Joie, Software Engineer, Net Services
Werdstrasse 2, P.O. Box, 8021 Zürich, Switzerland
phone +41 44 268 15 75, fax +41 44 268 15 68
,
http://www.switch.ch




Archive powered by MHonArc 2.6.16.

Top of Page