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

Add support for GSuite SSO Groups membership #2455

Closed
klizhentas opened this issue Dec 22, 2018 · 6 comments
Closed

Add support for GSuite SSO Groups membership #2455

klizhentas opened this issue Dec 22, 2018 · 6 comments
Assignees

Comments

@klizhentas
Copy link
Contributor

Description

Currently GSuite SSO is supported via standard OIDC SSO flow, but groups membership is not exposed via claims. Fix this by adding support.

No special resource type is required, here is how OIDC resource with extra claims
looks like:

kind: oidc
version: v2
metadata:
  name: gsuite
spec:
  redirect_url: https://localhost:3080/v1/webapi/oidc/callback
  client_id: exampleclientid11234.apps.googleusercontent.com
  client_secret: examplesecret
  issuer_url: https://accounts.google.com
  scope: ['https://www.googleapis.com/auth/admin.directory.group.readonly', 'openid', 'email']  
  claims_to_roles:
    - {claim: "groups", value: "[email protected]", roles: ["clusteradmin"]}

IMPORTANT: the groups will be fetched only if admins include special auth scope https://www.googleapis.com/auth/admin.directory.group.readonly in the scopes of the connector as shown in the example above.

Additional setup steps

@klizhentas klizhentas self-assigned this Dec 22, 2018
klizhentas added a commit that referenced this issue Dec 22, 2018
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.
@kontsevoy
Copy link
Contributor

kontsevoy commented Dec 26, 2018

@klizhentas the scope seems to be a constant, no? People will reasonably ask what else can be put there

@kontsevoy
Copy link
Contributor

nevermind

klizhentas added a commit that referenced this issue Jan 17, 2019
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.
klizhentas added a commit that referenced this issue Jan 17, 2019
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.
@klizhentas klizhentas assigned kontsevoy and unassigned klizhentas Jan 17, 2019
@klizhentas klizhentas added this to the 3.2 "Pleasanton" milestone Jan 17, 2019
@klizhentas
Copy link
Contributor Author

converted this to doc ticket

klizhentas added a commit that referenced this issue Jan 17, 2019
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.
@klizhentas klizhentas reopened this Jan 17, 2019
@aberoham aberoham self-assigned this Feb 15, 2019
@aberoham
Copy link
Contributor

@klizhentas Do all Teleport users within the given Google organization need to have permissions on https://www.googleapis.com/auth/admin.directory.group.readonly? Or just the OAuth Client ID/service account?

@kontsevoy
Copy link
Contributor

@klizhentas see above. I will need this for the docs too.

benarent added a commit that referenced this issue Jun 20, 2019
@benarent
Copy link
Contributor

Closing issue as added in #2787

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants