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.
Replace the network filter upstream callback patch with a new one that adds an upstream/read filter callback
onDestinationSelected()
. This is called before a new upstream connection is attempted to give chance for the network policy to deny making the new connection. The connection-level local reset is translated to a newaccess_denied
stream reset reason, which in turn is translated to the HTTP response code403
.This new read filter callback is only called for new connections, and not for each HTTP request like the old one. This makes it necessary to revert the recent change to not perform HTTP policy enforcement on requests if policy did not have any HTTP rules. With this change the HTTP policy enforcement is always made, as the policy may have changed since the network policy enforcement was done, even if there are no HTTP rules.
A second Envoy patch is added for backwards compatibility to call the new callback on the downstream filter chain if no upstream filters respond to it. This patch can be removed once the oldest supported Cilium release installs the upstream Cilium network filter.