Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4670 +/- ##
==========================================
- Coverage 68.70% 68.65% -0.05%
==========================================
Files 507 507
Lines 52837 52842 +5
==========================================
- Hits 36300 36279 -21
- Misses 13717 13742 +25
- Partials 2820 2821 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jhrozek
added a commit
to stacklok/docs-website
that referenced
this pull request
Apr 8, 2026
AWS MCP Server no longer uses aws-mcp:* IAM actions. Authorization now happens at the AWS service level using two new condition keys: aws:ViaAWSMCPService and aws:CalledViaAWSMCP. - Replace aws-mcp:* permission model explanation with new single-layer model and document both condition keys - Update default role policy to use sts:GetCallerIdentity scoped to aws:ViaAWSMCPService with a BoolIfExists deny guardrail - Update S3 role policy to use service-level actions with aws:CalledViaAWSMCP condition - Add security best practices section covering the deny guardrail pattern, BoolIfExists truth table, and condition key guidance - Update troubleshooting section to reflect service-level errors - Add missing service: aws-mcp field to MCPExternalAuthConfig example - Add resourceUrl to MCPRemoteProxy oidcConfig example for OAuth protected resource discovery Depends on stacklok/toolhive#4670 (SigV4 proxy header fix). Fixes #587 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 tasks
ChrisJBurns
approved these changes
Apr 8, 2026
When requests arrive through a gateway (e.g. ngrok), `X-Forwarded-*` headers get signed by SigV4. Then `httputil.ReverseProxy.SetXForwarded()` rewrites those values, causing AWS to reject with 401 due to signature mismatch. Strip `X-Forwarded-For`/`Host`/`Proto`, `X-Real-Ip`, and `Forwarded` (RFC 7239) from the signing clone before computing the signature. This regressed in 0791876 ("Bump Go to 1.26.0", #4040) which refactored the transparent proxy from `httputil.NewSingleHostReverseProxy` (using `Director`) to `&httputil.ReverseProxy{Rewrite: ...}`. The new `Rewrite` callback calls `pr.SetXForwarded()`, which injects `X-Forwarded-*` headers on the outbound request — something the old `Director`-based approach did not do. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
When requests arrive through a gateway (e.g. ngrok),
X-Forwarded-*headers get signed by SigV4. Thenhttputil.ReverseProxy.SetXForwarded()rewrites those values, causing AWS to reject with 401 due to signature mismatch. StripX-Forwarded-For/Host/Proto,X-Real-Ip, andForwarded(RFC 7239) from the signing clone before computing the signature.This regressed in 0791876 ("Bump Go to 1.26.0", #4040) which refactored the transparent proxy from
httputil.NewSingleHostReverseProxy(usingDirector) to&httputil.ReverseProxy{Rewrite: ...}. The newRewritecallback callspr.SetXForwarded(), which injectsX-Forwarded-*headers on the outbound request — something the oldDirector-based approach did not do.