Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shibboleth auth provider: return an identifier if identifier_field params is defined #41

Closed
wants to merge 1 commit into from

Conversation

jouvin
Copy link
Contributor

@jouvin jouvin commented Jan 4, 2021

The Indico documentation suggests that it is a good idea to use an LDAP identity provider, when you have one like AD, with a Shibboleth auth provider, to benefit from the group definitions coming from LDAP. Unfortunately it doesn't work because the LDAP identity provider is expecting the auth provider to return an identifier attribute in the AuthInfo object (as does the LDAP auth provider) but the Shibboleth auth provider doesn't.

This PR proposes to use the identifier_field parameter, normally used by identity providers, in the Shibboleth auth provider params as an indication that the AuthInfo identifier attribute must be defined (with the Shibboleth attributed defined by the value of identifier_field). If this parameter is undefined, the behaviour of the Shibboleth auth provider is unchanged.

This PR has been tested successfully at IJCLab. Note that the limitation is that every user authenticated through Shibboleth must has a matching account in LDAP (AD in our case). Supporting authentication for local and remote users through Shibboleth (eduGAIN for example) and using LDAP as the identity provider requires a modification of the LDAP provider (or a custom one) to build the identity from AuthInfo attributes provided by Shibboleth when there is no LDAP match...

…ram is defined

- Allow to use the Shibboleth auth provider with the LDAP identity provider that requires the identifier to be defined
return self.multipass.handle_auth_success(AuthInfo(self, **attributes))

# Define 'identifier' attribute if 'identifier_field' is defined.
# Required to use a LDAP identity provider with the SSO auth provider.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would make more sense to make the identifier key on the ldap side configurable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I basically agree... But looking at the modification involved, I found easier to do it in the Shibboleth provider... That said, I could look again because it took me some time to understand that it was necessary to change the UID field too and the identifier part may be trivial (it was my initial implementation in fact !)

@jouvin
Copy link
Contributor Author

jouvin commented Jan 4, 2021

Replaced by #42.

@jouvin jouvin closed this Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants