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

Implement OIDC Group support for Google Workspace (was GSuite) issuer/provider #1861

Open
SLoeuillet opened this issue Apr 9, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@SLoeuillet
Copy link

Why

As Google is a bad organisation, they did provide the minimal to comply with OpenID (email, username, family, name)
But it lacks something that most other providers gives : groups in which the user is registered.

That would mean that using OIDC with Google Workspace would allow everyone on the domain to have VPN access.

Google could give the group, but not as a standard claim, but by calling some Google Cloud APIs.
Either calling Admin.Directory API, with a service account which has full delegation on the doman or by calling Cloud.Identity API, which is newer, and gives back the list of groups.

Description

In case of Google Workspace is used, and allowed_groups filtering is used in the headscale configuration, dynamically add the required priorietary scope that kindly ask for groups.
Then, once OIDC response comes, get the JWT auth token and query groups by using CloudIdentity API

@SLoeuillet SLoeuillet added the enhancement New feature or request label Apr 9, 2024
@SLoeuillet
Copy link
Author

This has been implemented in PR #1858

@SLoeuillet
Copy link
Author

Note that there are 2 ways to get groups : direct groups & transient groups. I did choose the direct groups.

Another thing : Google Cloud Go bindings are immature, that's why I went calling the API instead of using those

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant