Skip to content

Fix protected-resource metadata advertising http:// behind a TLS-terminating ingress - #33

Merged
saifuddinrangwala merged 2 commits into
mainfrom
fix/protected-resource-behind-tls-proxy
Nov 30, 2026
Merged

saifuddinrangwala merged 2 commits into
mainfrom
fix/protected-resource-behind-tls-proxy

Conversation

@saifuddinrangwala

Copy link
Copy Markdown
Collaborator

When TLS ends at an ingress, the pod sees plain HTTP, so /.well-known/oauth-protected-resource returned "resource": "http://host" while clients connect via https://host. Recent MCP clients (Claude Code) reject that mismatch: Protected resource http://... does not match expected https://....

  • PUBLIC_URL (Helm config.publicUrl): explicit base URL used as resource and for the /token authorization server entry. Validated as an absolute http(s) URL.
  • FORWARDED_ALLOW_IPS (Helm config.forwardedAllowIps): passed to uvicorn so X-Forwarded-Proto/Host from the ingress are trusted (default stays 127.0.0.1).
  • Tests, README and CHANGELOG updated; helm template renders both keys. 139 tests pass.

Setting either one fixes the mismatch; PUBLIC_URL is the deterministic option.

🤖 Generated with Claude Code

Saifuddin Rangwala and others added 2 commits November 30, 2026 10:15
…terminating proxy

Add PUBLIC_URL to set the advertised resource explicitly and FORWARDED_ALLOW_IPS
so uvicorn trusts the ingress's X-Forwarded-* headers. Expose both in the Helm chart.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@saifuddinrangwala
saifuddinrangwala merged commit 0a01055 into main Nov 30, 2026
10 checks passed
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.

1 participant