Skip to content

Design

The end state: all software follows the standards, and nothing is held back by what any product supports today. This page describes that, and nothing else. What we can show of it today, and why, is under Testbed limits.

Overview

Trust model

  • An identity provider vouches for users, and issues all tokens. Every service trusts it, and verifies its signatures by itself (R-S4). This page shows one. Across several, identity and authorization chaining (a draft) builds on the same exchange.
  • Services don't trust each other for anything about a user. What a service knows about a request is what the token says, and what the identity provider confirms.
  • Each token has one audience, the next service, and is of no use elsewhere (R-S1).
  • Services hold no standing credentials for users. They act within a request, with a token they've just obtained for the next hop (R-S2).
  • Nodes decide for themselves whom they accept (R-S5).

The flow

sequenceDiagram
    actor User
    participant Pt as Portal
    participant IdP as Identity provider
    participant G as Task gateway
    participant N as Compute node
    User->>Pt: Sign in
    Pt->>IdP: Authorization code with PKCE
    IdP-->>Pt: Token: sub=user, aud=portal
    Pt->>IdP: Exchange for the gateway
    IdP-->>Pt: Token: sub=user, aud=gateway, act=portal
    Pt->>G: Request, with the token for the gateway
    G->>IdP: Exchange for the node
    IdP-->>G: Token: sub=user, aud=node, act=gateway, act.act=portal
    G->>N: Request, with the token for the node
    N->>N: Validate, then apply its own policy
    N-->>G: 200, or 403 without the required group
    G-->>Pt: Response

A workflow system between the portal and the gateway adds one more exchange, and one more level of act. Claims in the diagram are shorthand: act is an object with its own sub, and act.act is nested in it.

Authentication

A user signs in once at the portal, with OpenID Connect, using the authorization code flow (OAuth 2.0, RFC 6749) with PKCE (RFC 7636). R-U1 follows, as everything after that is an exchange without the user.

Access tokens are JWTs in the profile of RFC 9068, so that a service can validate them offline: the signature, iss, aud, exp, nbf if present, and the type at+jwt or application/at+jwt. That's all a service must do, which is R-S9. Devices without a browser can use the device authorization grant (RFC 8628).

sub is a stable identifier without personal details (R-P2). Where operators of different sites mustn't be able to link a researcher's activity, the identity provider issues pairwise identifiers (OpenID Connect Core, section 8), one per site, at the cost of audits across sites needing its help. A token carries only what validation needs. Anything else a service may need about a user, it asks for (R-P1).

The portal may be a public client, without a client secret, or a confidential one (R-U5). The OAuth 2.0 security best current practice (RFC 9700) applies to both.

Delegation across hops

Each caller gets a new token for the next service, using OAuth 2.0 token exchange (RFC 8693). The subject stays the user, and the audience changes. The token it received never travels further.

The next hop is named with a resource indicator (RFC 8707). The identity provider only issues tokens for the targets registered for the client that asks, so a service can only reach what it was set up for (R-S6).

The token says who acts. The act claim (RFC 8693, section 4.1) names the exchanging service, and nests for each earlier one. The identity provider sets it, as it alone can vouch for it. The may_act claim (section 4.4) can restrict who may act.

Work that outlasts the request (R-U2, R-S3): the workflow system gets a refresh token (RFC 6749, section 6) from the exchange, limited to the next hop and to that run. No other service holds anything beyond a request. The grant behind it:

  • Consent once, explicitly. The researcher agrees when submitting the run, on a page of the identity provider that names the workflow system, what it may do on their behalf, and for how long. The portal asks for this with the offline_access scope (OpenID Connect Core, section 11, which requires consent for it) and the workflow system as resource (RFC 8707). Refreshing within the grant asks nothing more.
  • Bounded. The refresh token has an absolute lifetime: the expected length of the run, plus a margin, however often it's used. It rotates at each use, and the reuse of an old one revokes the whole grant (RFC 9700, section 4.14). Only the workflow system can redeem it, as a confidential client.
  • Least privilege downstream. The refresh token never leaves the workflow system. For each step, it gets a short-lived access token for the one service that step needs.
  • The researcher stays in control (R-P4). They can see the grant at the identity provider and withdraw it there. Cancelling the run revokes it (RFC 7009).
  • New consent only for something new: broader scopes, other services or more sensitive data, never because time has passed. A refresh can't widen the scope anyway (RFC 6749, section 6).
  • Delegation shows in tokens. Each token the workflow system obtains names it in act, as above, so that a node can tell that it acts for the researcher.

Token lifetimes are short and set per service. Each hop can cache tokens per received token and audience until shortly before expiry, so that a cached token never names the wrong path in its act claims.

Authorization

Group memberships and capabilities are entitlements in the forms of AARC-G069 and AARC-G027. The identity provider releases them per service, so each service sees only those that concern it (R-P1). It shows users what it releases at sign-in, and lets them look up later what went to which service (R-P4).

Each node asks for them, at user info (OpenID Connect Core, section 5.3) or token introspection (RFC 7662), rather than finding them in a token that passes through other services.

Each node applies its own policy (R-S5). A service in the middle only decides who may use it.

Refusals are distinct (R-U4), as in HTTP semantics (RFC 9110): 401 for a token that isn't valid, and 403 for a valid user the node doesn't accept. All users with a valid account can sign in, independently of any group (R-U3).

Attribution

Provenance. The chain of nested act claims in the token at a node says which services the request came through, signed by the identity provider (R-S8). A service that finds itself in the chain can refuse the request, which also stops loops (R-S7).

Accounting. sub and the act chain give the user, and the portal or workflow system, for each use of a node. The outermost level of act names the last caller, and the innermost where the request came in (R-S10).

Tracing. All services pass on a W3C Trace Context traceparent, so one request can be followed across logs (R-S11). Logs hold decoded claims at most, and never tokens (R-P3).