Skip to content

fix: keep admins away from others' tasks #515

Open

Description

@uniqueg

Current behaviour

Tasks are owner-only for list, get and cancel, admins included (pro_tes/config.yaml, policies
users-create-list-tasks and owners-get-cancel-tasks; pro_tes/access_control/model.conf has no admin
override). But the base config also gives the role admin FOCA's permissions API
(admins-list-add-permissions, admins-manage-permissions on /admin/access-control/permissions), and that API
accepts any rule of the model. An admin can POST a g2 rule user:<self>, owner, /ga4gh/tes/v1/tasks/<id> (and
the same for <id>:cancel), or a p rule for admin on /ga4gh/tes/v1/tasks/:id, and then read and cancel any
task, with its inputs, outputs, environment and logs. docs/access-control.md ("Permissions API") says so
("admins could make themselves owners of the tasks of others"), but nothing prevents it.

Decided in elixir-cloud-aai/generic-issues#124: tasks are visible to their owner only, admins included; operators
handle stuck or abusive tasks through the infrastructure, not the TES API; groups only decide who may run tasks.

Proposal

  • Base config: turn the permissions API off (security.access_control.api_enabled: false) and drop the rules
    admins-list-add-permissions and admins-manage-permissions. Rules come from the config (and overlays) only.
  • Startup warning if an overlay turns the API back on, naming the risk. Once FOCA can refuse rule types or paths
    in the API (feat(access-control): limit permissions API rules foca#821), refuse g2 rules and rules on task paths there instead.
  • Keep the role admin for /usage, /usage/reports and /tasks/{id}/provenance (routing metadata and
    resource totals, no task content), and list these in the docs as everything admins can see.
  • Upgrade: rules stored earlier through the API stay in the database (policy_rules) and stay in effect.
    Document how to list and delete them; check in the upgrade notes for g2 owner rules whose subject isn't the
    task's creator.
  • Docs: access control (roles table, task ownership, permissions API section), configuration reference, Helm
    values if the chart exposes the setting, upgrading notes.

Acceptance criteria

  • With the base config, an admin token gets 404 on /admin/access-control/permissions and has no way to
    list, get or cancel another user's task (API tests).
  • With the API turned on by an overlay, startup logs a warning.
  • Usage, usage reports and provenance still work for admins (existing tests green).
  • Docs and upgrade notes updated.

Activity

  1. added
    priority: high
    status: triage
    type: auth
    type: security
    workload: hours
    ecp-wp4: M4.4
    on Nov 23, 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

    ecp-wp4: M4.4priority: highstatus: triagetype: authtype: securityworkload: hours

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions