From f1e01bbea4a43ea06862053a4c905b641b96392d Mon Sep 17 00:00:00 2001 From: "update-envoy[bot]" <135279899+update-envoy[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 15:05:32 +0000 Subject: [PATCH] http: new disable flag to disable a filter in the filter chain by default (#30141) * http api: new disable flag to disable a filter in the filter chain by default Signed-off-by: wbpcode * complete development Signed-off-by: wbpcode * more tests to verify the new feature Signed-off-by: wbpcode * add release note Signed-off-by: wbpcode * fix link Signed-off-by: wbpcode * fix test Signed-off-by: wbpcode * Update api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto Co-authored-by: Matt Klein Signed-off-by: code * Update changelogs/current.yaml Co-authored-by: Matt Klein Signed-off-by: code * Update source/common/http/filter_chain_helper.h Co-authored-by: Matt Klein Signed-off-by: code * fix spelling error Signed-off-by: wbpcode * fix ci Signed-off-by: wbpcode --------- Signed-off-by: wbpcode Signed-off-by: code Co-authored-by: Matt Klein Mirrored from https://github.com/envoyproxy/envoy @ 9be3183433f30e9a726add174c80fd32cf6b7202 --- .../v3/http_connection_manager.proto | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto b/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto index f0ef0978..55c6f1aa 100644 --- a/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto +++ b/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto @@ -1132,7 +1132,7 @@ message ScopedRds { string srds_resources_locator = 2; } -// [#next-free-field: 7] +// [#next-free-field: 8] message HttpFilter { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.network.http_connection_manager.v2.HttpFilter"; @@ -1169,6 +1169,20 @@ message HttpFilter { // filter but otherwise accept the config. // Otherwise, clients that do not support this filter must reject the config. bool is_optional = 6; + + // If true, the filter is disabled by default and must be explicitly enabled by setting + // per filter configuration in the route configuration. + // + // A disabled filter will be treated as enabled in the following cases: + // + // 1. Valid per filter configuration is configured in the ``typed_per_filter_config`` of route config. + // 2. :ref:`FilterConfig ` is configured in the + // ``typed_per_filter_config`` of route config and the + // :ref:`disabled of FilterConfig ` + // is set to false. + // + // Terminal filters (e.g. ``envoy.filters.http.router``) cannot be marked as disabled. + bool disabled = 7; } message RequestIDExtension {