Repository navigation
docs(agent-identity): finish inline broker keys and note assertion clock skew - #2574
Merged
Merged
Conversation
…ock skew Follow #2571 through: the credential roles table, step (5) check 1, the key-set rotation row, the ToolHive work list, and the gateway administrator configuration now say the broker's public key is an inline JWKS registered again on rotation, not a jwks_uri. Check 5 in step (5) now allows the clock skew on the assertion's exp, as check 6's jti retention and the replay-window test already assume. The work list records that ToolHive accepts the issuer as the assertion audience on main (toolhive#6946), not yet in a release. Co-authored-by: Mecatl <[email protected]>
The error-reasons table named only HTTP 503 as retryable. A 429, 502, or 504 from a proxy or rate limiter in front of AS-1 or AS-2 is a passing outage too, not a configuration fault, so map it to UNAVAILABLE as the broker's token-endpoint client already does (#2573). Co-authored-by: Mecatl <[email protected]>
jhrozek
approved these changes
Oct 27, 2026
jhrozek
left a comment
Contributor
There was a problem hiding this comment.
Looks good, thanks for finishing this.
- Inline keys. ToolHive refuses
jwks_urifor clients, so an operator registering the broker's public key at each server is the only option that works today. Saying so in the roles table, check 1, the rotation table, and the external-mode checklist means a gateway administrator learns up front that a key rotation needs them, instead of finding out from aninvalid_client. Marking thejwks_urirow "Not planned" closes the open decision rather than leaving it to look like pending ToolHive work. - Issuer as
aud. Right status: it's on ToolHive main but not released, so a broker that follows the design is refused by any released ToolHive. Whatever ToolHive version the demo pins has to include it. - 429, 502, 504 as
UNAVAILABLE. These come from an ingress or rate limiter in front of the server, not from the server's decision. Mapping them to "try again later" keeps a timeout from being reported as a Mecatl misconfiguration and sending someone to debug configuration that is fine. - Clock skew on check 5. Yes, that's the intent. RFC 7523 allows the server a small margin, and the access-token check in step (2) already allows it on
expandiat. ToolHive doesn't apply one to client assertions yet: fosite comparesexpandiatexactly, so a broker whose clock runs a second ahead getsinvalid_clientfrom real ToolHive while the harness accepts it. Tracked in stacklok/toolhive#6954; the text stays as the target.
Merged
2 tasks
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.
Follow-ups to #2523 and #2571 in the agent identity design drafts. Design text only; no code changes.
Changes
credentials-and-lifecycle.mdstep (5)), but a few places still describedjwks_urias the mechanism or as open:credentials-and-lifecycle.md: the credential roles table (broker client credential), check 1 in step (5), and the key-set rotation row.implementation.md: the ToolHive work-list row for fetching keys fromjwks_urinow says decided, not planned.mcp-gateway-modes.md: what the gateway administrator registers formecatl.exp(please confirm). Check 5 in step (5) said "exphas not passed" with no skew. Two other places already assume a skew there: check 6 keeps a usedjti"untilexpplus the clock skew", which is only useful if an assertion can still be accepted afterexp; andimplementation.md's tests expect "a client assertion replayed inside the clock-skew window afterexp" to be refused. This PR adds "allowing the configured clock skew" to check 5, as step (1)'s access-token check already does. The offline harness's AS-1 applies that skew since feat(identitybroker): authenticate the broker to AS-1 and AS-2 with private_key_jwt #2573. If you'd rather check 5 stay strict, say so: we'd drop the skew from the harness and the replay-window test instead.aud. The work-list row said "Unknown; verify". It's supported on ToolHive main (toolhive#6946) but not in a release yet (it missed v0.57.0); released versions accept only the token-endpoint URL.UNAVAILABLE, as the broker's token-endpoint client already does (feat(identitybroker): authenticate the broker to AS-1 and AS-2 with private_key_jwt #2573).Test plan
matlatl check . --strict: no new findings (the existing ones are in an untracked local file).