Repository navigation
docs(agent-identity): sign embedded-mode users in through the company IdP - #2571
Merged
Merged
Conversation
… IdP In embedded mode AS-1 and AS-2 now both sign users in through the same company IdP, and AS-2 finds the local user from the ID-JAG's upstream_subject, as it does in external mode. Approval stays implicit by configuration. AS-1 is no longer described as AS-2's sign-in provider: ToolHive's authorization server issues no ID tokens and has no userinfo endpoint, so it cannot sign users in to another server. Broker client authentication stays private_key_jwt with a key. In mecak8s the key is held in a Kubernetes Secret, later a KMS. An external gateway registers the broker's public key as an inline JWKS and again on rotation, because ToolHive does not fetch a jwks_uri. The ID-JAG carries upstream_subject for AS-2's user resolution in both modes; the ledger row and step (7) now point at ID-JAG issuance (stacklok/toolhive#6898) for that part, not only at the access-token work. Co-Authored-By: mecatl <[email protected]>
ChrisJBurns
approved these changes
Oct 26, 2026
This was referenced Oct 27, 2026
Open
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 #2523, answering two questions about the merged design.
upstream_subject, as in external mode. Approval stays implicit by configuration. No work item is needed for AS-1 acting as a sign-in provider; that role is dropped.upstream_subjectin the ID-JAG. The design already had AS-1 put it in the ID-JAG, but the ledger pointed only at the access-token work. Step (7) and the ledger row now say AS-2 uses it to find the user in both modes, and point the ID-JAG part at ID-JAG issuance (ID-JAG issuance through token exchange toolhive#6898), whose issue was updated to match.private_key_jwtwith a key. In mecak8s the key is held in a Kubernetes Secret, later a KMS. An external gateway registers the broker's public key as an inline JWKS and again on rotation, because ToolHive does not fetch ajwks_uri.Issue relationship
Relates to #2451
Relates to stacklok/toolhive#6898, stacklok/toolhive#6887
Type of change
Test plan
Baseline checks
task lint)task test)task test:race)go run ./cmd/mecademo)task docs). Not run in full; the strict link check it runs (matlatl check . --strict) passes on a clean checkout with 0 broken links or anchors. No code changed.task site:build)task api:check)task api:update+engine/CHANGELOG.mdChanges
docs/drafts/agent-identity/mcp-gateway-modes.mdupstream_subjectdocs/drafts/agent-identity/credentials-and-lifecycle.mdupstream_subjectbullet; broker key storage and inline JWKS registrationdocs/drafts/agent-identity/implementation.mdupstream_subjectin the ID-JAG points at ID-JAG issuanceUser-facing change
None. Design drafts only.
Special notes for reviewers
The "Gateway call" slice's AS-2 setup keys off the embedded-mode text, so this is the version to build against.