Skip to content

Commit 05c2241

Browse files
authored
Merge pull request #615 from headwAI-GmbH/add-missing-trusted-header
docs: add missing WEBUI_AUTH_TRUSTED_GROUPS_HEADER var
2 parents 567c8e6 + b168d4c commit 05c2241

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

docs/features/sso/index.mdx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,20 @@ When the `WEBUI_AUTH_TRUSTED_EMAIL_HEADER` environment variable is set, Open Web
138138

139139
For example, setting `WEBUI_AUTH_TRUSTED_EMAIL_HEADER=X-User-Email` and passing a HTTP header of `X-User-Email: example@example.com` would authenticate the request with the email `example@example.com`.
140140

141-
Optionally, you can also define the `WEBUI_AUTH_TRUSTED_NAME_HEADER` to determine the name of any user being created using trusted headers. This has no effect if the user already exists.
141+
Optionally, you can also define the `WEBUI_AUTH_TRUSTED_NAME_HEADER` to determine the name of any user being created using trusted headers. This has no effect if the user already exists.
142+
If `WEBUI_AUTH_TRUSTED_NAME_HEADER` is not set, the email address is used as user name.
143+
144+
145+
#### Group Management
146+
147+
You can use the `WEBUI_AUTH_TRUSTED_GROUPS_HEADER` environment variable to synchronize user groups in Open WebUI. Set this variable to the name of the HTTP header that will contain a comma-separated list of group names for the authenticated user.
148+
149+
When a request is authenticated via `WEBUI_AUTH_TRUSTED_EMAIL_HEADER`, and the trusted groups header is set and present, Open WebUI will update the user's group memberships to match the groups listed in the header.
150+
151+
- The header value must be a comma-separated list of group names (e.g., `X-User-Groups: admins,editors,users`).
152+
- If the header is not present or empty, the user's group memberships will not be updated.
153+
- User will be unassigned from groups not present in the header.
154+
- Group creation via trusted header is not automatic; only existing groups in Open WebUI will be assigned.
142155

143156
### Tailscale Serve
144157

docs/getting-started/env-configuration.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2570,6 +2570,11 @@ If the OAuth picture claim is disabled by setting `OAUTH_PICTURE_CLAIM` to `''`
25702570
- Description: Defines the trusted request header for the username of anyone registering with the
25712571
`WEBUI_AUTH_TRUSTED_EMAIL_HEADER` header. See [SSO docs](/features/sso).
25722572

2573+
#### `WEBUI_AUTH_TRUSTED_GROUPS_HEADER`
2574+
2575+
- Type: `str`
2576+
- Description: Defines the trusted request header containing a comma-separated list of group memberships for the user when using trusted header authentication. See [SSO docs](/features/sso).
2577+
25732578
### Google
25742579

25752580
See https://support.google.com/cloud/answer/6158849?hl=en

0 commit comments

Comments
 (0)