Add composable OAuth 2.1 Resource Server and caller key pass-through
Added zero-dependency JWKS and RFC 7662 OAuth 2.1 Resource Server verification, static bearer composition, and header-based caller API-key pass-through for HTTP MCP serving.
Added composable inbound authentication and outbound caller upstream key pass-through to what-if serve without adding new external module dependencies.
Summary of changes
- Added
[auth]configuration,WHAT_IF_SERVER_TOKEN_FILE, andWHAT_IF_AUTH_*environment overrides ininternal/config, including strict URL/duration validation,Redacted()reporting, andSanitizeErrorWithper-request secret scrubbing. - Implemented
internal/authcovering RFC 8414 / OIDC issuer discovery, JWKS caching with30srotation cooldown and asymmetric JWS verification (RS*,PS*,ES*,EdDSA), RFC 7662 introspection (client_secret_basic/client_secret_post) with a bounded SHA-256-keyed cache, and RFC 9728 Protected Resource Metadata helpers. - Wired
req.Extra.Headerpass-through extraction ininternal/mcpserver/server.go, same-origin target key isolation ininternal/decide/service.go, metadata and bearer middleware ininternal/mcpserver/http.go, and auth reporting ininternal/cli/doctor.go. - Updated
docs/reference/configuration.md,docs/architecture/system.md,docs/usage/quickstart.md, and addeddocs/adr/0003-http-auth-and-passthrough.md.
Connections
Local graphLinked from
- Change logOverview2026-11-29“November 2026”
- November 2026Logs“Add composable OAuth 2.1 Resource Server and caller key pass-through”