Hi,
I am getting an 500 internal server error on SAML authentication with idp.
SP: Open edx ginkgo version
Idp: SimpleSAMLPHP identity provider.
i had configured an Idp using SimpleSAMLPHP in one of my development server then i had open edx installed in another server. There i configured open edx SAML via django admin.
I am able to get Idp login button at my open edx Login page, once i click on that button it redirects me to my idp server user authentication page, once i successfully enter userâs credentials it Redirects back me to Open edx http://myexampleopenedx.com/auth/complete/tpa-saml/ page, where i am getting 500 internal error.
When i check edx.log file i got following error.
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â
may be this is some kind of user attribute error, please help me to fix it.
Configuration done in Django admin > Provider Configuration (SAML IdPs) > add new provider and enter following configuration.
Identity Provider Type: Standard SAML provider
Backend name: tpa-saml
Idp slug: tpa-saml
Entity ID: http://<mysite.com>/simplesaml/saml2/idp/metadata.php
Metadata source: http://<mysite.com>/simplesaml/saml2/idp/metadata.xml
User ID Attribute: urn.oid:0.9.2342.19200300.100.1.1
Full Name Attribute:
Rest attribute i left blank.
Part of SAML Response:
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>