Repository navigation
fix(mecak8s): resolve hosted AS-1 before the execution checks; correct identity docs - #2647
Merged
Merged
Conversation
mecak8s refused to start with a hosted AS-1, remote execution enabled, and --oidc-issuer unset: the execution checks ran before resolveAS1Flags filled in the caller identity the --identity-broker-as1-issuer help says it sets. Also correct the identity user docs (session open does not exchange tokens at AS-1 yet; another user's session is a 404; a hosted AS-1 supplies the accepted client ID; Studio does not support sub_id) and record in the design that a closed session keeps its closing reason, found by host session, and is not reopened after sign-out or revocation without a token issued after it. Co-authored-by: Mecatl <[email protected]>
jhrozek
approved these changes
Nov 2, 2026
This was referenced Nov 2, 2026
Merged
2 tasks
This branch was successfully deployed
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-ups found while checking the agent identity work (#2454) against
main, before starting #2493.Code
mecak8srefused to start when it hosted AS-1 with remote execution enabled and--oidc-issuerunset (--execution-enabled requires OIDC caller ownership enforcement). The execution checks ran beforeresolveAS1Flagsfilled in the caller identity, contradicting the--identity-broker-as1-issuerhelp ("sets --oidc-issuer ... when unset"). AS-1 is now resolved first. The Helm chart was not affected because it always renders--oidc-issuer.User docs
caller-identity.md: session open does not exchange tokens at AS-1 yet (that is Register the broker client at AS-1 and point the broker at it #2607), so the paragraph describingbearer_rejected/sign_in_requiredfrom the broker described behaviour no deployment can turn on. A request for another user's session getssession_not_found(404) from the server's ownership check, notidentity_broker_session_refused(403); 403 remains for a session ID already paired with another user's broker session.identity-and-client-access.md: with a hosted AS-1 the chart supplies the TUI client ID whenoidc.acceptedClientIDsis unset, so "the chart rejects one without the other" had an exception. Thesub_idexample no longer listsstudio, which does not supportsub_iddeployments.Design
credentials-and-lifecycle.md, "Session end": a closed session's record keeps its closing reason and is found by root host session; aftersigned_out,upstream_revoked, orowner_action_required, the broker opens a new session for that host session only with an access token issued after the revocation. This is the end state Sign-out and revocation #2568 implements (scope moved there from Reopen the broker session after access ends #2493).Testing
TestHostedAS1EnablesExecutionWithoutOIDCIssuer(fails before the fix, passes after).task lint: clean except a pre-existing darwin-only gosec finding inenvironment/microvm/launch_ownership_darwin.go:754, a file this PR does not touch.task test:race:cmd/mecak8spasses. Three tests fail locally on macOS and fail identically on a cleanmaincheckout, so they are environmental:TestMecatedCLICompositionValidatesMicroVMDefaultAfterReadiness(unix socket under/dev/fd),TestRunInDirUsesDescriptorAndPassesArgumentsOpaquely(env: bashnot found), andTestStartupCompatibilityEmbeddedRejected.task site:buildpasses.task docs:check/matlatl: no findings in changed files.go run ./cmd/mecademoshows tool call, permission ask/approval, and result.API compatibility
No wire change: flag parsing order in
cmd/mecak8sand documentation only.