router: remove upstream failure details from downstream body#44746
Merged
ggreenway merged 4 commits intoenvoyproxy:mainfrom May 1, 2026
Merged
router: remove upstream failure details from downstream body#44746ggreenway merged 4 commits intoenvoyproxy:mainfrom
ggreenway merged 4 commits intoenvoyproxy:mainfrom
Conversation
When an upstream request fails, a local response is generated for the failure which previously included %UPSTREAM_TRANSPORT_FAILURE_REASON%. This could include details such as invalid CAs or SAN mismatch, which are inappropriate to send to the client by default. This data is still included in all of uses of this substitution format string (access logs, traces, etc). Fixes envoyproxy#44694 Signed-off-by: Greg Greenway <ggreenway@apple.com>
Signed-off-by: Greg Greenway <ggreenway@apple.com>
ravenblackx
previously approved these changes
Apr 30, 2026
Contributor
|
Looks like there's still some other tests being too sensitive. |
ravenblackx
approved these changes
May 1, 2026
Comment on lines
+418
to
419
| {":status", "503"}, {"content-length", "98"}, {"content-type", "text/plain"}}; | ||
| EXPECT_CALL(callbacks_, encodeHeaders_(HeaderMapEqualRef(&response_headers), false)); |
Contributor
There was a problem hiding this comment.
FYI for future things, you can implement this sort of thing in pure matchers something like
EXPECT_CALL(callbacks_, encodeHeaders_(AllOf(ContainsHeader(":status", "503"), ContainsHeader("content-type", "text/plain")), false));
And rather than validating content-length which is fragile and unreadable, could validate
EXPECT_CALL(callbacks_, encodeData(BufferStringContains("some substr of the body"), true));
(Which is also a bad matcher but I've already digressed.)
Member
Author
There was a problem hiding this comment.
Good to know! I agree these are really fragile right now.
Member
|
Hi @ggreenway @wbpcode @phlax could we back port this to 1.8 ? |
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 an upstream request fails, a local response is generated for the failure which previously included
%UPSTREAM_TRANSPORT_FAILURE_REASON%. This could include details such as invalid CAs or SAN mismatch, which are inappropriate to send to the client by default. This data is still included in all of uses of this substitution format string (access logs, traces, etc).
Fixes #44694
Additional Description:
Risk Level: Medium (behavior change)
Testing: Adjusted and added tests
Docs Changes: This behavior wasn't documented