Skip to content

Document the profile for refresh tokens issued by token exchange #6967

Open

Description

@jhrozek

Part of #6886. Depends on #6897; extended by #6966.

Problem: clients need a stable contract for refresh tokens issued by token exchange: the request, the response, the error reasons they can act on, and the limits. Today it exists only in code and a partial architecture section.

Change: one section in docs/arch/17-token-exchange-delegation.md, cross-checked against docs/arch/11-auth-server-storage.md. It covers:

  • the https://toolhive.dev/exchange_grant type and its members, including that the server fills in and caps expires_at;
  • the response shape;
  • child grants and depth 1;
  • the error table and the stable reasons (token_used, revoked, parent_revoked, not_issuable, and the invalid_authorization_details reasons);
  • the accepted limits:
    • one grant per access-token jti, children per parent unbounded;
    • jti markers can be lost on Redis without AOF;
    • revoked JWT access tokens stay valid until exp;
    • a lost response leaves an unused grant until it expires;
  • that grants issuing ID-JAGs are used by ID-JAG issuance through token exchange #6898.

Acceptance: every statement matches the code; the reviewer checks against the code, not a plan.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions