Repository navigation
Closed
Description
Part of #6886. Depends on #6894, #6895 and #6897.
Problem: an unattended run (for example a scheduled agent task) has no user present, but needs the user's authority, revocably and for a bounded time.
Change:
- Token exchange returns a schedule refresh token (
requested_token_type=refresh_token, one scheduleauthorization_detailsentry) from the user's fresh access token for the client's API, with the same checks as opening a session in Refresh tokens through token exchange, as generic grants #6897: the client is authenticated, the subject token is this server's own and active, the entry's owner equals itssub_id, the key is new, the subject token'sjtiis converted once. The delegate-client exemption andmay_actnever apply. - It is bound to the client, the schedule, the user and the allowed targets (recorded on the row, Storage for grants issued by token exchange #6895). Lifetime: the schedule's horizon, capped by a configured maximum, never the subject token's expiry; a replacement never extends it. It does not rotate, and the ordinary refresh-token grant refuses it.
- When the schedule fires, the client exchanges it (
subject_token_type=refresh_token, validated from Storage for grants issued by token exchange #6895's storage) for a session refresh token on a new key, capped at the horizon, with the schedule row recorded as its parent. From there the run requests ID-JAGs as an interactive session does (ID-JAG issuance through token exchange #6898). - Output fixed: a schedule refresh token can produce only session refresh tokens.
- Revoking the schedule refresh token revokes its child session refresh tokens. After a revocation, renewing the schedule creates a new token on a new key.
- Refusals use the session-open reason codes, plus
schedule_endedonce the horizon has passed.
Acceptance: a fired schedule gets a session refresh token that yields ID-JAGs; revoking the schedule stops its running sessions from minting new ID-JAGs; a run cannot outlive the horizon.
Metadata
Metadata
Assignees
Labels
No labels
Activity
jhrozek commentedon Oct 27, 2026
Closing as covered by #6897. After the redesign the authorization server has no notion of a schedule: a client's schedule is a grant that issues refresh tokens, with the horizon as its capped
expires_at, and each run gets a child grant that issues ID-JAGs, expires no later than its parent, and stops when the parent is revoked. All of that is in #6897. Renewal is a new grant, which the client handles.