Merged
Conversation
Contributor
Author
|
@Eugeny I think this one is ready! We're running it internally now and it seems to be working! |
Member
|
Sorry for the delay - I'll be able to test this in a week or so |
|
Any luck @Eugeny ? |
6629574 to
7c01b09
Compare
Contributor
Author
|
Rebased! |
SteezyCougar
added a commit
to SteezyCougar/warpgate
that referenced
this pull request
Mar 23, 2026
Co-authored-by: Eugene <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TLDR is that auto-role provisioning doesn't work with google oauth out the box since google doesn't natively expose groups. That means we have to use a google service account to do a lookup on the user to see what groups they are part of.
OIDC)
Setup
Requires a GCP service account with domain-wide delegation and admin.directory.group.readonly scope. New optional
fields on the Google provider: service_account_email, service_account_key, admin_email, role_mappings.
Backward compatibility
All new fields are optional. Existing configs work unchanged. RoleMapping uses #[serde(untagged)] so both "group":
"role" and "group": ["role1", "role2"] work.
Config example
sso_providers:
- name: google
auto_create_users: true
default_credential_policy:
http: ["sso"]
ssh: ["web"]
mysql: []
postgres: ["web"]
provider:
type: google
client_id: "..."
client_secret: "..."
service_account_email: "$GOOGLE_SA_EMAIL"
service_account_key: "$GOOGLE_SA_KEY"
admin_email: "[email protected]"
role_mappings:
"[email protected]": "engineering"
"[email protected]": ["warpgate:admin", "engineering"]