/.well-known/jwks.json returns 404 ( integration with Entra ID ) #2098
-
|
Hi All, When deploying MCP Gateway with RS256 (asymmetric JWT signing - 1.0.0-BETA-1 ) - which is the recommended production configuration - there's currently no automated way for clients to retrieve the public key for token verification. Current workflow:
The gateway also consumes JWKS from external IdPs (Keycloak, Okta, Entra ID) for SSO token validation via the Mihai |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
Hi @netdev360, thanks for the reporting. Please confirm whether /well-known/jwks.json is served by your gateway or by your identity provider and share server logs around the 404 plus your OIDC/JWKS base URL; I can confirm the right path and update setup docs accordingly. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @netdev360, you're correct — the gateway currently does not publish a To clarify the architecture:
For your use case (RS256 with Entra ID integration), the flow depends on direction:
Publishing a JWKS endpoint for gateway-issued keys is a reasonable feature request. I'll open an issue to track adding |
Beta Was this translation helpful? Give feedback.
-
|
Hi @netdev360, confirming your finding — tested against the running instance and Architecture summary:
For your Entra ID integration: If Entra ID issues tokens that the gateway validates, set: SSO_GENERIC_JWKS_URI=https://login.microsoftonline.com/{tenant}/discovery/v2.0/keysIf the gateway issues tokens that external services need to validate — you're right, this doesn't scale with manual key distribution. Workaround: A lightweight sidecar that reads Related: Issue #3567 (Support for External OIDC Bearer Tokens) covers the broader use case of trusting external IdP tokens on API/MCP endpoints. A built-in JWKS publishing endpoint would complement that feature. I'll ensure a feature request is opened specifically for JWKS publishing if one doesn't exist already. |
Beta Was this translation helpful? Give feedback.
Hi @netdev360, confirming your finding — tested against the running instance and
/.well-known/jwks.jsonreturns 404. The gateway does not publish its own JWKS endpoint.Architecture summary:
SSO_GENERIC_JWKS_URIor per-provider OIDC discoveryFor your Entra ID integration:
If Entra ID issues tokens that the gateway validates, set:
SSO_GENERIC_JWKS_URI=https://login.microsoftonline.com/{tenant}/discovery/v2.0/keysIf the gateway issues tokens that external services need to vali…