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 ability to get groups information for Google Workspace authentication source #33198

Open
andy-nix opened this issue Jan 10, 2025 · 0 comments
Labels
topic/authentication type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@andy-nix
Copy link

Feature Description

Unlike other auth providers Google Workspace doesn't provides information about users groups. This prevents using such awesome Gitea functionality as autoatically assigning administrators and org teams membership based on OAuth claims.

I want to propose to implement the same approach as currently implemented in Grafana project:

  1. Administrator can specify additional OAuth scope https://www.googleapis.com/auth/cloud-identity.groups.readonly to provide Gitea access to Google API that needed on next step. On login user would see consent screen with information that Gitea want to take information about his groups
  2. After that it is possible to use corresponded API https://cloud.google.com/identity/docs/reference/rest/v1/groups/list to retrieve list of user groups. So during login Gitea do request to this API with user identificator, receive list of groups and inject them as groups claim
  3. With information about groups Gitea administrator can configure authomatic permissions/membership mapping using approaches already implemented in Gitea

Reference to implementation and configuration process in Grafana project:

Screenshots

No response

@andy-nix andy-nix added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/authentication type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

2 participants