feat(mcp-oauth): confidential pre-registered clients (client_secret_env) — REQ-044 Phase 2#323
Merged
Conversation
…secret_env) REQUIREMENT-044 Phase 2. Allow an authorization_code MCP server to pin a CONFIDENTIAL pre-registered app: client_id + client_secret_env. Unlocks providers that reject DCR and require a client_secret at token exchange (HubSpot, Dropbox). - validation: permit client_secret_env for flow=authorization_code (only alongside a pinned client_id; reject blank); keep rejecting the other m2m *_env pointers. - config resolution: ServerResolution gains client_secret, resolved from client_secret_env via process env then the project keychain the 'animus secret' surface writes to. - flow: both pinned-client branches (run_auth loopback + begin_auth portal) attach the resolved secret via OAuthClientConfig::with_client_secret; begin_auth persists it into PendingAuth so complete_auth authenticates the exchange as the same app (that consumer already existed). - docs + validation tests (accept with client_id; reject without; reject blank). No new CLI flags; the secret is config-driven and keychain-resolved.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Implements Phase 2 of REQUIREMENT-044 (portal task TASK-339 covered Phase 1). Lets an
authorization_codeMCP server pin a confidential pre-registered app —client_id+client_secret_env— unlocking providers that reject Dynamic Client Registration and require aclient_secretat token exchange (HubSpot, Dropbox).Changes (single repo —
OauthConfig.client_secret_envalready exists in animus-protocol)orchestrator-config): permitclient_secret_envforflow=authorization_code, but only alongside a pinnedclient_id(reject blank; reject secret-without-id). Still reject the other m2m*_env/token_urlpointers.animus-mcp-oauth/config.rs):ServerResolutiongainsclient_secret, resolved fromclient_secret_envvia process env first, then the project keychain (animus secret set).animus-mcp-oauth/flow.rs): both pinned-client branches (run_authloopback +begin_authportal) attach the secret viaOAuthClientConfig::with_client_secret;begin_authpersists it intoPendingAuthsocomplete_authauthenticates the exchange as the same app (that consumer already existed — only the producer was missing).Verification
cargo check -p orchestrator-config -p animus-mcp-oauth✅cargo test -p orchestrator-config authorization_code→ 7 passed (3 new) ✅cargo test -p animus-mcp-oauth→ 4 passed ✅cargo fmt --check+cargo clippyclean on both crates ✅Shipping note
This lands on the
release/0.7line; getting it into the portal requires a new ao-cli release + portal repin (DockerfileANIMUS_VERSION/.animus/plugins.lock) + the workflow-runner match per the deploy runbook — a separate, gated step.