Repository navigation
Description
Why?
M4.4 asks for OAuth2-based access control "from client at least to the gateway". The Cloud Components call TES and WES services from the browser, so each request must carry the logged-in user's access token, the services validate it (issuer, signature, expiry, client, compute group), and they act as that user (task ownership). The audience question is settled: services accept tokens issued to Krini's client by listing Krini's client ID (deployment configuration, no Krini code).
How?
- Token for the components (decided): tokens stay in the
httpOnlycookies of feat(auth): add OIDC login and access tiers #43; the components get the access token through a same-origin route, e.g.GET /auth/api/token→{access_token, expires_at}(Cache-Control: no-store, no CORS, only for a valid session). The components get the token from a callback per request, not once at setup:- WES: a
RestWesProvider(or subclass) that addsAuthorization: Bearer …per request (v2 provider pattern, see Cloud Components: support authenticated requests (bearer token) in the TES and WES clients cloud-components#442 discussion). - TES: the same, once
@elixir-cloud/teshas providers (Cloud Components: migrate@elixir-cloud/testo the v2 provider architecture cloud-components#443); until then whatever Cloud Components: support authenticated requests (bearer token) in the TES and WES clients cloud-components#442 offers. - Keep the token in memory only; never in
localStorage, URLs or logs.
- WES: a
- Refresh: shortly before
exp, renew on the server: with a refresh token (rotated) if the provider issues one to Krini's client, otherwise by silent sign-in (prompt=none, works while the provider session lasts; fall back to a top-level redirect where browsers block third-party cookies). No refresh tokens in the browser. - On
401: renew once and retry the request once; if it fails again, ask the user to log in again. On403: show "you don't have compute access" with the entry point of feat(auth): link to a compute access request #45 (non-members) or the service's problemdetail. - Where the token goes, and where not:
- only to services from the verified registry list over
https(feat: browse services from a registry #40), a gateway or, directly, a verified TES/WES backend; - never to the registry's public reads, never to unlisted URLs, never the ID token;
- no service credentials for user submissions anywhere.
- only to services from the verified registry list over
- Document which services must list Krini's client ID (audience or client allowlist) and that access tokens must be RFC 9068 JWTs (
typ: at+jwt) if a service checks it.
Acceptance criteria
- Task and workflow submissions to a gateway and to at least one WES service carry the user's bearer token and succeed; the same requests without a token are rejected by those services.
- A session survives token expiry while the provider session lasts (refresh or silent sign-in), without losing the page.
- After a
401, exactly one renew and one retry; then a login prompt. - No token is sent to registry reads or to services outside the verified list (unit tests).
Dependencies: #43, #40; elixir-cloud-aai/cloud-components#442 (and elixir-cloud-aai/cloud-components#443 for TES). Services: bearer validation in proTES (elixir-cloud-aai/protes#201) and the WES services (elixir-cloud-aai/generic-issues#18, elixir-cloud-aai/generic-issues#19).
Successor of elixir-cloud-aai/tes-dashboard#34 (the TES Dashboard is retired in favour of Krini).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
uniqueg commentedon Oct 28, 2026
Update on point 1: elixir-cloud-aai/cloud-components#442 is closed. Authentication must use the provider pattern of the Cloud Components; there will be no token property on the components.
RestWesProvider) and passes it to the components asprovider. Since fix: make provider requests overridable cloud-components#485, REST providers send every request through an overridablefetch(input, init), so the subclass addsAuthorization: Bearer …per request, with the token from the callback (GET /auth/api/token).@elixir-cloud/teshas providers (Cloud Components: migrate@elixir-cloud/testo the v2 provider architecture cloud-components#443). Please don't build a TES workaround in the meantime.src/lib/authenticated-cloud-registry.tson theai-post-deploybranch of cloud-registry-ui (token only on calls that need it, none on public reads).docs: fix findings of the automated review
AnonymousXC commentedon Nov 16, 2026
With the v2 architecture of the TES and WES cloud components, bearer tokens are sent to the
cloud-components. I strongly believe that the retry logic should be implemented within the cloud component itself. In case of a failure, the cloud component should provide a callback that redirects the user to the login page.@uniqueg, please do share your thoughts on this.
For now, I am closing this issue. I'll reopen it if we decide that any changes are still needed on the Krini side.