https://linen.dev logo
OIDC gating
# general
d
Hey Coders, I have set up the OpenID Connect for signing in to Coder and anybody with an account from my domain can log in. I wanted to know if there's a way to be able to control that via Cloud IAM? On GCP, for instance?
p
hey @Dandi, I'm unfamiliar with IAM, could you maybe describe a bit more?
from what I understand you want to only allow users with a specific domain to log in?
d
Hey @Phorcys not exactly with a specific domain but with a specific role within that domain? So IAM allows you to create roles and assign them to different users. Is there a way to extend that so that Coder would check the roles first and if approved would grant access?
p
I don't know, let me look
there's ``CODER_OIDC_EMAIL_DOMAIN`` for domains
there is also a group sync feature that requires an enterprise license, which lets you map OIDC groups to coder groups : https://coder.com/docs/v2/latest/admin/auth#group-sync-enterprise
but I don't think there's anything that lets you explicitly define that group X and Y should have access
maybe @Ben knows more
b
Yeah, there are a few options: - Leverage group sync to allow any user from your identity provider to log in, but restrict which groups can access templates - Change your "client" in your identify provider to restrict access to what groups can log in. This has nothing to do with Coder, but can prevent log-ins from unauthorized groups - Use
OIDC_EMAIL_DOMAIN
to restrict logins to users on specific groups. We don't plan on adding a first-class feature in Coder to restrict sign-in by group. We may add a feature where you can disable signups overall and manually add OIDC users. Hope that helps!
And let me know if you're hoping for something different, specifically if you have some other platform (e.g. GitLab) that manages this differently and works better for your use case.
2 Views