Repository navigation
Error when using SSSD user federation with GitHub identity provider #19418
Unanswered
yann-soubeyrand
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello,
We’re using SSSD user federation (with FreeIPA servers) and GitHub identity provider. We want that a new Keycloak local account be created for users authenticating using GitHub which don’t have an account in our FreeIPA. However, we get an SSSD exception:
My understanding of the GitHub first login authentication flow is that it will first check if the user already exists using SSSD and then create a local user if not. However, I see in the code that the behaviour is to raise an exception (the exception above) if the user doesn’t exist:
getUserByUsernamefunction is calledkeycloak/federation/sssd/src/main/java/org/keycloak/federation/sssd/SSSDFederationProvider.java
Lines 72 to 74 in a45b5dc
then
findOrCreateAuthenticatedUserkeycloak/federation/sssd/src/main/java/org/keycloak/federation/sssd/SSSDFederationProvider.java
Lines 88 to 111 in a45b5dc
then
importUserToKeycloakkeycloak/federation/sssd/src/main/java/org/keycloak/federation/sssd/SSSDFederationProvider.java
Lines 113 to 131 in a45b5dc
and finally
getUserwhich raises the exceptionkeycloak/federation/sssd/src/main/java/org/keycloak/federation/sssd/api/Sssd.java
Lines 104 to 115 in 548827b
This behaviour seems to differ from the LDAP user federation:
getUserByUsernamereturnsnullwhen the user doesn’t existkeycloak/federation/ldap/src/main/java/org/keycloak/storage/ldap/LDAPStorageProvider.java
Lines 532 to 539 in 548827b
Is there a technical reason behind these behavioural differences or is it something that should be fixed?
All reactions