Skip to content

A Workspace-only user cannot manage their own credentials (email, GitHub token, MCP keys, 2FA) #3497

Open

Description

@webmixgamer

Summary

Since #3488, a Workspace-only user account cannot manage its own credentials. Every self-service credential route authenticates through get_current_user and is unmarked, so the operator floor refuses all of them:

Route(s) What the person can't do
/api/users/me/email* change their sign-in email
/api/users/me/github-pat set or clear their personal GitHub token
GET /api/mcp/keys, POST /api/mcp/keys/{id}/revoke, DELETE /api/mcp/keys/{id} (routers/mcp_keys.py) list, revoke or delete their own MCP keys
2FA status, enrol, recovery codes, disable (after sign-in) manage their second factor

Enrolling in 2FA during sign-in still works, because it runs on a challenge token, not get_current_user. So when 2FA is enforced, nobody is locked out.

The keys matter most. A key minted before the upgrade still resolves at the Workspace doors (get_portal_principal rejects only agent keys), so a leaked key keeps scripting the Workspace as that person, and only an admin can revoke it (by id). The upgrade note documents this.

Options

  • Mark the self-service credential routes @workspace_route, for browser sessions only. The Workspace would then also need a place to show them.
  • Or, when an account is lowered to user, deactivate its MCP keys and leave the other self-service credentials to an admin.

Acceptance criteria

  • decide per route: mark it for browser sessions, or hand it to an admin
  • a user can stop their own keys, or lowering an account to user stops them
  • tests on the routes that change; the roles doc follows

Widened after the review of #3488 (originally just the MCP keys).

Activity

  1. added
    priority-p3
    type-bug
    theme-security
    complexity-low
    on Oct 9, 2026
  2. changed the title [-]A Workspace-only `user` cannot list or revoke their own MCP keys, which still reach the Workspace[/-] [+]A Workspace-only `user` cannot manage their own credentials (email, GitHub token, MCP keys, 2FA)[/+] on Oct 10, 2026
  3. added
    status-ready
    on Oct 12, 2026
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

    complexity-lowpriority-p3status-readytheme-securitytype-bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions