Repository navigation
fix(identitybroker): apply the session-open review follow-ups - #2601
Merged
Merged
Conversation
Oversized AS-1 responses keep their classification: a refusal keeps its status (so 502/504 are resent and 503/429 stay unavailable) and an oversized success is an undecodable answer. The broker remembers every access-token jti AS-1 may have converted, across sessions, until the token's exp plus a skew, so a spent token is never presented again. signed_out, upstream_revoked, and owner_action_required keep the design's broker status; the session-open 401 is mecak8s's outcome. Part of #2492. Co-authored-by: Mecatl <[email protected]>
jhrozek
approved these changes
Oct 29, 2026
This was referenced Oct 29, 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
Follow-up to #2593 with the three review suggestions.
authserverclient/client.go). The size check ran before the status check, so a body over 1 MiB lost its meaning. Now:UNAVAILABLE;jtiof the grant the session currently held, so a replaced grant or a closed session forgot it, and a delayed open could present a spent token to AS-1 again. The broker now keeps everyjtiAS-1 may have converted until the token'sexpplus a skew, across sessions (design step (3): "never presents a spent access token for a second session"). An open with such a token returns the session if it holds a live refresh token, and otherwise getstoken_usedwithout calling AS-1.signed_out,upstream_revoked, andowner_action_requiredreturn their own codes (FAILED_PRECONDITION,PERMISSION_DENIED,FAILED_PRECONDITION); the 401 at session open is the mecak8s outcome, which the server PR applies.Issue relationship
Part of #2492
API compatibility
None on the wire: in-process
internal/identitybrokerand its adapter only, and AS-1 is not configured in production yet.Test plan
go test -raceoninternal/identitybroker/...,internal/testutil/identityharness,cmd/mecak8s, and theinternal/appidentity broker tests; repeated runs of the session-open testsexpplus skew; which outcomes record a converted token; revocation reasons with their design codestask lint: clean except the pre-existing gosec finding inenvironment/microvm/launch_ownership_darwin.go