Multi-user support: per-user session visibility behind an SSO proxy #3389
gerd-collab
started this conversation in
Ideas
Replies: 1 comment
|
Adding a concrete use case + implementation direction, because this is exactly the multi-user shape we are trying to make upstreamable. For our first slice, I think this should be treated as application-level ownership, not strong OS/container isolation:
Suggested PR decomposition:
I wrote a fuller tracking draft in a fork issue here, keeping it upstream-safe because this repository currently has GitHub Issues disabled: ChatArch#1 The key point is that this does not require solving per-user shell/container isolation first. It would already address the Web product problem: users should not see or mutate each other's sessions, conversation history, or project/workspace history. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
When the Harness web UI is served behind an authentication boundary (e.g. Authelia
forward-auth, as documented in
packages/client/connection), every authenticateduser currently sees all sessions of the deployment and can open/continue any of
them. I propose per-user session isolation: each user sees, opens, and continues
only their own chats.
Why
self-host a shared instance behind SSO (Authelia, Authentik, etc.) and want the
same UX as Open WebUI: one deployment, many users, each with their own chat
history.
trustedHosts+privilegedHostsunlock the privileged plane for browsers behinda reverse-proxy authenticator). What is missing is the identity → data scoping
step.
Current behavior (verified in the code)
packages/identity/is only ananonymous telemetry correlation id ("does not represent an authenticated
account").
session.listreturns every session of the deployment; its request payload isjust a reserved
cursor(seepackages/host/apiproxy/src/api/sessions.schema.ts).(cwd, sessionId)— no owner dimension:JSONL at
<root>/<project-dir>/<session-id>/session.jsonl(
packages/session/session-persistence-jsonl/src/format.ts), or the SQLitebackend. There is no tenant/user column and no per-user path segment.
agents run
bash/filesystem tools on the host — can also access the underlyingfiles directly.
Proposed change
(
Remote-User/X-Forwarded-User), behind the existing trust fence; make theheader name configurable.
(e.g.
<root>/users/<user>/<project>/<session>/…for JSONL, or anownercolumnfor SQLite).
session.list,session.search, and sessioncreation/open/continuation by the authenticated user;
sessionIds only resolvewithin the user's own namespace.
behavior (single operator, existing data untouched); document a migration path
for existing global sessions.
Acceptance criteria
session.list/session.searchshow only the current user'ssessions.
just UI hiding).
Scope note / related
sandboxing of
bash/filesystem tools, quotas, approval scoping) is a separate,larger topic worth its own discussion.
upvote/contribute there instead.
All reactions