Skip to content

Support multiple attribute values per attribute #362

@jondavidjohn

Description

@jondavidjohn

In an example SAML AttributeStatement found here, the point of providing AttributeValue is to provide the IDP options for input in the associated attribute.

This gem does not currently support supplying multiple AttributeValue elements for a given Attribute. Doesn't this actually mean the IDP could only provide a single value for this attribute, mostly rendering it useless?

   <saml:AttributeStatement>
     <saml:Attribute
       xmlns:x500="urn:oasis:names:tc:SAML:2.0:profiles:attribute:X500"
       x500:Encoding="LDAP"
       NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"
       Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.1"
       FriendlyName="eduPersonAffiliation">
       <saml:AttributeValue
         xsi:type="xs:string">member</saml:AttributeValue>
       <saml:AttributeValue
         xsi:type="xs:string">staff</saml:AttributeValue>
     </saml:Attribute>
   </saml:AttributeStatement>

Is there currently a way to accept multiple values per attribute? if not, would there be interest in a pull request to allow the attribute_value property to accept an array of values?

For example...

      settings.attributes_index = 0
      settings.attribute_consuming_service.configure do
        service_name "Service"
        service_index 0
        add_attribute(
          name: "urn:oid:1.3.6.1.4.1.5923.1.1.1.1",
          name_format: "urn:oasis:names:tc:SAML:2.0:attrname-format:uri",
          friendly_name: "eduPersonAffiliation"
          attribute_value: ["member", "staff"]
        )
      end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions