Repository navigation
Conversation
An endpoint without a protocol still has its HTTP request paths canonicalized, and %2F is rejected, but allow_encoded_slash is not consulted: the CONNECT passthrough relay and the forward proxy both parse strictly. Add tests for a modeless endpoint with allow_encoded_slash true, false and omitted, through the route-less HTTP relay (prepare_http_relay and relay_http_stream with a decision from a real policy evaluation) and through handle_forward_proxy. Each first forwards a plain path as a setup check. The true cases fail until the supervisor honors the flag. Signed-off-by: mr-miles <[email protected]>
NVIDIA#5643) Policy validation accepts allow_encoded_slash on an endpoint without a protocol, and that mode still canonicalizes HTTP request paths and rejects %2F, but the flag never reached the parser: a modeless endpoint has no L7 config, so the route-less relay parsed with strict defaults and the forward proxy read the flag only from inspected route configs. Read the opt-in from the matched endpoint records, which carry modeless endpoints, and pass it to the passthrough relay and to the forward proxy's canonicalizer when no inspected route applies. Overlapping modeless endpoints combine, like their allows. Inspected endpoints keep the per-endpoint re-check, and endpoint_configs is unchanged, so a modeless endpoint cannot shadow an inspected endpoint's TLS mode or protocol. Update the passthrough rejection hint and the network rules docs. Signed-off-by: mr-miles <[email protected]>
This branch has not been deployed
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.
Summary
Policy validation accepts allow_encoded_slash on an endpoint without a protocol, and that mode still canonicalizes HTTP request paths and rejects %2F, but the supervisor ignored the flag. This PR makes modeless endpoints honor it on both the CONNECT relay and the forward proxy.
Related Issue
Closes #5643
Changes
Release Notes
Endpoints without a protocol now honor allow_encoded_slash: true, so request paths containing %2F (for example npm scoped packages) are forwarded instead of rejected. Without the flag, they are still rejected.
Testing
Checklist