Attributes of attributevalue element in SAML 2 Attribute Statement

Posted by AJ on Stack Overflow See other posts from Stack Overflow or by AJ
Published on 2010-05-10T18:40:39Z Indexed on 2010/05/10 18:44 UTC
Read the original article Hit count: 377

Filed under:
|

I am building a web service that receives a SAML attribute query and responds with an attribute statement. I know I can return one or multiple values of a SAML attribute. I have some values that are dependent on the other attribute values. I need to show that relationship. Let us say, the query is for the Subject Dave and the return values are his company and job title. Dave can work at multiple companies with job title at each company.

I have two options of sending this data back:

Send this as a complextype by defining an attribute organization and return xml within that attribute.

<saml:Attribute name="company">
<saml:AttributeValue>
<company name="company1" jobtitle="CIO"/>
<company name="company2" jobtitle="VP"/>
</saml:AttributeValue>

Try to send multiple values of attributes somehow sending a reference in attributevalue element.

<saml:Attribute name="company">
<attributeValue>company1</attributeValue>
<attributeValue>company2</attributeValue>
</saml:Attribute>

<saml:Attribute name="jobTitle>
<attributeValue company="company1">CIO</attributeValue>
<attributeValue company="company2">VP</attributeValue>
</saml:Attribute>

Which approach will you prefer? Why? I am biased towards second approach as it does not require client to know about any schema. It does require them to know about non-standard attribute company in the attribute value.

© Stack Overflow or respective owner

Related posts about saml

Related posts about web-services