Repository navigation
docs(agent-identity): settle session-open token, owner, and 502/504 rules - #2590
Merged
Merged
Conversation
…onse rules mecak8s passes an access token only while the broker session holds no live refresh token, and a gRPC stream's token only before its first response. An open without a token pairs the session with the reported owner; the verified owner is recorded when AS-1 first accepts a token, and the expires_at rule keys on the stored expiry. A lost session-open response, or a 502 or 504, is reported as token_used. Step (5) and the hop tests no longer contradict session open. Relates to #2492. Co-authored-by: Mecatl <[email protected]>
#2587 settled the lost-response rule (resend once with a new client assertion), so this branch drops its own token_used rule for lost responses and 502/504, and the step (5) exception it implied. The token, stream, and owner rules stay. Co-authored-by: Mecatl <[email protected]>
A proxy's 502 or 504 may come from a request AS-1 processed, so at session open it follows the lost-response rule: resend once with a new client assertion, and a refused resend is token_used. 503 and 429 stay UNAVAILABLE. Co-authored-by: Mecatl <[email protected]>
jhrozek
approved these changes
Oct 28, 2026
This was referenced Oct 28, 2026
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.
Summary
Settles four session-open questions that #2492 needs answered before its broker and server work. Smallest in-place edits to
credentials-and-lifecycle.mdandimplementation.md; no new sections. The lost-response rule is #2587's; this PR only extends it to proxy 502s and 504s.jti, and clients keep one access token across requests, so taking it every time would make the next request fail withtoken_used. Since #2575, a replacement cannot outlive the session's hard expiry, so it gains nothing. Matches the lifetimes table ("never renewed"). The broker keeps its replace-and-revoke rule as a guard.expires_atrule keys on "no stored expiry" instead of "first open", and an echo withoutexpires_atdoes not match.token_used, which mecak8s returns as the tagged 401. 503 and 429 stayUNAVAILABLE.UNAVAILABLE, mecak8s would retry with the same access token and always gettoken_used, and the orphan would not be revoked. A 503 or 429 means AS-1 did not process it.Wording fix: the hop test list no longer says a bare
invalid_requestisINTERNALat session open, where step (3) reports it assubject_invalid.Decided in the ticket, not here, because they stay inside #2492:
session_closednever presents a spent token in the same request; it returns the 401 (docs(agent-identity): reconcile the ToolHive work list and settle the lost-response rule #2587).Issue relationship
Relates to #2492
Type of change
Test plan
matlatl check docs/drafts/agent-identity --strict: same result as onmain(3 links out of the directory, 0 broken anchors).task docsstops atdocs:configrefhere becausebufis not installed; no generated reference is affected.User-facing change
None. Design drafts only.