Open Edx SAML User Attribute Error

Hi,

I am trying to Login to my Open Edx using SAML

SP: Open Edx, which is configured as SP

Idp: SimpleSAMLPHP

but getting following error on page http://myopenedxsite.com/auth/complete/tpa-saml/ , once controls comes back to SP after successful authentication from idp

out = self.run_pipeline(pipeline, pipeline_index, *args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social_core/backends/base.py”, line 108, in run_pipeline
result = func(*args, **out) or {}
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social_core/pipeline/social_auth.py”, line 9, in social_uid
return {‘uid’: backend.get_user_id(details, response)}
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social_core/backends/saml.py”, line 283, in get_user_id
uid = idp.get_user_permanent_id(response[‘attributes’])
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social_core/backends/saml.py”, line 46, in get_user_permanent_id
self.conf.get(‘attr_user_permanent_id’, OID_USERID)
KeyError: u’urn.oid:0.9.2342.19200300.100.1.1’

How can i fix it ?

SAML Response
<saml:AuthnStatement AuthnInstant=“2019-10-10T13:48:37Z” SessionNotOnOrAfter=“2019-10-10T21:48:37Z” SessionIndex="_b91b334a9254483ee87940b402fa93f84020af3388">
saml:AuthnContextsaml:AuthnContextClassRefurn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml:AuthnContextClassRef></saml:AuthnContext></saml:AuthnStatement>
saml:AttributeStatement<saml:Attribute Name=“uid” NameFormat=“urn:oasis:names:tc:SAML:2.0:attrname-format:basic”><saml:AttributeValue xsi:type=“xs:string”>101</saml:AttributeValue>
</saml:Attribute><saml:Attribute Name=“name” NameFormat=“urn:oasis:names:tc:SAML:2.0:attrname-format:basic”><saml:AttributeValue xsi:type=“xs:string”>mac</saml:AttributeValue>
</saml:Attribute><saml:Attribute Name=“email” NameFormat=“urn:oasis:names:tc:SAML:2.0:attrname-format:basic”><saml:AttributeValue xsi:type=“xs:string”>mac@example.com</saml:AttributeValue>
</saml:Attribute><saml:Attribute Name=“username” NameFormat=“urn:oasis:names:tc:SAML:2.0:attrname-format:basic”><saml:AttributeValue xsi:type=“xs:string”>user02</saml:AttributeValue>
</saml:Attribute></saml:AttributeStatement></saml:Assertion></samlp:Response>

Please help !

1 Like

Please refer Post (third party authentication with saml provider error)