Repository navigation
feat: run-bound token middleware that takes the run from the token - #23
Merged
TheGreatAxios merged 1 commit intoOct 21, 2026
Conversation
|
Triage: Pass No changes needed from you. A maintainer will review this pull request. Skipped:
Waiting on a maintainer to approve: approve, request review. |
TheGreatAxios
deleted the branch
cl-10967-require-a-grant-and-server-issued-tokens-on-solution
October 21, 2026 03:09
TheGreatAxios
changed the base branch from
cl-10967-require-a-grant-and-server-issued-tokens-on-solution
to
main
October 21, 2026 03:10
Add requireRunBoundToken and createRunBoundTokenVerifier: middleware and
verifier that bind an agent token to the specific run it was issued for.
- A token with a runId is only valid for requests to that run
- The run identity comes from the *token*, not from a request header
- Every rejection (missing, invalid, unbound, wrong-run, wrong-tenant)
returns the same 401 { error: unauthorized } so responses never reveal
whether a token is live
- Sets both agentToken and workflowRunScope on the Hono context
- Tests cover the happy path, all rejection cases, and the verifier
Closes CL-10968
TheGreatAxios
force-pushed
the
cl-10968-bind-each-agent-token-to-the-run-it-was-issued-for
branch
from
October 21, 2026 03:10
0c28bed to
600d87d
Compare
TheGreatAxios
deleted the
cl-10968-bind-each-agent-token-to-the-run-it-was-issued-for
branch
October 21, 2026 03:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
requireRunBoundTokenandcreateRunBoundTokenVerifier: middleware and verifier that bind an agent token to the specific run it was issued for.runIdis only valid for requests to that run{ error: "unauthorized" }so responses never reveal whether a token is liveagentTokenandworkflowRunScopeon the Hono contextVerification
bun run check: passes (tsc, oxlint, oxfmt, tests)bun run build: passesCloses CL-10968