You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The NameIDPolicy element and Format attribute are optional as per SAML spec. However, build_request.go always creates them, even if no value has been specified in SAMLServiceProvider.NameIdFormat. This results in a SAML request to the IdP containing:
<samlp:NameIDPolicyAllowCreate="true"Format="" />
Azure AD appears to have problems with this, replying with an InvalidNameIDPolicy error and saying
Cannot provide requested name identifier with format for the given subject
(note two spaces between "format" and "for").
I think this is arguably a bug on Azure's part, since the standard says "if no Format value is provided, then the value urn:oasis:names:tc:SAML:1.0:nameid-format:unspecified (see Section 8.3.1) is in effect", and "" isn't a Format value. However, gosaml2's behavior is also a bug, and probably much easier to fix.
There's a PR which attempts to fix this -- #67 -- but I think it would be better to omit only the Format attribute when unspecified, and still allow the IdP to create new IDs.
The text was updated successfully, but these errors were encountered:
The
NameIDPolicy
element andFormat
attribute are optional as per SAML spec. However,build_request.go
always creates them, even if no value has been specified inSAMLServiceProvider.NameIdFormat
. This results in a SAML request to the IdP containing:Azure AD appears to have problems with this, replying with an
InvalidNameIDPolicy
error and saying(note two spaces between "format" and "for").
I think this is arguably a bug on Azure's part, since the standard says "if no Format value is provided, then the value urn:oasis:names:tc:SAML:1.0:nameid-format:unspecified (see Section 8.3.1) is in effect", and "" isn't a Format value. However, gosaml2's behavior is also a bug, and probably much easier to fix.
There's a PR which attempts to fix this -- #67 -- but I think it would be better to omit only the Format attribute when unspecified, and still allow the IdP to create new IDs.
The text was updated successfully, but these errors were encountered: