aws_request_signing: extend api to allow excluding headers from signing (#18998)

Signed-off-by: Rex Chang <chiyc@amazon.com>

Mirrored from https://github.com/envoyproxy/envoy @ f4535b1deaf58a75779e6fb3d7a957d5d3847bbd
pull/626/head
data-plane-api(Azure Pipelines) 3 years ago
parent fbb11f5de5
commit 5cdce60966
  1. 5
      envoy/extensions/filters/http/aws_request_signing/v3/BUILD
  2. 14
      envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.proto

@ -5,5 +5,8 @@ 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"],
deps = [
"//envoy/type/matcher/v3:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -2,6 +2,8 @@ syntax = "proto3";
package envoy.extensions.filters.http.aws_request_signing.v3;
import "envoy/type/matcher/v3/string.proto";
import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
@ -16,6 +18,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#extension: envoy.filters.http.aws_request_signing]
// Top level configuration for the AWS request signing filter.
// [#next-free-field: 6]
message AwsRequestSigning {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.filter.http.aws_request_signing.v2alpha.AwsRequestSigning";
@ -48,4 +51,15 @@ message AwsRequestSigning {
// to calculate the payload hash. Not all services support this option. See the `S3
// <https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html>`_ policy for details.
bool use_unsigned_payload = 4;
// A list of request header string matchers that will be excluded from signing. The excluded header can be matched by
// any patterns defined in the StringMatcher proto (e.g. exact string, prefix, regex, etc).
//
// Example:
// match_excluded_headers:
// - prefix: x-envoy
// - exact: foo
// - exact: bar
// When applied, all headers that start with "x-envoy" and headers "foo" and "bar" will not be signed.
repeated type.matcher.v3.StringMatcher match_excluded_headers = 5;
}

Loading…
Cancel
Save