Skip to content

separate MCP ingress without basic auth to enable its own bearer auth#81

Open
vitek-rostislav wants to merge 5 commits into
mainfrom
rv/mcp-http-auth
Open

separate MCP ingress without basic auth to enable its own bearer auth#81
vitek-rostislav wants to merge 5 commits into
mainfrom
rv/mcp-http-auth

Conversation

@vitek-rostislav

@vitek-rostislav vitek-rostislav commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Non-production domains (and any production domain in FORCE_HTTP_AUTH_IN_PRODUCTION) are protected by nginx HTTP basic auth on the main ingress. Basic auth and the MCP Bearer token both use the single Authorization header, so while basic auth is enabled the Bearer token never reaches the application and external MCP clients (e.g. Claude Code) can't authenticate.

This publishes the MCP paths through a second ingress without basic auth, so they stay reachable. These paths remain protected by the application itself (Bearer token on /_mcp) or are public by the OAuth specification:

  • /_mcp and /mcp/oauth (Prefix)
  • /.well-known/oauth-authorization-server and /.well-known/oauth-protected-resource (ImplementationSpecific, since ingress-nginx >= 1.12 rejects dots in Exact/Prefix paths by default)

The MCP ingress reuses the certificate managed by the main ingress (same TLS secret, cert-manager annotation dropped) to avoid issuing a duplicate certificate.

Comment thread deploy/parts/domains.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants