Skip to content

docs(agent-identity): sign embedded-mode users in through the company IdP - #2571

Merged
jhrozek merged 1 commit into
mainfrom
docs/embedded-signin-and-client-auth
Oct 26, 2026
Merged

jhrozek merged 1 commit into
mainfrom
docs/embedded-signin-and-client-auth

Conversation

@jhrozek

@jhrozek jhrozek commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #2523, answering two questions about the merged design.

  • Embedded-mode sign-in at AS-2. The design said users sign in to AS-2 through AS-1. That can't be built: ToolHive's authorization server issues no ID tokens and has no userinfo endpoint, so it cannot sign users in to another server. 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 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_subject in 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.
  • 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.

Issue relationship

Relates to #2451
Relates to stacklok/toolhive#6898, stacklok/toolhive#6887

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Dependency update
  • Documentation
  • Other (describe):

Test plan

Baseline checks

  • Linting (task lint)
  • Fast offline test suite (task test)
  • Pre-review race suite (task test:race)
  • Offline demo (go run ./cmd/mecademo)
  • Markdown changed: docs generation/link checks (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.
  • User docs/user-facing behavior changed: site build (task site:build)
  • Guarded engine API affected: compatibility check (task api:check)
  • Intentional engine API change: task api:update + engine/CHANGELOG.md

Changes

File Change
docs/drafts/agent-identity/mcp-gateway-modes.md Embedded mode: both servers sign in through the company IdP; AS-2 resolves the user from upstream_subject
docs/drafts/agent-identity/credentials-and-lifecycle.md Step (7) upstream_subject bullet; broker key storage and inline JWKS registration
docs/drafts/agent-identity/implementation.md Ledger row for upstream_subject in the ID-JAG points at ID-JAG issuance

User-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.

… 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants