Repository navigation
Conversation
412b678 to
d0f5978
Compare
d0f5978 to
a75b58b
Compare
|
Rebased onto current |
a75b58b to
5889fa4
Compare
|
Rebased onto current |
5889fa4 to
3a0f081
Compare
|
Rebuilt on current |
Signed-off-by: Vladan Gunjic <vladan.gunjic@mapp.com>
3a0f081 to
dbaf056
Compare
One conflict in mcpgateway/transports/streamablehttp_transport.py: main added the resource_subscription_relay import on the line where this branch imports from sso_service. Kept both. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Vladan Gunjic <vladan.gunjic@mapp.com>
🔗 Epic / Issue
Closes #5306
🚀 Summary
JIT-provisions missing users during OAuth-enabled virtual-server MCP authentication by reusing ContextForge's trusted SSO provider path. The provider's existing
email_claimmapping now selects the same local principal for browser SSO and MCP OAuth flows.📏 Reviewability
triage🧪 Checks
diff-cover, 79 executable lines)git diff --checkpasses🔄 Rebuilt on
main(663938b, 2026-10-30)Upstream rewrote
main's history on 22 Oct (secret purge), which left this PR's base commit unreachable and the diff unreadable. The branch is rebuilt from currentmainwith the same single commit (cherry-pick, no conflicts; auto-merges in.env.exampleand the transport import block after #7254). One file added since the last revision:.secrets.baseline, refreshed by the detect-secrets hook because the new lines indocs/docs/manage/sso.mdmove two existing entries (line numbers only, no new entries).On the rebuilt branch: the auth, SSO and streamable-transport unit suites pass (1659 passed, 1 skipped); all pre-commit hooks pass (ruff 0.15.16 check and format, bandit, interrogate, detect-secrets).
Relation to the SSO user provisioning API (#7180, #7219, #7183). That API lets an administrator create accounts before the first login. This PR covers the case without that step: a headless MCP client whose user has never logged in, presenting a valid OAuth token to an OAuth-enabled virtual server. Both use the same trusted-provider rules.
📓 Notes
Provisioning remains disabled unless
SSO_API_TOKEN_AUTH_ENABLED=true. It also requires an enabled provider matched by verified issuer with bothtrusted_for_api_auth=trueandauto_create_users=true.The shared SSO path continues to enforce email verification, trusted domains, admin approval, account linking, role mapping, and team mapping. A configured
email_claimis authoritative and fails closed when missing or invalid rather than falling back to a contact-email claim. Existing and disabled local-user behavior is unchanged.This also persists
email_verified_atafter the shared SSO verification gate accepts a newly created or linked user.