Skip to content

feat(access-control): add resource ownership #341

Closed
2 of 2 issues completed
Closed

Description

@uniqueg

Why?

cloud-registry implements per-resource ownership itself: the creating user becomes owner, owners grant user and group roles (owner, maintainer) on a resource, the last owner can't be removed, and admins see everything. proTES needs the same for tasks (the submitting user owns a task and lists only their own tasks; a task submitted by an allow-listed service client on a user's behalf belongs to that user, see #340), and TRS-Filer and DRS-Filer will need it later. Each app writing it again is costly and error-prone.

How?

  1. Extract the generic parts of cloud-registry's implementation (cloud_registry/ga4gh/registry/permissions.py and related access-control code) into FOCA's access control: resource owners and roles, user and group subjects, the last-owner rule, and helpers to filter listings to the resources a subject may see.
  2. Keep the API surface (endpoints for listing and changing permissions) optional, so apps can expose it under their own paths.
  3. Migrate cloud-registry to it afterwards (separate issue there).

Acceptance criteria

  • An app can declare a resource type as owned and get ownership on create, role management, owner-filtered listings and admin override from FOCA; tests cover it.
  • Documented, with cloud-registry's behaviour as the reference.

Sub-issues

Sub-issues

2 of 2 Issues completed
Loading 2 sub-issues

Activity

  1. added
    priority: medium
    status: triage
    type: auth
    type: feature
    workload: days
    on Oct 21, 2026
  2. added
    status: blocked
    and removed
    status: triage
    on Oct 21, 2026
  3. added
    status: in progress
    and removed
    status: blocked
    on Oct 22, 2026
  4. uniqueg commented on Oct 22, 2026

    @uniqueg
    MemberAuthor

    Done in #378 and #382.

  5. removed
    status: in progress
    on Oct 22, 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: mediumtype: authtype: featureworkload: days

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions