T1 Delegated call chain¶
Description¶
One login, then one exchange per hop, up to the node. This is the central question: can the chain carry a user's identity, with tokens that are only good for the next service? The first exchange against LS Login happens here.
Runs against: both. On the mock, it only shows that the commands work, as aud and client_id come from our mock/oidc.json.
Expectations¶
- Login gives
typ: at+jwt,audwith the client's ID (our own observation, 2026-10-20), asubthat is the same for the same account (the LS Login team, 2026-11-03; compared in T4), and a refresh token, asoffline_accessis requested. - After each exchange,
subhasn't changed, andaudholds the next hop's ID and, according to the LS Login team (2026-11-19, A19), the exchanging client's ID as well. Ifaudholds only the next hop's ID, record that as a difference. - A call through the gateway gives 200: the gateway sees its ID in
aud, the node sees its own, with the samesubandtraceparent, hop limit 8 then 7, andact: null. Without the group, the node answers 403, or 502 withrefused: userinfoif user info gives no answer. The rows are still valid, and T3 goes into why. - Through the orchestrator, too: 200 (or as above) over three services, with
audchanging at each. - A token with only a URL in
audis accepted by the gateway, but LS Login refuses its next exchange, which the gateway reports as 502. This follows from theaudrule (A3). - Exchanged tokens pass the same checks as in FOCA.
For the public client, no outcome is expected.
Steps¶
Provider and clients¶
Provider lslogin, ls_login_rules_emulated: false, four or five clients (five with the public client), and token exchange among the grant types. Note which of entitlements and eduperson_entitlement are in scopes_supported and claims_supported: the node reads both claims (T3). No testbed rule applies from here on: refusals are LS Login's own, with refused_by: provider.
Login: user to client¶
The session shows a URL. Copy it into a browser, as a container can't open one, and log in with account A. It returns to http://localhost:18994/callback, which Compose forwards to the session. At the consent page, note what it lists, including whether it mentions offline access or how long the service may act (Delegated access), and don't deselect entitlements.
Hop 1: client to gateway¶
@gateway stands for the gateway's client ID. If that's refused, try the same with --resource:
If only --resource works, set TESTBED_TARGET_PARAM=resource in lslogin.env and restart the services.
If the registration app or the exchange refuses a bare client ID, stop and raise it: see the first question below.
The URL form of the same hop:
tb> exchange to-gw-url --as client --from user --resource @gateway.url
tb> call gateway --token to-gw-url
Hop 2: gateway to node¶
tb> call gateway --token to-gw --save direct --traceparent 00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01
The gateway validates the token, exchanges it for the node, and forwards the request. The result has one row per service. This is also the first real check that exchanged tokens pass FOCA's checks.
Hop 2: which form names the node¶
The gateway's own exchange names the node as TESTBED_TARGET_PARAM says, by default its bare client ID (audience). If the gateway's registration only lists the node's URL form, hop 2 fails with refused: exchange. Either way, try each form as the gateway:
tb> exchange t1-node-id --as gateway --from to-gw --audience @node
tb> exchange t1-node-res --as gateway --from to-gw --resource @node
tb> exchange t1-node-url --as gateway --from to-gw --resource @node.url
tb> exchange t1-node-both --as gateway --from to-gw --audience @node --resource @node.url
tb> show t1-node-id
tb> call node --token t1-node-id
Use show and call node on one that worked, in place of t1-node-id. Then set TESTBED_TARGET_PARAM for T2-T5 in lslogin.env, and restart the services: audience if the ID works in audience, resource if it only works in resource, resource-url if only the URL form does, both if only both together do. With resource-url, the gateway also gets a token with only its URL in aud in the orchestrator variant below, which it can't exchange again (expectation 5): a 502 there is then expected.
Variant: client to orchestrator, orchestrator to gateway¶
tb> exchange to-orch --as client --from user --audience @orchestrator
tb> call orchestrator --token to-orch --save chained
Variant: public client to gateway¶
The mock can't answer this, as it refuses it outright. Without a public client (TESTBED_PUBLIC_CLIENT_ID empty), skip it, and record "not registered".
Questions it answers¶
Are bare client IDs accepted as resource indicators?¶
Or how else does the next hop's ID get into aud?
- Yes: FOCA's outgoing exchange names targets by client ID, and the token flow of proTES #391 stands.
- No: the
audrule and URL indicators clash, and chains can't work (C3). This blocks #391's token flow until one of them changes. proTES 0.5.0's architecture stays the fallback.
Can a token with only a URL in aud be exchanged again?¶
We expect not, since the exchanging client's ID must be in aud.
- No: tokens for a service that forwards must carry its client ID. URL forms only work for the last hop.
- Yes: the
audrule is looser than described, and either form works. Then we need to know how LS Login maps a URL to a client.
Which parameter names the target: audience, resource or both?¶
The LS Login team says that both are validated (2026-11-03). The outcome decides the default of FOCA's outgoing exchange, and what ends up in aud for each.
What's in client_id after an exchange?¶
- The exchanging client: nodes can allow-list their callers with FOCA's
security.auth.clients. Assubis the user, FOCA treats them as user tokens, which is right. - The original client: nodes can't see even the last hop. That goes into #391's "Identity and tracing".
Do exchanged tokens have the same typ, alg and keys as login tokens?¶
- Yes: nothing changes.
- No: FOCA's settings
token_typesandalgorithmshave to allow them, on every node. That would go into the operator docs, or get fixed on LS Login's side.
Answered for typ: no. Exchanged tokens carry typ: JWT, not at+jwt, and so do login tokens of LS Login's new proxy (seen in a run on 2026-11-18, #10). The services refuse them with the reason type, so the chain stops at the gateway. To go on, accept JWT with TESTBED_TOKEN_TYPES (Token types), and record which tokens carry which type, under typ in What to record. alg and keys weren't reported as different; the call through the gateway shows whether they are.
What it changes: FOCA nodes must set security.auth.token_types the same way, to at+jwt, application/at+jwt and JWT. That also lets ID tokens of the same issuer through, so that only aud tells them apart. FOCA's default stays as it is; whether LS Login can issue at+jwt goes into the proposals for LS Login (#17).
Can public clients exchange?¶
Discovery at /oidc/ lists the auth method none, and at /cas/oidc doesn't (What we've seen). That says nothing about exchange.
- Yes: Krini's backend can wait.
- No: the backend comes with proTES 0.6.0, as #391 expects. No FOCA change either way.
What to record¶
| Step | Record | Result |
|---|---|---|
| Provider and clients | Provider, grant types, and which entitlement scopes and claims are listed | |
| Login | sub, typ, aud, client_id, exp minus iat, whether there's a refresh token, what the consent page lists, and whether it mentions offline access |
|
| Hop 1 | Which parameter works, aud, client_id, azp, exp minus iat, scope, typ |
|
| URL form | aud, the status of the call |
|
| Hop 2 | client_id at each hop, exp minus iat at the node |
|
| Which form names the node | Which of the four exchanges worked, aud of that token, the status of call node, and the TESTBED_TARGET_PARAM set for T2-T5 |
|
| Orchestrator | Status, aud at each hop |
|
| Public client | Both results, and the error if any; "not registered" without a public client | |
| Registration app | What it accepted, and anything that needed approval |