steffow / meteor-accounts-saml

SAML SP tested with OpenAM
27 stars 29 forks source link

Multiple SAML attribute values are handled incorrectly (all but the first are omitted) #26

Closed craigdrayton closed 6 years ago

craigdrayton commented 6 years ago

Thanks for this useful plugin - I was able to get started with SAML quicker than expected.

I have a SAML attribute named "groups" which returns multiple values:

<saml2:Attribute Name="groups" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">

<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Everyone</saml2:AttributeValue>

<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Pandas</saml2:AttributeValue>

</saml2:Attribute>

However the package takes only the first attribute value ("Everyone") and stores it in the Meteor user profile as a string. I would expect the package to return an array of strings, in this case.

craigdrayton commented 6 years ago

Looks the the code responsible is here: https://github.com/steffow/meteor-accounts-saml/blob/develop/saml_utils.js#L420

steffow commented 6 years ago

Correct. Still trying to fix some bugs with older PRs. Stay tuned.

steffow commented 6 years ago

Fixed in 0.0.15

craigdrayton commented 6 years ago

Thanks a lot for getting the fix in so quickly