Repository navigation
chore(deps): bump toolhive to v0.69.0 - #2982
Merged
Merged
Conversation
Bump github.com/stacklok/toolhive from v0.66.0 to v0.68.0 and sync the workspace metadata. No Mecatl production behavior changes: AS-2's JWT-bearer grant stays off in production, and the new accepted_assertion_types gate is left unset, which keeps accepting both assertion types. Update the tests that pin the embedded authorization server's behavior: - AS-2 now accepts a client assertion only when aud is its issuer alone; the token endpoint and an array with another value are refused. - AS-2 refuses an ID-JAG whose resource claim names a resource it does not govern, and one with a multi-valued aud, so the tracked shortcut case becomes a refusal. - AS-2 refuses an ID-JAG redeemed without client authentication. - AS-2 redemption refusals now carry reason codes (invalid_assertion, subject_unknown), so the broker no longer takes its reasonless invalid_grant retry for them. Drop the comments that said it would. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Move from v0.68.0 to v0.69.0, released after this PR opened. It adds the authorization-server changes for per-call gateway tokens that are already merged (one reachability rule for the authorization_details registry, refusing tokens and assertions that carry authorization_details, and the vMCP argument hash), plus ID-JAG subject resolution behind a setting, the actor check at ID-JAG redemption, and EdDSA in the token validator. Mecatl needs no code change: no other dependency moved. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ChrisJBurns
approved these changes
Nov 25, 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
Bump
github.com/stacklok/toolhivefrom v0.66.0 to v0.69.0. This makes the later bump for #2727 (gateway token call binding) smaller. The PR first moved to v0.68.0; v0.69.0 shipped while it was in review, so the second commit moves it on. The branch name still says v0.68.0.Mecatl's production behavior does not change. Production AS-2 still trusts no ID-JAG issuer, so its JWT-bearer grant stays off. The new
accepted_assertion_typesgate is left unset, and unset keeps the old default of accepting bothjwt_bearerandid_jag. Only tests and two stale comments change.ToolHive changes that matter to Mecatl
These all tighten the embedded authorization server. None loosens a check Mecatl relies on.
audmust be the issuer alone (Require the issuer as the only client assertion aud toolhive#7213). AS-2 no longer accepts the token endpoint, or an array that adds another value. The broker already signs assertions with the issuer as a plain string, so nothing breaks.resourceclaim must name a resource AS-2 governs (Refuse ID-JAGs whose resource claim disagrees toolhive#7198). This was a tracked shortcut inTestAS2RedeemsWhatTrackedShortcutsAllow, which is now a refusal.audis refused (Refuse ID-JAGs with a multi-valued aud toolhive#7204).invalid_client(Refuse unauthenticated ID-JAG clients and cnf-bound assertions toolhive#7214). The broker always authenticates withprivate_key_jwt.invalid_assertionandsubject_unknown(Add reason codes to redemption refusals toolhive#7193, which closes Authorization server: reason codes in error_description for ID-JAG redemption refusals toolhive#7030). The broker already knew these codes. Because the refusals now carry a reason, the broker no longer takes its reasonless-invalid_grantretry for them. The retry is still there for servers that send no reason.accepted_assertion_typeson JWT-bearer issuer policies (Gate ID-JAG by issuer assertion types toolhive#6678). Mecatl leaves it unset and keeps its current behavior. Setting it to[id_jag]belongs with Configure the embedded gateway's authorization server as AS-2 #2533.v0.69.0 adds (no code change needed in Mecatl; no other dependency moved):
authorization_detailsare refused (Refuse tokens that carry authorization_details toolhive#7282), instead of having the claim dropped. Mecatl sends no such claim today, so nothing it does changes; this is the first piece of call binding for Bind each gateway token to its call #2727.authorization_detailsregistry (Put the authorization details reachability rule in one place toolhive#7281) and the vMCP argument hash (Add the call-binding argument hash for the vMCP toolhive#7285, a package nothing calls yet).Other changes in these releases don't touch what Mecatl configures. These include the SPIFFE
client_credentialsgrant and resource changes, the DCRclient_name, the opt-in vMCP scope authorization, and the delegated-access marker refusal.Changes
go.mod,go.sum,integration/microvm/go.mod,integration/microvm/go.sum: the bump plustask deps:sync. Thegolang.org/x/exp/eventandjsonrpc2pins move with it. goldmark is now recorded as indirect inintegration/microvmat the version root already uses.internal/adapter/mcpbroker/as2_test.go:aud, or with anaudarray, must now be refused.aud, and an ID-JAG redeemed without client authentication.internal/identitybroker/authorize_integration_test.goandinternal/app/identitybroker_gateway_test.go: AS-2's refusals now carry a reason, so each test expects one ID-JAG and one redemption instead of a retry.internal/identitybroker/authorize.go,internal/app/build.go: drop the comments saying AS-2 sends no reason codes.Checks
On v0.69.0 (second commit):
task build,go test -raceoninternal/adapter/mcpbroker/...andinternal/identitybroker/..., the identity broker, MCP broker, gateway and AS tests ininternal/app/..., the identity broker and gateway tests incmd/mecak8s,task lint,task generate(no diff),task test:workspace-syncandgo run ./cmd/mecademo: all pass. The hosted AS-1 Kind spec also passed 8 of 8 in a local regression run against v0.69.0 plus two open ToolHive PRs (#7284, #7290), with the image built from that combined source.On v0.68.0 (first commit):
task build: pass.go test -raceoninternal/adapter/mcpbroker/...andinternal/identitybroker/...: pass.go test -raceoninternal/app(identity broker, MCP broker, gateway and AS tests): pass.task lint: pass.task generateleaves no diff.task test:workspace-sync: clean.go run ./cmd/mecademo: pass.task test: everything that touches ToolHive passes. The run stopped attest:microvm-dev-tagafter five failures in tests that start subprocesses or daemons under 2–10s deadlines, while the machine's load average was about 30. All five pass when rerun alone:TestDefaultRunnerDeliversPayloadAndHarness(cmd/mecatui/agenthook, which has no ToolHive dependency)TestEndToEndThroughNotifierToScript(cmd/mecatui/agenthook)TestWorkspaceSnapshotHostileHelpers(cmd/mecatui)TestDefaultOperationsStartScrubsDaemonEnvironmentAndDetachesFromRequestTestRepositoryGuestAuthenticationRejectsCompetingConnectorBeforeDisclosuretask test:microvm-dev-tagalso passes on its own. CI runs the full matrix.Kind end-to-end
I ran the hosted AS-1 Kind spec mock-only, with no provider key. The command was
go test -v -tags kind_e2e ./e2e/k8s/ -args -ginkgo.focus='hosted AS-1', and it passed 8 of 8. It covers mecatui signing in at a mecak8s-hosted AS-1 through Dex, and session open converting that sign-in. The conversion is the broker's token exchange at AS-1 with itsprivate_key_jwtassertion, so it runs the issuer-onlyaudcheck against a deployed issuer. It also covers the refresh and pod-restart cases.No deployment can test ID-JAG redemption at AS-2 through the vMCP yet. Build refuses a gateway entry that routes servers until AS-2 trusts AS-1 (#2533), and only tests can set that trust. That path is covered in-process, against the real embedded AS-2 and vMCP, by the
mcpbroker,identitybrokerandinternal/apptests above.Follow-ups (not in this PR)
access_deniedwithsubject_unknownto INTERNAL. The design asks for FAILED_PRECONDITION with a gateway sign-in link. Production can't reach this until AS-2 trusts AS-1 (Configure the embedded gateway's authorization server as AS-2 #2533).knownReasonsdoesn't list the new ToolHive codes (client_authentication_required,issuer_unavailable, the delegated-access ones). They read as "unknown", which gives the same outcome.accepted_assertion_types: [id_jag], and should drop the closed resource-claim shortcut from its list.🤖 Generated with Claude Code