Skip to content

RFC: OIDC-backed multi-user self-hosted environments #12278

Closed as not planned
Closed as not planned

Description

@LegandaryRa

Could T3 Code support multi-user self-hosted environments using an existing OIDC provider such as Authentik, Keycloak, Okta, or Entra ID?

A possible flow:

  1. Enter the environment URL.
  2. Select Sign in.
  3. Authenticate through the configured OIDC provider.
  4. Receive a normal T3 environment session.
  5. Access only the projects/resources assigned to that user.

Pairing could remain available as an alternative.

Multi-user execution

Ideally, authenticated users would also have separate execution contexts.

Work started by one user should use that user's own:

  • Codex / Claude / other provider subscriptions
  • Git and GitHub/Forgejo credentials
  • SSH keys
  • MCP authentication
  • CLI configuration and credentials
  • filesystem/environment context

Conceptually:

OIDC user
   ↓
T3 environment session
   ↓
user-specific execution context
   ↓
Codex / Claude / OpenCode / shell / tools

The implementation could use OS users, per-user workers, containers, or another isolation mechanism. The important part is that credentials and processes are not implicitly shared between users.

This would allow one T3 environment to serve multiple users while preserving attribution and isolation.

Authorization

A minimal first version could support:

  • environment administrators
  • project members
  • user attribution for threads/actions

More complex RBAC or OIDC group mapping could come later.

Relationship to T3 Connect

This would not require replacing Clerk or changing hosted T3 Connect.

OIDC could simply be another environment-level authentication method:

Pairing → environment session
OIDC    → environment session

Related request

This is related to #3736, but at a different layer.

#3736 covers an external access gateway in front of T3.

This proposal is for the T3 environment itself to understand user identity and potentially provide isolated per-user execution.

Questions

  • Does first-class multi-user identity fit the intended direction for remote environments?
  • Would OIDC belong at the environment level or through a self-hosted Connect integration?
  • Could provider configuration and execution eventually become user-scoped rather than environment-global?

Activity

  1. juliusmarminge commented on Sep 17, 2026

    @juliusmarminge
    Member

    Triage

    Type: Feature request / RFC (not a bug)
    Actionable as a code change: No
    Duplicate: No (related, different layer: #3736)

    Well-written RFC asking for environment-level OIDC (Authentik / Keycloak / Okta / Entra) as a pairing alternative, plus per-user authorization and isolated execution (provider subscriptions, Git/SSH/MCP credentials, filesystem). Current T3 Code is single-tenant: one environment process, capability-scoped device sessions, host-global providers and files. This is a large product/architecture change, not a scoped fix.

    CONTRIBUTING.md and the issue templates send feature proposals to Ideas discussions, not issues. README: big features are not being accepted.

    What this is not

    Not a duplicate of #3736. That issue is an external access gateway (Cloudflare Access / Pangolin) in front of existing pairing. This RFC wants the environment itself to understand IdP identity and isolate users. The author’s layer split is correct.

    Also not T3 Connect / Clerk. Connect is a separate cloud-identity + relay trust boundary that still mints a normal environment session. A relay token is never an environment login.

    Current architecture (from main)

    1. Environment auth is pairing + capability scopes, not user identity. Bootstrap methods are only one-time-token and desktop-bootstrap. The authenticated principal is { sessionId, subject, method, scopes } — subject is a session-replacement key, not an IdP user. Scopes are environment capabilities (orchestration:*, terminal:operate, access:*, …), not project ACLs. Docs state the environment does not implement a general-purpose OAuth authorization server.

    2. The environment is a single filesystem / credential boundary. Provider processes, terminals, Git, and project files belong to the server. Projects are organizational, not sandboxes. There is no project-membership or per-user actor model in contracts/persistence.

    3. Provider accounts are environment- or instance-scoped, not OIDC-user-scoped. Host CLIs on the environment’s PATH / $HOME (optional provider-instance profiles ≠ multi-user OS isolation).

    4. T3 Connect does not provide this. Connect uses Clerk at the relay, then the environment mints a one-time bootstrap → normal environment session. Work still runs as the environment’s single host context.

    Answers to the RFC questions (code-backed, not a product commitment)

    Question Finding
    Does first-class multi-user identity fit remote-environment direction? Not in the current model. Remote access is “your machine, your agents,” with device pairing and optional Connect.
    OIDC at environment vs self-hosted Connect? Neither exists as a user-OIDC login. Environment bootstrap is pairing only. Authentik/Keycloak on the environment means a new bootstrap method and a real authorization server — out of scope today.
    Can providers/execution become user-scoped? Not without a new isolation layer (OS users / workers / containers + authz). Platform rewrite, not an auth endpoint.

    Related

    Recommended action

    Converting this issue to an Ideas discussion per CONTRIBUTING. We are not looking for an implementation PR.

    Even a “minimal” OIDC → session + admin/member attribution without isolation is still a large change, and would be misleading if members still share Claude/Codex/Git credentials and the filesystem — which is the RFC’s own concern. Attribution-only OIDC and isolated multi-user environments should stay separate if the design continues in Ideas.

  2. added
    enhancement
    via-triage
    wontfix
    on Sep 17, 2026
  3. juliusmarminge commented on Sep 17, 2026

    @juliusmarminge
    Member

    Closing as out of contribution scope for a large platform RFC. Please continue in Ideas if you want to refine the design — we are not looking for an implementation PR. Related gateway ask remains #3736.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementvia-triagewontfix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions