Set-Metadata HTTP filter (#16400)

This extension simply allows to add user-defined dynamic metadata. This is intended to be used with matchers, so that the "result" of a matching process can imply specific metadata.

See issue #16266

Risk Level: Medium
Testing: Unit tests for the extension are added
Docs Changes: A small documentation for the extension is added in docs/root/configuration/http/http_filters

Signed-off-by: Adrien Guinet <adrien@reblaze.com>

Mirrored from https://github.com/envoyproxy/envoy @ cbe08bbe33005c1832964f7c9e657d6dbe105bbb
pull/624/head
data-plane-api(Azure Pipelines) 4 years ago
parent 02f392131b
commit 9986c01e7c
  1. 1
      BUILD
  2. 9
      envoy/extensions/filters/http/set_metadata/v3/BUILD
  3. 31
      envoy/extensions/filters/http/set_metadata/v3/set_metadata.proto
  4. 1
      versioning/BUILD

@ -209,6 +209,7 @@ proto_library(
"//envoy/extensions/filters/http/ratelimit/v3:pkg",
"//envoy/extensions/filters/http/rbac/v3:pkg",
"//envoy/extensions/filters/http/router/v3:pkg",
"//envoy/extensions/filters/http/set_metadata/v3:pkg",
"//envoy/extensions/filters/http/squash/v3:pkg",
"//envoy/extensions/filters/http/tap/v3:pkg",
"//envoy/extensions/filters/http/wasm/v3:pkg",

@ -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,31 @@
syntax = "proto3";
package envoy.extensions.filters.http.set_metadata.v3;
import "google/protobuf/struct.proto";
import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.http.set_metadata.v3";
option java_outer_classname = "SetMetadataProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Set-Metadata Filter]
//
// This filters adds or updates dynamic metadata with static data.
//
// [#extension: envoy.filters.http.set_metadata]
message Config {
// The metadata namespace.
string metadata_namespace = 1 [(validate.rules).string = {min_len: 1}];
// The value to update the namespace with. See
// :ref:`the filter documentation <config_http_filters_set_metadata>` for
// more information on how this value is merged with potentially existing
// ones.
google.protobuf.Struct value = 2;
}

@ -92,6 +92,7 @@ proto_library(
"//envoy/extensions/filters/http/ratelimit/v3:pkg",
"//envoy/extensions/filters/http/rbac/v3:pkg",
"//envoy/extensions/filters/http/router/v3:pkg",
"//envoy/extensions/filters/http/set_metadata/v3:pkg",
"//envoy/extensions/filters/http/squash/v3:pkg",
"//envoy/extensions/filters/http/tap/v3:pkg",
"//envoy/extensions/filters/http/wasm/v3:pkg",

Loading…
Cancel
Save