feat(sso): auto-provision routed OAuth users - #6402
Open
vgunjic wants to merge 1 commit into
Open
Conversation
Signed-off-by: Vladan Gunjic <vladan.gunjic@mapp.com>
vgunjic
requested review from
Lang-Akshay,
brian-hussey,
crivetimihai,
ja8zyjits and
msureshkumar88
as code owners
August 24, 2026 22:22
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.
🔗 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📓 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.