-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fetch groups for GSuite SSO. #2456
Conversation
@kontsevoy @russjones please review the PR and the referenced ticket - it includes documentation base too. |
The code looks fine to me as always. Can we please make sure that the reference ticket won't get auto-closed when you mege? It needs to stay open with 'documentation' label. |
@kontsevoy sure, that's the plan |
@russjones ping |
lib/auth/oidc.go
Outdated
for { | ||
if count > MaxPages { | ||
warningMessage := "Truncating list of teams used to populate claims: " + | ||
"hit maximum number pages that can be fetched from GitHub." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"hit maximum number pages that can be fetched from GSuite."
count := 0 | ||
var groups []string | ||
var nextPageToken string | ||
collect: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd break this out into it's own function, seems like a lot packed into a single function.
4d7cf56
to
8867468
Compare
Fixes #2455 This commit adds support for fetching groups for GSuite SSO logins via OIDC connector interface. If OIDC connector has a special scope: `https://www.googleapis.com/auth/admin.directory.group.readonly` teleport will fetch user's group membership and populate groups claim.
8867468
to
bfbeb24
Compare
Fixes #2455 This commit adds support for fetching groups for GSuite SSO logins via OIDC connector interface. If OIDC connector has a special scope: `https://www.googleapis.com/auth/admin.directory.group.readonly` teleport will fetch user's group membership and populate groups claim.
* Fetch groups for GSuite SSO. (#2456) Fixes #2455 This commit adds support for fetching groups for GSuite SSO logins via OIDC connector interface. If OIDC connector has a special scope: `https://www.googleapis.com/auth/admin.directory.group.readonly` teleport will fetch user's group membership and populate groups claim. * Pass kubernetes groups to the remote cluster. (#2484) This commit allows remote cluster to reference the kubernetes groups coming from the roles of the main cluster in the trusted clusters configuration. For example, main cluster can have a user with a role 'main' and kubernetes groups: kube_groups: ['system:masters'] and SSH logins: logins: ['root'] Remote cluster can choose to map this 'main' cluster to it's own: 'remote-admin' cluster in the trusted cluster config: role_map: - remote: 'main' local: 'remote-admin' The role 'remote-admin' of the remote cluster can now be templated to use the main cluster role main logins and kubernetes_groups using variables: logins: ['{{internal.logins}}'] kubernetes_groups: ['{{internal.kubernetes_groups}}'] This is possible because teleport now encodes both values in X509 certificate metadata and remote cluster passes these values as 'internal' traits to the template engine.
Fixes #2455
This commit adds support for fetching
groups for GSuite SSO logins via
OIDC connector interface.
If OIDC connector has a special scope:
https://www.googleapis.com/auth/admin.directory.group.readonly
teleport will fetch user's group membership and populate
groups claim.