Skip to content

Per user module access restriction #505

Backlog
Backlog

Description

@Bohreromir

Restrict access to specific modules to configured users

  • User name from COCKPIT_AUTH_USER_CLAIM and the groups from COCKPIT_AUTH_GROUPS_CLAIM.
  • COCKPIT_AUTH_GROUPS_CLAIM accepts a dotted path for nested claims. The claim must be a list of strings; anything else counts as no groups, with a warning at sign-in.
  • COCKPIT_AUTH_USER_CLAIM replaces the Trino user claim.
  • Without OIDC there are no groups: only "*" matches. Startup warning if OIDC is off and rules name groups.
  • Rules: OIDC groups only, exact match. "*" = all signed-in users; empty or missing list = nobody. Same for module, connection and user-connection rules.
  • .groups and storage.userConnections.groups default to ["*"]
  • Module switched off: 404, Module denied: 403
  • Navigation shows only allowed modules.
Action Allowed when
module.use user is in <module>.groups
storage.userConnections.use user connections enabled and user is in storage.userConnections.groups
storage.connection.use user is in the admin connection's groups
  • No bucket or path rules in the cockpit. Read/write per bucket is decided by the target system (the key's permissions or the IAM role).
  • later we can extend authorize to use OPA for example
type Action = 'module.use' | 'storage.connection.use' | 'storage.userConnections.use';
authorize(user: { id; username; groups }, action: Action, resource): Promise<boolean>

Activity

  1. added theissue type on Nov 27, 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

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions