Skip to content

Poiesis: ECP_CLN group-based authorization (OIDC authentication already exists) #21

Done

Description

@uniqueg

Why?

This is step 7 of the plan. Poiesis is already an OIDC resource server as of v0.2.0: poiesis/api/auth.py validates JWTs against one issuer via JWKS, with settings POIESIS_AUTH_ENABLED, POIESIS_AUTH_OIDC_ISSUER, ..._AUDIENCE, ..._REQUIRED_SCOPES and ..._PRINCIPAL_CLAIM. It has no group-membership authorization.

Upstream: https://github.com/JaeAeich/poiesis (maintainer @JaeAeich).

Authorization policy (agreed). Users must be members of the LS Login (Perun) group ECP_CLN (organization ELIXIR, "ELIXIR Compute Platform group for cloud apps") or any of its subgroups. The subgroups are currently ADMIN, BioHackCloud, BioHackCloud Admins, ELIXIR-CH, ELIXIR-CZ, ELIXIR-DE, ELIXIR-FI, ELIXIR-GR, ELIXIR-NL and OSS, plus the new EOC-Compute for approved compute users (elixir-cloud-aai/krini#45). Membership is managed as LS Login VO groups and released to services as entitlement values, typically in the eduperson_entitlement claim.

Do not hardcode a guessed string. Take the exact value(s) from the userinfo response or token of a test member; expect something like urn:geant:lifescience-ri.eu:group:<vo>:ECP_CLN…#…. Also check whether subgroup members carry the parent ECP_CLN entitlement. If they don't, accept ECP_CLN plus anything under ECP_CLN: by prefix. Note too whether the claim appears in the access token or only via userinfo, since that determines whether a userinfo lookup is needed.

How?

  1. Add optional settings for required entitlements, e.g.:

    • POIESIS_AUTH_OIDC_REQUIRED_ENTITLEMENTS (CSV, supporting exact match and prefix);
    • POIESIS_AUTH_OIDC_ENTITLEMENTS_CLAIM, dotted path, reusing the existing claim-path resolver.

    Return 403 for non-members. If LS Login only releases entitlements via userinfo, add a cached userinfo lookup.

  2. Open the upstream issue or PR and link it here, then release it as a v0.2.x patch.

  3. Upgrade the deployments to that release and configure LS Login plus the group check:

    • CZ: poiesis.dyn.cloud.e-infra.cz (27 Nov: c506d9d, EOC-Compute only, smoke test passed; registry 5OW5HQ)
    • FI: poiesis.rahtiapp.fi (test-poiesis.rahtiapp.fi was retired on 21 Nov, FI: retire the unused anonymous TES deployments #109)
    • NL: not applicable: NL deploys TESP, not Poiesis (uniqueg, 27 Nov)

Acceptance criteria

  • With the setting enabled (required entitlement urn:geant:lifescience-ri.eu:group:elixir:ECP_CLN:EOC-Compute#aai.lifescience-ri.eu), Poiesis accepts an LS Login access token whose eduperson_entitlement carries that entitlement (audience: the Krini client), and API keys minted with such a token. With either, the holder can create tasks and list, get and cancel their own tasks; with the token, they can also mint API keys. Tokens without ECP_CLN:EOC-Compute (including members of ECP_CLN or ECP_CLN:ADMIN only) get 403; service-info stays public. (Accepted path verified live at FI (U6b) and CZ (Z6, 27 Nov); the deny path is checked at the decision service and in tests. The live check with a non-member account moves to Check 403 for non-members on all EOC services #159.)
  • Every Poiesis deployment in the checklist runs with LS Login plus the group check.

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 🚀

Activity

  1. added
    priority: low
    type: auth
    workload: days
    ecp-wp4: M4.4
    topic: poiesis
    on Oct 14, 2026
  2. uniqueg commented on Nov 11, 2026

    @uniqueg
    MemberAuthor

    Upstream issues posted 2026-11-11:

  3. added
    status: triage
    and removed on Nov 13, 2026
  4. moved this from Ready to In review in ELIXIR On-Cloudon Nov 18, 2026
  5. self-assigned this
    on Nov 18, 2026
  6. added
    status: in progress
    and removed
    status: triage
    on Nov 18, 2026
  7. uniqueg commented on Nov 21, 2026

    @uniqueg
    MemberAuthor

    Poiesis at https://poiesis.rahtiapp.fi now runs with LS Login authorization through the tes-authz decision service (Poiesis dev at 9cc2832, tes-authz dev after #16; owner-only task visibility, EOC-Compute and ADMIN may run tasks).

    Smoke test on 2026-11-21 01:01 UTC, with a Krini access token:

    • service-info 200; requests without a token or with an invalid token get 401;
    • a task was created, ran to COMPLETE, could be retrieved and was listed among the caller's own tasks;
    • the decision service logged the allow decisions for CreateTask and GetTask.

    Not tested yet: the 403 path with an account in neither group (no test account available; covered by the decision checks in the deployment and the unit tests).

  8. moved this from In review to Backlog in ELIXIR On-Cloudon Nov 25, 2026
  9. added
    status: blocked
    and removed
    status: in progress
    on Nov 25, 2026
  10. uniqueg commented on Nov 26, 2026

    @uniqueg
    MemberAuthor

    FI done on 2026-11-26: poiesis.rahtiapp.fi runs Poiesis fc72419 with LS Login and the group check through tes-authz a1d5c34 (EOC-Compute only, D-416; ADMIN alone and non-members are denied in all 36 decision cases). Smoke test with an API key minted from a Krini token: a task completes, cancel works, and the audit log records create/get/cancel as allowed by the decision service. A live 403 for a non-member account is not yet shown (no such test account at hand).

  11. added
    status: in progress
    and removed
    status: blocked
    status: in progress
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ecp-wp4: M4.4priority: lowtopic: poiesistype: authworkload: days

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions