Repository navigation
fix(tokens): require the exact broker scope to mint History assertions - #114
Merged
Merged
Conversation
POST /v1/tokens/relayhistory-assertion signs the org, workspace and sponsor from the request body; that is intended for the dedicated assertion broker key, which mints for every org it fronts. The route authorized with matchScope, where `manage` implies `create` and `*` implies everything, so any org admin API key holding relayauth:*:manage:* (the documented relayauth-admin role) or `*` also passed and could mint an rth:read assertion for another org. The route now requires the literal relayauth:assertion:create:relayhistory on the key, and POST /v1/api-keys refuses to put a relayauth:assertion:* scope on a new key unless the caller holds that exact literal, so an admin cannot delegate the broker scope to itself either. The bootstrap key and Cloud's broker key already hold the exact literal. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…broker An org admin could mint a workspace token whose stored scopes carry the broker literal (scopesWithinGrant accepts it by implication), then present it as an x-api-key, which satisfies the exact-scope check. Workspace token issuance now applies the same broker-delegation rule as POST /v1/api-keys, and the assertion route requires a plain api_key kind, as attestations already do. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
khaliqgant
marked this pull request as ready for review
October 31, 2026 00:39
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Review summary redacted by a maintainer (security). The one finding was fixed in #119. |
This was referenced Oct 31, 2026
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
Tighten scope checks on the History assertion route. Workspace tokens and admin keys can no longer satisfy the assertion scope by implication.
lib/broker-scopes.ts: an assertion scope is satisfied only by its exact literal.Found in the 2026-10-30 security sweep.
Verification
packages/servertests: all pass (691/691 at merge).npx turbo build && npx turbo typecheck: clean.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Agent Relay sessions
claudesessionaac00799· opened viagh pr create· last active 2026-10-31claudesessiona685ac1e· contributor · rangh prcommands · last active 2026-10-31