feat: Add Enterprise Managed Authorization (SEP-990) support#871
Open
prachi-okta wants to merge 3 commits intomodelcontextprotocol:mainfrom
Open
feat: Add Enterprise Managed Authorization (SEP-990) support#871prachi-okta wants to merge 3 commits intomodelcontextprotocol:mainfrom
prachi-okta wants to merge 3 commits intomodelcontextprotocol:mainfrom
Conversation
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 Enterprise Managed Authorization (SEP-990) for the Java MCP SDK, enabling MCP clients to leverage enterprise Identity Providers for seamless authorization without per-server user authentication.
Motivation and Context
Enterprise environments require OAuth flows where users authenticate with a centralized IdP, and applications need to securely access protected MCP resources on their behalf. SEP-990 addresses this via:
This follows the same provider pattern as existing auth implementations and is consistent with the TypeScript and C# SDK implementations.
How Has This Been Tested?
Added 25 unit tests across two test classes:
EnterpriseAuthTest(14 tests):discoverAndRequestJwtAuthorizationGrantwith and without pre-configured endpointEnterpriseAuthProviderTest(11 tests):Authorization: Bearerheader injectionTOKEN_EXPIRY_BUFFER)expires_inEnterpriseAuthProviderOptionsnull validationBreaking Changes
None — this is a purely additive feature. No existing APIs are modified.
Types of changes
Checklist
Additional context
Key design decisions:
client_secret_basic(Basic Auth header) used for JWT bearer grant, aligned with SEP-990 conformance requirementstoken_typein JAG response is not strictly validated per RFC 8693 §2.2.1 — it is informational and strict checking rejects conformant IdPsRelated SDK implementations: