mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[GH-ISSUE #17113] feat: Adjust OAUTH_BLOCKED_GROUPS to allow regex patterns #56836
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?
Originally created by @wggcch on GitHub (Sep 1, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17113
Check Existing Issues
Problem Description
Current Bahavior:
When I use an oauth provider for Login and Group management, I can also set a List of local Groups, that will not be updated by oauth with the ENV: OAUTH_BLOCKED_GROUPS
This can be a List of Names like ['my-group', 'another-group'] and so on.
But what if I have already created multiple groups in OpenWebui and do not want to exclude every single group?
Desired Solution you'd like
Support Regex Matching to partly allow more or even all groups to be blocked from OAuth overwriting
within oauth.py
That than would allow us to use the ENV like this:
OAUTH_BLOCKED_GROUPS = ['local-.*'] -> block all groups to be overwritten from oauth provider starting with `local-'
Alternatives Considered
No response
Additional Context
We are currently using keycloak as our oauth provider and we have had some Groups managed within Openwebui. We wanted to sync our keycloak Groups into open webui but than we saw, that this would overwrite our open webui managed Groups.
For every open webui managed group we now need to
@tjbck commented on GitHub (Sep 1, 2025):
PR welcome!