Skip to content

Commit d2388c0

Browse files
authored
Merge branch 'dev' into main
2 parents bf776d2 + 1044c02 commit d2388c0

File tree

4 files changed

+271
-16
lines changed

4 files changed

+271
-16
lines changed

docs/features/scim.mdx

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
---
2+
sidebar_position: 20
3+
title: "🔐 SCIM 2.0: Automated User Provisioning"
4+
---
5+
6+
# SCIM 2.0 Support
7+
8+
Open WebUI supports SCIM 2.0 (System for Cross-domain Identity Management) for automated user and group provisioning from identity providers like Okta, Azure AD, and Google Workspace.
9+
10+
## Overview
11+
12+
SCIM is an open standard that allows for the automation of user provisioning. When enabled, your identity provider can automatically:
13+
- Create users in Open WebUI when they're added to your organization
14+
- Update user information when changes are made
15+
- Deactivate users when they're removed from your organization
16+
- Manage group memberships
17+
18+
## Configuration
19+
20+
SCIM is configured entirely through environment variables. There is no UI configuration for SCIM settings.
21+
22+
### Environment Variables
23+
24+
Configure SCIM by setting these environment variables:
25+
26+
- **`SCIM_ENABLED`**: Set to `true` to enable SCIM support (default: `false`)
27+
- **`SCIM_TOKEN`**: The bearer token for SCIM authentication (required when SCIM is enabled)
28+
29+
:::warning Security Note
30+
The SCIM token should be a secure, randomly generated string. You can generate one using:
31+
```bash
32+
openssl rand -base64 32
33+
```
34+
Keep this token secure as it provides access to user management operations.
35+
:::
36+
37+
### Example Configuration
38+
39+
```bash
40+
# Enable SCIM
41+
export SCIM_ENABLED=true
42+
43+
# Set a secure token (replace with your own generated token)
44+
export SCIM_TOKEN="your-secure-token-here"
45+
```
46+
47+
## SCIM API Configuration
48+
49+
When configuring your identity provider, use the following settings:
50+
51+
- **SCIM Base URL**: `<your-openwebui-url>/api/v1/scim/v2/`
52+
- **Authentication**: Bearer Token
53+
- **Token**: `Bearer <your-scim-token>`
54+
55+
### Example for Popular Identity Providers
56+
57+
#### Okta
58+
1. In Okta, add the SCIM application
59+
2. Set the SCIM connector base URL to: `https://your-domain.com/api/v1/scim/v2/`
60+
3. Set authentication to "HTTP Header"
61+
4. Add Authorization header with value: `Bearer your-scim-token`
62+
63+
64+
## Supported SCIM Operations
65+
66+
Open WebUI's SCIM implementation supports the following operations:
67+
68+
### User Operations
69+
- **Create User** (`POST /Users`): Create a new user account
70+
- **Get User** (`GET /Users/{id}`): Retrieve user information
71+
- **Update User** (`PUT /Users/{id}`, `PATCH /Users/{id}`): Update user attributes
72+
- **Delete User** (`DELETE /Users/{id}`): Deactivate a user account
73+
- **List Users** (`GET /Users`): List all users with filtering support
74+
75+
### Group Operations
76+
- **Create Group** (`POST /Groups`): Create a new group
77+
- **Get Group** (`GET /Groups/{id}`): Retrieve group information
78+
- **Update Group** (`PUT /Groups/{id}`, `PATCH /Groups/{id}`): Update group membership
79+
- **Delete Group** (`DELETE /Groups/{id}`): Remove a group
80+
- **List Groups** (`GET /Groups`): List all groups with filtering support
81+
82+
### Supported Attributes
83+
84+
#### User Attributes
85+
- `userName`: The user's email address (required, unique)
86+
- `name.givenName`: First name
87+
- `name.familyName`: Last name
88+
- `emails`: Email addresses
89+
- `active`: User status (active/inactive)
90+
- `externalId`: External identifier from the identity provider
91+
92+
#### Group Attributes
93+
- `displayName`: Group name (required)
94+
- `members`: Array of user members
95+
- `externalId`: External identifier from the identity provider
96+
97+
## Filtering Support
98+
99+
The SCIM API supports filtering for both users and groups:
100+
101+
```
102+
GET /api/v1/scim/v2/Users?filter=userName eq "user@example.com"
103+
GET /api/v1/scim/v2/Groups?filter=displayName eq "Engineering"
104+
```
105+
106+
Supported filter operators:
107+
- `eq`: Equals
108+
- `ne`: Not equals
109+
- `co`: Contains
110+
- `sw`: Starts with
111+
- `ew`: Ends with
112+
- `pr`: Present (has value)
113+
- `gt`: Greater than
114+
- `ge`: Greater than or equal
115+
- `lt`: Less than
116+
- `le`: Less than or equal
117+
118+
## Troubleshooting
119+
120+
### Common Issues
121+
122+
1. **401 Unauthorized Errors**
123+
- Verify that `SCIM_ENABLED` is set to `true`
124+
- Check that the bearer token in your identity provider matches `SCIM_TOKEN`
125+
- Ensure the Authorization header format is: `Bearer <token>`
126+
127+
2. **404 Not Found Errors**
128+
- Verify the SCIM base URL ends with `/api/v1/scim/v2/`
129+
- Check that the path includes the `/api/v1` prefix
130+
131+
3. **User Creation Failures**
132+
- Ensure the `userName` field contains a valid email address
133+
- Check that the email is not already in use
134+
135+
### Testing SCIM Endpoints
136+
137+
You can test SCIM endpoints using curl:
138+
139+
```bash
140+
# Test authentication and list users
141+
curl -H "Authorization: Bearer your-scim-token" \
142+
https://your-domain.com/api/v1/scim/v2/Users
143+
144+
# Get a specific user
145+
curl -H "Authorization: Bearer your-scim-token" \
146+
https://your-domain.com/api/v1/scim/v2/Users/user-id
147+
148+
# Create a test user
149+
curl -X POST \
150+
-H "Authorization: Bearer your-scim-token" \
151+
-H "Content-Type: application/scim+json" \
152+
-d '{
153+
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
154+
"userName": "test@example.com",
155+
"name": {
156+
"givenName": "Test",
157+
"familyName": "User"
158+
},
159+
"emails": [{
160+
"value": "test@example.com",
161+
"primary": true
162+
}],
163+
"active": true
164+
}' \
165+
https://your-domain.com/api/v1/scim/v2/Users
166+
```
167+
168+
## Security Considerations
169+
170+
1. **Use HTTPS**: Always use HTTPS in production to protect the bearer token
171+
2. **Secure Token Storage**: Store the SCIM token securely and rotate it periodically
172+
3. **IP Allowlisting**: Consider restricting SCIM API access to your identity provider's IP addresses
173+
4. **Audit Logging**: SCIM operations are logged for security auditing
174+
175+
## Limitations
176+
177+
- Custom schema extensions are not currently supported
178+
- Bulk operations are not implemented
179+
- ETags for resource versioning are not supported
180+
181+
## Integration with SSO
182+
183+
SCIM works best when combined with SSO (Single Sign-On). A typical setup includes:
184+
1. SCIM for automated user provisioning
185+
2. OIDC for user authentication
186+
187+
This ensures users are automatically created and can immediately authenticate using their corporate credentials.
188+
189+
For SSO configuration, see the [SSO documentation](/docs/features/sso).

docs/features/sso/keycloak.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,4 @@ ENABLE_OAUTH_GROUP_MANAGEMENT=true
148148
# (Optional) Enable Just-In-Time group creation
149149
ENABLE_OAUTH_GROUP_CREATION=true
150150
# The claim key for groups in the token
151-
OAUTH_GROUPS_CLAIM=groups
151+
OAUTH_GROUP_CLAIM=groups

docs/getting-started/env-configuration.md

Lines changed: 77 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,19 @@ is also being used and set to `True`. Failure to do so will result in the inabil
146146

147147
- Type: `bool`
148148
- Default: `True`
149-
- Description: Controls whether admin users can export data.
149+
- Description: Controls whether admins can export data, chats and the database in the admin panel. Database exports only work for SQLite databases for now.
150150

151151
#### `ENABLE_ADMIN_CHAT_ACCESS`
152152

153153
- Type: `bool`
154154
- Default: `True`
155-
- Description: Enables admin users to access all chats. When disabled, admins can no longer access user's chats in the admin panel. If you disable this, you will likely want to also disable `ENABLE_ADMIN_EXPORT`, as the exports also contains user chats.
155+
- Description: Enables admin users to directly access the chats of other users. When disabled, admins can no longer accesss user's chats in the admin panel. If you disable this, consider disabling `ENABLE_ADMIN_EXPORT` too, if you are using SQLite, as the exports also contain user chats.
156156

157-
#### `ENABLE_ADMIN_WORKSPACE_CONTENT_ACCESS`
157+
#### `BYPASS_ADMIN_ACCESS_CONTROL`
158158

159159
- Type: `bool`
160160
- Default: `True`
161-
- Description: When disabled, admin users are treated like regular users for workspace access and only see knowledge bases, models, prompts, and tools they have **explicit permission to access** through the existing access control system. If set to `True`, admins have access to all created items in the workspace area regardless of access permissions.
161+
- Description: When disabled, admin users are treated like regular users for workspace access (models, knowledge, prompts and tools) and only see items they have **explicit permission to access** through the existing access control system. This also applies to the visibility of models in the model selector - admins will be treated as regular users: base models and custom models they do not have **explicit permission to access**, will be hidden. If set to `True` (Default), admins have access to **all created items** in the workspace area and all models in the model selector, **regardless of access permissions**.
162162

163163
#### `ENABLE_USER_WEBHOOKS`
164164

@@ -271,7 +271,7 @@ It is recommended to set this to a high single-digit or low double-digit value i
271271

272272
- Type: `bool`
273273
- Default: `False`
274-
- Description: Bypasses model access control.
274+
- Description: Bypasses model access control. When set to `true`, all users (and admins alike) will have access to all models, regardless of the model's privacy setting (Private, Public, Shared with certain groups). This is useful for smaller or individual Open WebUI installations where model access restrictions may not be needed.
275275

276276
#### `WEBUI_BUILD_HASH`
277277

@@ -663,6 +663,12 @@ The format for the JSON response is strictly:
663663
- Description: Specifies the code interpreter engine to use.
664664
- Persistence: This environment variable is a `PersistentConfig` variable.
665665

666+
#### `CODE_INTERPRETER_BLACKLISTED_MODULES`
667+
668+
- Type: `str` (comma-separated list of module names)
669+
- Default: None
670+
- Description: Specifies a comma-separated list of Python modules that are blacklisted and cannot be imported or used within the code interpreter. This enhances security by preventing access to potentially sensitive or system-level functionalities.
671+
666672
#### `CODE_INTERPRETER_PROMPT_TEMPLATE`
667673

668674
- Type: `str`
@@ -1988,13 +1994,19 @@ When enabling `GOOGLE_DRIVE_INTEGRATION`, ensure that you have configured `GOOGL
19881994
- Description: Maximum number of search results to crawl.
19891995
- Persistence: This environment variable is a `PersistentConfig` variable.
19901996

1991-
#### `WEB_SEARCH_CONCURRENT_REQUESTS`
1997+
#### `WEB_LOADER_CONCURRENT_REQUESTS`
19921998

19931999
- Type: `int`
19942000
- Default: `10`
1995-
- Description: Number of concurrent requests to crawl web pages returned from search results.
2001+
- Description: Specifies the number of concurrent requests used by the web loader to fetch content from web pages returned by search results. This directly impacts how many pages can be crawled simultaneously.
19962002
- Persistence: This environment variable is a `PersistentConfig` variable.
19972003

2004+
:::info
2005+
2006+
This environment variable was previously named "WEB_SEARCH_CONCURRENT_REQUESTS". If you were using the old name, please update your configurations to use "WEB_LOADER_CONCURRENT_REQUESTS" as the old variable name is now deprecated and will not be recognized. This renaming clarifies its function, as it specifically controls the concurrency of the web *loader* component that fetches content from search results, not the initial search engine query itself.
2007+
2008+
:::
2009+
19982010
#### `WEB_SEARCH_ENGINE`
19992011

20002012
- Type: `str`
@@ -3160,6 +3172,22 @@ If `OAUTH_PICTURE_CLAIM` is set to `''` (empty string), then the OAuth picture c
31603172
- Description: Specifies the LDAP attribute that contains the user's group memberships. `memberOf` is a standard attribute for this purpose in Active Directory environments.
31613173
- Persistence: This environment variable is a `PersistentConfig` variable.
31623174

3175+
## SCIM
3176+
3177+
#### `SCIM_ENABLED`
3178+
3179+
- Type: `bool`
3180+
- Default: `False`
3181+
- Description: Enables or disables SCIM 2.0 (System for Cross-domain Identity Management) support for automated user and group provisioning from identity providers like Okta, Azure AD, and Google Workspace.
3182+
- Persistence: This environment variable is a `PersistentConfig` variable.
3183+
3184+
#### `SCIM_TOKEN`
3185+
3186+
- Type: `str`
3187+
- Default: `""`
3188+
- Description: Sets the bearer token for SCIM authentication. This token must be provided by identity providers when making SCIM API requests. Generate a secure random token (e.g., using `openssl rand -base64 32`) and configure it in both Open WebUI and your identity provider.
3189+
- Persistence: This environment variable is a `PersistentConfig` variable.
3190+
31633191
## User Permissions
31643192

31653193
### Chat Permissions
@@ -3663,14 +3691,28 @@ More information about this setting can be found [here](https://docs.sqlalchemy.
36633691

36643692
:::
36653693

3694+
#### `DATABASE_ENABLE_SQLITE_WAL`
3695+
3696+
- Type: `bool`
3697+
- Default: `False`
3698+
- Description: Enables or disables SQLite WAL (Write-Ahead Logging) mode. When enabled, SQLite transactions can be managed more efficiently, allowing multiple readers and one writer concurrently, which can improve database performance, especially under high concurrency. **This setting only applies to SQLite databases.**
3699+
3700+
#### `DATABASE_DEDUPLICATE_INTERVAL`
3701+
3702+
- Type: `float`
3703+
- Default: `0.0`
3704+
- Description: Sets a time interval in seconds during which certain database write operations (e.g., updating a user's `last_active_at` timestamp) will be deduplicated. If a write operation is attempted within this interval for the same entity, it will be skipped. A value of `0.0` disables deduplication. Enabling this can reduce write conflicts and improve performance, but may result in less real-time accuracy for the affected fields.
3705+
36663706
### Redis
36673707

36683708
#### `REDIS_URL`
36693709

36703710
- Type: `str`
3671-
- Example: `redis://localhost:6379/0`
3672-
- Example with TLS: `rediss://localhost:6379/0`
3673-
- Description: Specifies the URL of the Redis instance for the app state.
3711+
- Description: Specifies the URL of the Redis instance or cluster host for storing application state.
3712+
- Examples:
3713+
- `redis://localhost:6379/0`
3714+
- `rediss://:password@localhost:6379/0` _(with password and TLS)_
3715+
- `rediss://redis-cluster.redis.svc.cluster.local:6379/0 ?ssl_cert_reqs=required&ssl_certfile=/tls/redis/tls.crt &ssl_keyfile=/tls/redis/tls.key&ssl_ca_certs=/tls/redis/ca.crt` _(with mTLS)_
36743716

36753717
:::info
36763718

@@ -3689,6 +3731,18 @@ When deploying Open WebUI in a multi-node/worker cluster with a load balancer, y
36893731
- Default: `26379`
36903732
- Description: Sentinel port for app state Redis.
36913733

3734+
#### `REDIS_CLUSTER`
3735+
3736+
- Type: `bool`
3737+
- Default: `False`
3738+
- Description: Connect to a Redis Cluster instead of a single instance or using Redis Sentinels. If `True`, `REDIS_URL` must also be defined.
3739+
3740+
:::info
3741+
3742+
This option has no effect if `REDIS_SENTINEL_HOSTS` is defined.
3743+
3744+
:::
3745+
36923746
#### `REDIS_KEY_PREFIX`
36933747

36943748
- Type: `str`
@@ -3723,7 +3777,7 @@ When deploying Open WebUI in a multi-node/worker cluster with a load balancer, y
37233777

37243778
- Type: `str`
37253779
- Default: `${REDIS_URL}`
3726-
- Description: Specifies the URL of the Redis instance for websocket communication. It is distinct from `REDIS_URL` and in practice, it is recommended to set both.
3780+
- Description: Specifies the URL of the Redis instance or cluster host for websocket communication. It is distinct from `REDIS_URL` and in practice, it is recommended to set both.
37273781

37283782
:::info
37293783

@@ -3742,6 +3796,18 @@ When deploying Open WebUI in a multi-node/worker cluster with a load balancer, y
37423796
- Default: `26379`
37433797
- Description: Sentinel port for websocket Redis.
37443798

3799+
#### `WEBSOCKET_REDIS_CLUSTER`
3800+
3801+
- Type: `bool`
3802+
- Default: `${REDIS_CLUSTER}`
3803+
- Description: Specifies that websocket should communicate with a Redis Cluster instead of a single instance or using Redis Sentinels. If `True`, `WEBSOCKET_REDIS_URL` and/or `REDIS_URL` must also be defined.
3804+
3805+
:::info
3806+
3807+
This option has no effect if `WEBSOCKET_SENTINEL_HOSTS` is defined.
3808+
3809+
:::
3810+
37453811
### Uvicorn Settings
37463812

37473813
#### `UVICORN_WORKERS`

docs/tutorials/integrations/langfuse.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
sidebar_position: 20
3-
title: "💥 Monitoring and Debugging with Langfuse"
3+
title: "🪢 Monitoring and Debugging with Langfuse"
44
---
55

66
# Langfuse Integration with Open WebUI
@@ -20,7 +20,7 @@ _Langfuse integration steps_
2020

2121
[Pipelines](https://github.com/open-webui/pipelines/) in Open WebUI is an UI-agnostic framework for OpenAI API plugins. It enables the injection of plugins that intercept, process, and forward user prompts to the final LLM, allowing for enhanced control and customization of prompt handling.
2222

23-
To trace your application data with Langfuse, you can use the [Langfuse pipeline](https://github.com/open-webui/pipelines/blob/d4fca4c37c4b8603be7797245e749e9086f35130/examples/filters/langfuse_filter_pipeline.py), which enables real-time monitoring and analysis of message interactions.
23+
To trace your application data with Langfuse, you can use the [Langfuse pipeline](https://github.com/open-webui/pipelines/blob/039f9c54f8e9f9bcbabde02c2c853e80d25c79e4/examples/filters/langfuse_v3_filter_pipeline.py), which enables real-time monitoring and analysis of message interactions.
2424

2525
## Quick Start Guide
2626

@@ -47,10 +47,10 @@ In the _Admin Settings_, create and save a new connection of type OpenAI API wit
4747

4848
### Step 4: Adding the Langfuse Filter Pipeline
4949

50-
Next, navigate to _Admin Settings_ -> _Pipelines_ and add the Langfuse Filter Pipeline. Specify that Pipelines is listening on http://host.docker.internal:9099 (as configured earlier) and install the [Langfuse Filter Pipeline](https://github.com/open-webui/pipelines/blob/main/examples/filters/langfuse_filter_pipeline.py) by using the _Install from Github URL_ option with the following URL:
50+
Next, navigate to _Admin Settings_ -> _Pipelines_ and add the Langfuse Filter Pipeline. Specify that Pipelines is listening on http://host.docker.internal:9099 (as configured earlier) and install the [Langfuse Filter Pipeline](https://github.com/open-webui/pipelines/blob/039f9c54f8e9f9bcbabde02c2c853e80d25c79e4/examples/filters/langfuse_v3_filter_pipeline.py) by using the _Install from Github URL_ option with the following URL:
5151

5252
```
53-
https://github.com/open-webui/pipelines/blob/main/examples/filters/langfuse_filter_pipeline.py
53+
https://github.com/open-webui/pipelines/blob/main/examples/filters/langfuse_v3_filter_pipeline.py
5454
```
5555

5656
Now, add your Langfuse API keys below. If you haven't signed up to Langfuse yet, you can get your API keys by creating an account [here](https://cloud.langfuse.com).

0 commit comments

Comments
 (0)