mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 04:16:03 -05:00
[PR #15031] [CLOSED] feat: Add Google Cloud Identity API support for OAuth group-based roles #10487
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/15031
Author: @bdruth
Created: 6/16/2025
Status: ❌ Closed
Base:
main← Head:feat/google-oauth-groups📝 Commits (3)
a909fd9feat: Add Google Cloud Identity API support for OAuth group-based roles64ce040fix google cloud identity query stringcc6a1a7update tests for adjusted query string & payload📊 Changes
4 files changed (+2759 additions, -2432 deletions)
View changed files
➕
backend/open_webui/test/test_oauth_google_groups.py(+266 -0)📝
backend/open_webui/utils/oauth.py(+158 -28)➕
docs/oauth-google-groups.md(+95 -0)📝
uv.lock(+2240 -2404)📄 Description
See discussion: https://github.com/open-webui/open-webui/discussions/15030
Summary
Enables Google Workspace group-based role assignment by integrating with Google Cloud Identity API to fetch user groups in real-time.
Addresses the limitation where Google Workspace doesn't include group membership claims in OAuth JWT tokens, preventing Open WebUI from assigning admin roles based on Google group membership.
Problem Solved
Currently, Google Workspace users can only receive default roles in Open WebUI regardless of their group memberships. Organizations cannot use their existing Google Workspace group structure (like "admin@company.com") for Open WebUI role management.
Solution
https://www.googleapis.com/auth/cloud-identity.groups.readonlyscopeConfiguration Example
Key Features
searchTransitiveGroupsAPIFiles Changed
backend/open_webui/utils/oauth.py- Enhanced OAuth manager with Google Cloud Identity API integrationbackend/open_webui/test/test_oauth_google_groups.py- Comprehensive test suite (7 tests)docs/oauth-google-groups.md- Complete setup documentationpyproject.toml&uv.lock- Addedpytest-asynciodependencyTest Coverage
Backward Compatibility
cloud-identity.groups.readonlyscope present🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.