Separate API Authority from Login Identity
Route access tokens to resources and ID tokens to relying clients; never substitute one for the other. • Lab status: conceptual reconstruction. Receipts are expected simulated outputs, not deployed-system measurements.
System map · Day 06
Whole-system design
Five stable layers. Today's work is expanded and linked; the rest stays in context.
Entry and policy
Onboarding and control
Covered — Connector control plane
Authorization services
Authorization server
Design target · not proved
Acts as the OpenID Provider for identity while retaining its separate OAuth token role.
Compute and execution
Covered — Connector runtime computeAhead — Refresh coordinator compute
External resource server
Design target · not proved
Rejects an identity token used as bearer authority for the protected API operation.
Storage and evidence
Covered — Specification draft store · Connector configuration store · Secret and token vault · Sanitized discovery cacheAhead — Ordered migration log
Evidence plane
Source-backed today
Stores valid identity, wrong-audience or nonce denial, and the independent API denial.
Traversed today
Overview
Validate the identity assertion for its client
The browser callback retrieves the selected issuer's keys and applies a supplied validation checklist: signature, exact issuer, client audience, expiry, issued-at constraints, and nonce bound to the login transaction. A valid result may establish local signed-in context; it does not choose API scopes or bypass resource policy.
{
"issuer": "https://auth.example",
"audience": "calendar-browser",
"nonce": "nonce-d06",
"expiresAt": "2026-08-14T12:05:00Z",
"validationPurpose": "login_identity"
}
{
"idTokenRecipient": "calendar-browser",
"accessTokenRecipient": "https://calendar.example/mcp",
"refreshTokenPurpose": "renew_delegated_access",
"interchangeable": false
}
Prove token purpose at the resource boundary
The normal path validates the ID token at the browser and sends the access token to the Calendar API. The first denial changes only the ID-token audience; the browser rejects it. The second sends a valid ID token to the API; the API rejects it because it is not the required access credential.
GET /v1/events HTTP/1.1
Host: calendar.example
Authorization: Bearer <access-token-for-calendar-resource>
{
"receipt": "SCG-R06",
"identity": "accepted_for_calendar-browser",
"wrongAudience": "denied_at_browser",
"idTokenAtApi": "denied_wrong_token_purpose",
"accessTokenAtApi": "accepted"
}
Recovery starts a fresh login transaction with a new nonce; it does not reinterpret the rejected token. The Day 01 public route remains the positive control. Cleanup removes the disposable browser session and retains only the claim-validation receipt with no raw token.
Score one token-purpose decision
Given token type, issuer, audience, recipient, and desired action, decide only accept or deny at the named boundary. An ID token whose audience is the browser may be accepted for login context there; it is denied at the Calendar API. The one-dimensional evidence is decision plus failed check.
The misconception is “OIDC token means OAuth API token.” Replay the same valid ID token at both boundaries to reveal that validity includes intended recipient and purpose. Decline role inference, tenant policy, or a full relying-party implementation because those are separate capabilities.
Carry the token-routing matrix forward
SCG-R06 records each artifact's purpose, recipient, lifecycle, valid path, and one-variable denials. Day 07 consumes the access-token reference, never the ID token, when constructing secret-safe REST and MCP upstream requests.