Repository navigation
Description
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-permissionsandadmins-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), refuseg2rules and rules on task paths there instead. - Keep the role
adminfor/usage,/usage/reportsand/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 forg2owner 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
404on/admin/access-control/permissionsand 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.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsBacklog
Activity