mirror of
https://github.com/open-webui/open-terminal.git
synced 2026-11-05 01:27:28 +00:00
[PR #189] feat: add Docker user allowlist for multi-user provisioning #157
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/open-terminal#157
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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-terminal/pull/189
Author: @decarvalhoaa
Created: 10/10/2026
Status: 🔄 Open
Base:
main← Head:feat/docker-allowed-users📝 Commits (1)
2003241feat: add Docker user allowlist for multi-user provisioning📊 Changes
5 files changed (+144 additions, -1 deletions)
View changed files
📝
CHANGELOG.md(+6 -0)📝
README.md(+10 -0)📝
open_terminal/env.py(+15 -0)📝
open_terminal/utils/user_isolation.py(+16 -1)➕
tests/test_user_isolation.py(+97 -0)📄 Description
Add an optional Docker user allowlist for multi-user mode
In multi-user mode,
ensure_os_user()adds every newly provisioned user to the group that owns/var/run/docker.sock. With the socket mounted, every terminal user gets Docker access, and an operator who wants Docker for only some users has to patch the image.This PR adds an optional setting:
user1,user2sanitize_username(), includingOPEN_TERMINAL_USER_PREFIX), the same names shown in the provisioning logs.user_isolation.pyand adds the setting toenv.py. It adds no dependencies and does not changeentrypoint.shor the default behaviour.Tests
Adds
tests/test_user_isolation.py(pytest is already in thedevgroup). It mocks the privileged calls and a fake socket, and covers: allowlist unset, an authorized user, an unauthorized user, several comma-separated users with whitespace, and an empty value. Without the change, 3 of the 5 tests fail. With it, all 5 pass.ruff checkpasses on the new test file.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.