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

WIP for google group mapping #1

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jackHay22
Copy link
Collaborator

@jackHay22 jackHay22 commented Mar 28, 2023

Here is my current understanding of how we should organize Google workspace OIDC group mapping.

Process

  • If "groups" is provided as a scope to the Google Goth provider, recursively search for groups the user belongs to
  • Create a list of the groups and attach them to goth.User.RawData with key "groups"
  • The following code was added to Gitea by Map OIDC groups to Orgs/Teams go-gitea/gitea#21441:
func getClaimedGroups(source *oauth2.Source, gothUser *goth.User) container.Set[string] {
	groupClaims, has := gothUser.RawData[source.GroupClaimName]
	if !has {
		return nil
	}

	return claimValueToStringSet(groupClaims)
}

TODO

  • Where does source.GroupClaimName come from on the Goth side?
  • Do we use group.Email or group.Name? (Reference)
  • Authentication for admin service

@jackHay22 jackHay22 requested a review from garymoon March 28, 2023 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant