Repository navigation
Closed
Labels
ecp-wp4: M4.1ELIXIR Compute Platform WP4 milestone/deliverable this issue contributes topriority: highHigh prioritytype: authRelated to authorization or authenticationtype: securityRelated to securityworkload: daysLikely takes days to resolve
Description
Why?
The agreed permission model for the registry is:
- anyone can browse;
- any logged-in LS Login user can register a service and becomes its owner;
- only the owner, or
ECP_CLN:ADMIN, can change or delete it.
The current code (cloud_registry/ga4gh/registry/server.py) has no ownership model at all:
PUT /services/{id}andDELETE /services/{id}only require any valid token. Any logged-in user can overwrite or delete any entry.POST /service-info, which sets the registry's own metadata, is equally open to any logged-in user.- The GA4GH spec file (
cloud_registry/api/20201108.e0358db.openapi.yaml) declares a globalsecurity: bearerAuth, withdisable_auth: Falseinconfig.yaml. The read endpoints (GET /services,/services/{id},/services/types) therefore probably require a token as well, which contradicts public browsing. Verify against production with an unauthenticatedcurl.
This matters for M4.1 now: once real operators register their deployments (#63), any logged-in user could wipe the list. (An admin-set "verified" flag for proTES discovery is a separate, low-priority follow-up: #64.)
How?
- Make the read endpoints public by overriding
security: []on the GET operations, and keep writes authenticated. - On
POST /services/PUT(create), store the creator'ssub(and display name/email from the token or userinfo, for the UI) as owner. Keep this in a registry-specific field or side collection rather than breaking the GA4GHServiceschema. Expose it in GET responses, e.g., as an extension field, if strict response validation allows; otherwise via an additional endpoint. - Allow
PUT/DELETEon existing entries only for the owner orECP_CLN:ADMIN(403otherwise). RestrictPOST /service-infotoECP_CLN:ADMIN. - Admin role: membership in
ECP_CLN:ADMIN, read from the LS Login entitlement claim. Take the exact entitlement string from a real admin's token or userinfo; don't guess the format. - Migrate existing entries: they have no owner. Populate the Cloud Registry: owners register their own deployments, admins remove placeholder entries generic-issues#29 handles cleanup.
- Tests for every permission path. Update the docs.
Acceptance criteria
- Unauthenticated
GETon services and types works. - A logged-in user can create an entry and becomes its owner. Another non-admin user gets
403onPUT/DELETE.ECP_CLN:ADMINcan modify anything. - Only
ECP_CLN:ADMINcan post service-info.
Dependencies: none.
Part of the ELIXIR Compute Platform WP4 sprint (M&Ds due end of December 2026).
If you want to work on this issue:
- Assign yourself (if someone is already assigned, ask them first or pick another one)
- Move the issue to "In progress" on the project board
- Start working 🚀
Metadata
Metadata
Assignees
Labels
ecp-wp4: M4.1ELIXIR Compute Platform WP4 milestone/deliverable this issue contributes topriority: highHigh prioritytype: authRelated to authorization or authenticationtype: securityRelated to securityworkload: daysLikely takes days to resolve
Type
Projects
- StatusShow more project fieldsDone
Activity
uniqueg commentedon Oct 16, 2026
Ideally, addressing this should NOT require any code changes. Rather, it should make use of (Py)Casbin in the underlying FOCA archetype: https://github.com/elixir-cloud-aai/foca, as documented here: https://raw.githubusercontent.com/elixir-cloud-aai/foca/refs/heads/dev/docs/access_control/README.md.
As such, the solution should consist of a draft PR that includes a minimally modified app configuration, along with the model file and any other necessary configuration files referenced in the modified app configuration parts. The configuration and generated files MUST be tested against the stated acceptance criteria in a test deployment that incorporates the proposed configuration.
In addition to the above-stated acceptance criteria and behaviors, the solution must also support:
PUToperations on the corresponding registered service resource, but NOTDELETEoperationsuniqueg commentedon Oct 20, 2026
Update after a design review (2026-10-20). The implementation from #66 will be recreated as a new PR (its first commits are unsigned, which the
devruleset doesn't allow) and extended. Changes and clarifications to the plan above:GETresponses (deviation from step 2).GET /servicesis public, so owners in it would publish users' LS Login IDs (and names/emails) to everyone, and anownersfield would extend the GA4GHServiceresponse, which we keep exactly as specified. Instead:GET /me(authenticated) returns the caller's user ID, whether they are an admin, and their roles on services, so that the UI knows what the user may edit;GET /services/{serviceId}/permissions(owners and admins) shows display names where known, stored from user info when a role is granted to the current user.urn:geant:lifescience-ri.eu:group:elixir:ECP_CLN:ADMIN#aai.lifescience-ri.eu. The app refuses to start without an admin mapping unlesscustom.access_control.require_admin: falseis set explicitly (also checked by the Helm chart).409(also for admins), so that services don't end up without owners by accident.verify_audience: Falseis removed from the default config, so deployments must setaudienceto the client IDs of the apps that call the registry (FOCA refuses to start otherwise). Otherwise, tokens issued for any LS Login app could be replayed against the registry.POST /service-info(admins only): kept here, but the endpoint will be removed by feat!: serve service info from config only #100 (service info from config only).