-
Notifications
You must be signed in to change notification settings - Fork 78
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
How to ensure only users part of an organization can login ? #228
Comments
Using "social login providers" for organizations wasn't really an intended use case. Our expectation is that generic SAML or OIDC are used to connect to organization-owned IdPs that are the source of truth for who is and who is not a member of an organization. That way, we don't do filtering after the identity brokering on email domain, as we assume that the IdP controls access.
This is true for the default Keycloak behavior also. Creating an "account" linked to an identity broker is not considered "user registration" in Keycloak either.
Yes. You would have to create a custom authenticator and put it in the flows that you assign to the "Post login flow" and "First login flow" in the IdP.
Same as above. You would have to create a custom authenticator and put it in the flows that you assign to the "Post login flow" and "First login flow" in the IdP. However, I can see the following as potentially valuable additions, so we'd look at a PR:
|
Hello, regarding this topic, there is a possible workaround with "active organization authenticator". Upon login, it will ask the user to select an organization> However, if the user have no organizations, he will get an error message and it should prevent him to connect: Else, indeed, a custom authenticator which enforce an user to have an organization seems the way to go (just a validation which check the user belongs to any organization). keycloak-orgs/src/main/java/io/phasetwo/service/auth/ActiveOrganizationAuthenticator.java Lines 123 to 138 in 11f6135
best |
Hello.
I was doing some tests by integrating some generics identity provider (let's say github) and setting it as IDP for an organization.
I was expecting the authentication to fail as the mail would not match the domain from the organization but I could successfully login, it would not login with the user of the org (let's say
[email protected]
) but would create a new user[email protected]
instead, not part of any organization)User registration
set to off so I would not expect any user from being created automatically.Also as it looks like the social IDP integrations are singleton, it is usually okay to have a single Github integration for all the organizations ?
Thanks
The text was updated successfully, but these errors were encountered: