Skip to content

feat(access-control): opt in to privileged roles #502

Closed

Description

@uniqueg

Why?

FOCA grants privileged roles (e.g. admin, via access_control.group_mapping or the admin groups) whenever the token's groups contain the matching entitlement. Users in an admin group therefore act as admins on every request, even for everyday tasks. That violates the principle of least privilege: mistakes made as a "user" have admin effect, and UIs can't offer a normal user view to admins.

What?

  • An option to make chosen roles opt-in (e.g. access_control.opt_in_roles: [admin]). Those roles only apply to requests that ask for them; all other roles and group memberships apply as usual.
  • A conventional, documented way for requests to ask, e.g. a request header (X-Request-Roles: admin or similar; check for an established convention first). Asking for a role the subject doesn't hold has no effect. Asking never grants anything the token doesn't already entitle.
  • Helpers that tell apps both which opt-in roles a subject may use and which are active on this request, so that /me-style endpoints can report both (e.g. admin_available and admin).
  • The default keeps today's behaviour (no opt-in roles), so existing apps are unaffected.

Acceptance criteria

  • With the option set, an admin's request without the opt-in gets regular-user permissions (plus their other group roles); with the opt-in, it gets admin permissions.
  • Apps can tell which opt-in roles are available and which are active.

Needed by elixir-cloud-aai/cloud-registry (admin mode) and its UI.

Activity

  1. added
    priority: high
    status: triage
    type: auth
    type: feature
    workload: days
    on Oct 25, 2026
  2. added
    status: in progress
    and removed
    status: triage
    on Oct 26, 2026
  3. removed
    status: in progress
    on Oct 26, 2026
  4. added this to the v0.18.0 milestone on Oct 26, 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

    priority: hightype: authtype: featureworkload: days

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions