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
I have a simple question regarding the standard supplied claims_field_mappings which is provided by the SAMLMemberExtension. In our use case we are connected to an Azure AD instance.
The configuration of this case contains the following mapping since we only require the email address.
---
Name: mysamlsettingsAfter: '#samlsettings'
---
SilverStripe\SAML\Services\SAMLConfiguration:
strict: truedebug: falseexpect_binary_nameid: falseallow_insecure_email_linking: true# security related SP / IdP and Security are removed since they do not involve this question.SilverStripe\SAML\Extensions\SAMLMemberExtension:
claims_field_mappings:
'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name': 'Email'
The SAML authentication flow is now working as desired, but the following entries are added to the error log:
I would expect that, by overriding the claims_field_mappings, those errors should not appear.
When I debug the contents of Member::config()->claims_field_mappings it tells me that it contains the following claims:
It looks like the claims_field_mappings on SAMLMemberExtension being a static variable is causing this issue. Whenever I remove the static from the assignment, my Member::config()->claims_field_mappings will look like:
Which would - in my theory resolve the errors I receive due to unassigned claims.
I've looked into the option to 'ignore' those specific warnings, which is not possible with a yaml configuration.
Please let me know what your thoughts are about this.
I am not looking into mapping those additional fields (yet).
---
Name: mysamlsettingsAfter: '#samlsettings'
---
SilverStripe\SAML\Extensions\SAMLMemberExtension:
claims_field_mappings: null
---
Name: mysamlsettings_secondAfter: '#mysamlsettings'
---
SilverStripe\SAML\Services\SAMLConfiguration:
strict: truedebug: falseexpect_binary_nameid: falseallow_insecure_email_linking: true# security related SP / IdP and Security are removed since they do not involve this question.SilverStripe\SAML\Extensions\SAMLMemberExtension:
claims_field_mappings:
'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name': 'Email'
I haven't had a reason to resolve the errors until now. I just tried your proposal, and this seems to solve the issue.
Somehow I would have imagined that some kind of setter / override would be a prettier solution, but for now this works.
Thanks!
P.s. I'm not quite sure if this resolves this ticket, I would think that other people could also be encountered with such case and there is no documentation in this SAML module about this (yet).
Hi there!
I have a simple question regarding the standard supplied
claims_field_mappings
which is provided by theSAMLMemberExtension
. In our use case we are connected to an Azure AD instance.The configuration of this case contains the following mapping since we only require the email address.
The SAML authentication flow is now working as desired, but the following entries are added to the error log:
I would expect that, by overriding the
claims_field_mappings
, those errors should not appear.When I debug the contents of
Member::config()->claims_field_mappings
it tells me that it contains the following claims:It looks like the
claims_field_mappings
onSAMLMemberExtension
being a static variable is causing this issue. Whenever I remove the static from the assignment, myMember::config()->claims_field_mappings
will look like:Which would - in my theory resolve the errors I receive due to unassigned claims.
I've looked into the option to 'ignore' those specific warnings, which is not possible with a yaml configuration.
Please let me know what your thoughts are about this.
I am not looking into mapping those additional fields (yet).
Composer version(s):
SS4: SilverStripe framework v4.8
SAML: v2.1.2
The text was updated successfully, but these errors were encountered: