http: add support for skip filter match action (#14275)

Adds support for associating a match tree with a HTTP filter, supporting a single "Skip" operation that will have the FM
ignore the filter for the duration of the stream once matched.

Signed-off-by: Snow Pettersen <snowp@lyft.com>

Mirrored from https://github.com/envoyproxy/envoy @ 935a6598cd01324f03608ca77ebffc9608f7af81
pull/623/head
data-plane-api(Azure Pipelines) 4 years ago
parent bd25f5946f
commit 3bd2667b8e
  1. 2
      BUILD
  2. 1
      envoy/config/common/matcher/v3/matcher.proto
  3. 1
      envoy/config/common/matcher/v4alpha/matcher.proto
  4. 13
      envoy/extensions/common/matching/v3/BUILD
  5. 29
      envoy/extensions/common/matching/v3/extension_matcher.proto
  6. 14
      envoy/extensions/common/matching/v4alpha/BUILD
  7. 32
      envoy/extensions/common/matching/v4alpha/extension_matcher.proto
  8. 9
      envoy/extensions/filters/common/matcher/action/v3/BUILD
  9. 19
      envoy/extensions/filters/common/matcher/action/v3/skip_action.proto
  10. 2
      versioning/BUILD

@ -160,11 +160,13 @@ proto_library(
"//envoy/extensions/clusters/dynamic_forward_proxy/v3:pkg", "//envoy/extensions/clusters/dynamic_forward_proxy/v3:pkg",
"//envoy/extensions/clusters/redis/v3:pkg", "//envoy/extensions/clusters/redis/v3:pkg",
"//envoy/extensions/common/dynamic_forward_proxy/v3:pkg", "//envoy/extensions/common/dynamic_forward_proxy/v3:pkg",
"//envoy/extensions/common/matching/v3:pkg",
"//envoy/extensions/common/ratelimit/v3:pkg", "//envoy/extensions/common/ratelimit/v3:pkg",
"//envoy/extensions/common/tap/v3:pkg", "//envoy/extensions/common/tap/v3:pkg",
"//envoy/extensions/compression/gzip/compressor/v3:pkg", "//envoy/extensions/compression/gzip/compressor/v3:pkg",
"//envoy/extensions/compression/gzip/decompressor/v3:pkg", "//envoy/extensions/compression/gzip/decompressor/v3:pkg",
"//envoy/extensions/filters/common/fault/v3:pkg", "//envoy/extensions/filters/common/fault/v3:pkg",
"//envoy/extensions/filters/common/matcher/action/v3:pkg",
"//envoy/extensions/filters/http/adaptive_concurrency/v3:pkg", "//envoy/extensions/filters/http/adaptive_concurrency/v3:pkg",
"//envoy/extensions/filters/http/admission_control/v3alpha:pkg", "//envoy/extensions/filters/http/admission_control/v3alpha:pkg",
"//envoy/extensions/filters/http/aws_lambda/v3:pkg", "//envoy/extensions/filters/http/aws_lambda/v3:pkg",

@ -25,7 +25,6 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// might repeat several times until the final OnMatch (or no match) is decided. // might repeat several times until the final OnMatch (or no match) is decided.
// //
// This API is a work in progress. // This API is a work in progress.
// [#not-implemented-hide:]
message Matcher { message Matcher {
// What to do if a match is successful. // What to do if a match is successful.
message OnMatch { message OnMatch {

@ -24,7 +24,6 @@ option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSIO
// might repeat several times until the final OnMatch (or no match) is decided. // might repeat several times until the final OnMatch (or no match) is decided.
// //
// This API is a work in progress. // This API is a work in progress.
// [#not-implemented-hide:]
message Matcher { message Matcher {
option (udpa.annotations.versioning).previous_message_type = option (udpa.annotations.versioning).previous_message_type =
"envoy.config.common.matcher.v3.Matcher"; "envoy.config.common.matcher.v3.Matcher";

@ -0,0 +1,13 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/config/common/matcher/v3:pkg",
"//envoy/config/core/v3:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -0,0 +1,29 @@
syntax = "proto3";
package envoy.extensions.common.matching.v3;
import "envoy/config/common/matcher/v3/matcher.proto";
import "envoy/config/core/v3/extension.proto";
import "udpa/annotations/migrate.proto";
import "udpa/annotations/status.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.common.matching.v3";
option java_outer_classname = "ExtensionMatcherProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Extension Matcher]
// Wrapper around an existing extension that provides an associated matcher. This allows
// decorating an existing extension with a matcher, which can be used to match against
// relevant protocol data.
message ExtensionWithMatcher {
// The associated matcher.
config.common.matcher.v3.Matcher matcher = 1 [(validate.rules).message = {required: true}];
// The underlying extension config.
config.core.v3.TypedExtensionConfig extension_config = 2
[(validate.rules).message = {required: true}];
}

@ -0,0 +1,14 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/config/common/matcher/v4alpha:pkg",
"//envoy/config/core/v4alpha:pkg",
"//envoy/extensions/common/matching/v3:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -0,0 +1,32 @@
syntax = "proto3";
package envoy.extensions.common.matching.v4alpha;
import "envoy/config/common/matcher/v4alpha/matcher.proto";
import "envoy/config/core/v4alpha/extension.proto";
import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.common.matching.v4alpha";
option java_outer_classname = "ExtensionMatcherProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
// [#protodoc-title: Extension Matcher]
// Wrapper around an existing extension that provides an associated matcher. This allows
// decorating an existing extension with a matcher, which can be used to match against
// relevant protocol data.
message ExtensionWithMatcher {
option (udpa.annotations.versioning).previous_message_type =
"envoy.extensions.common.matching.v3.ExtensionWithMatcher";
// The associated matcher.
config.common.matcher.v4alpha.Matcher matcher = 1 [(validate.rules).message = {required: true}];
// The underlying extension config.
config.core.v4alpha.TypedExtensionConfig extension_config = 2
[(validate.rules).message = {required: true}];
}

@ -0,0 +1,9 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
api_proto_package(
deps = ["@com_github_cncf_udpa//udpa/annotations:pkg"],
)

@ -0,0 +1,19 @@
syntax = "proto3";
package envoy.extensions.filters.common.matcher.action.v3;
import "udpa/annotations/migrate.proto";
import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.common.matcher.action.v3";
option java_outer_classname = "SkipActionProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Common Match Actions]
// Indicates that the associated filter should be skipped.
message SkipFilter {
}

@ -43,11 +43,13 @@ proto_library(
"//envoy/extensions/clusters/dynamic_forward_proxy/v3:pkg", "//envoy/extensions/clusters/dynamic_forward_proxy/v3:pkg",
"//envoy/extensions/clusters/redis/v3:pkg", "//envoy/extensions/clusters/redis/v3:pkg",
"//envoy/extensions/common/dynamic_forward_proxy/v3:pkg", "//envoy/extensions/common/dynamic_forward_proxy/v3:pkg",
"//envoy/extensions/common/matching/v3:pkg",
"//envoy/extensions/common/ratelimit/v3:pkg", "//envoy/extensions/common/ratelimit/v3:pkg",
"//envoy/extensions/common/tap/v3:pkg", "//envoy/extensions/common/tap/v3:pkg",
"//envoy/extensions/compression/gzip/compressor/v3:pkg", "//envoy/extensions/compression/gzip/compressor/v3:pkg",
"//envoy/extensions/compression/gzip/decompressor/v3:pkg", "//envoy/extensions/compression/gzip/decompressor/v3:pkg",
"//envoy/extensions/filters/common/fault/v3:pkg", "//envoy/extensions/filters/common/fault/v3:pkg",
"//envoy/extensions/filters/common/matcher/action/v3:pkg",
"//envoy/extensions/filters/http/adaptive_concurrency/v3:pkg", "//envoy/extensions/filters/http/adaptive_concurrency/v3:pkg",
"//envoy/extensions/filters/http/admission_control/v3alpha:pkg", "//envoy/extensions/filters/http/admission_control/v3alpha:pkg",
"//envoy/extensions/filters/http/aws_lambda/v3:pkg", "//envoy/extensions/filters/http/aws_lambda/v3:pkg",

Loading…
Cancel
Save