-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[http] API changes to split path header normalization and forwarding (#…
…15044) * Configuration for path normalization so that normalization can be configured for internal only use and/or forwarding. Signed-off-by: Asra Ali <[email protected]>
- Loading branch information
Showing
16 changed files
with
326 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
api/envoy/extensions/filters/network/http_connection_manager/v4alpha/BUILD
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
49 changes: 48 additions & 1 deletion
49
.../extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.proto
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
syntax = "proto3"; | ||
|
||
package envoy.type.http.v3; | ||
|
||
import "udpa/annotations/migrate.proto"; | ||
import "udpa/annotations/status.proto"; | ||
import "validate/validate.proto"; | ||
|
||
option java_package = "io.envoyproxy.envoy.type.http.v3"; | ||
option java_outer_classname = "PathTransformationProto"; | ||
option java_multiple_files = true; | ||
option (udpa.annotations.file_status).package_version_status = ACTIVE; | ||
|
||
// [#protodoc-title: Path Transformations API] | ||
|
||
// PathTransformation defines an API to apply a sequence of operations that can be used to alter | ||
// text before it is used for matching or routing. Multiple actions can be applied in the same | ||
// Transformation, forming a sequential pipeline. The transformations will be performed in the order | ||
// that they appear. | ||
// | ||
// This API is a work in progress. | ||
|
||
message PathTransformation { | ||
// A type of operation to alter text. | ||
message Operation { | ||
// Should text be normalized according to RFC 3986? This typically is used for path headers | ||
// before any processing of requests by HTTP filters or routing. This applies percent-encoded | ||
// normalization and path segment normalization. Fails on characters disallowed in URLs | ||
// (e.g. NULLs). See `Normalization and Comparison | ||
// <https://tools.ietf.org/html/rfc3986#section-6>`_ for details of normalization. Note that | ||
// this options does not perform `case normalization | ||
// <https://tools.ietf.org/html/rfc3986#section-6.2.2.1>`_ | ||
message NormalizePathRFC3986 { | ||
} | ||
|
||
// Determines if adjacent slashes are merged into one. A common use case is for a request path | ||
// header. Using this option in `:ref: PathNormalizationOptions | ||
// <envoy_api_msg_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathNormalizationOptions>` | ||
// will allow incoming requests with path `//dir///file` to match against route with `prefix` | ||
// match set to `/dir`. When using for header transformations, note that slash merging is not | ||
// part of `HTTP spec <https://tools.ietf.org/html/rfc3986>`_ and is provided for convenience. | ||
message MergeSlashes { | ||
} | ||
|
||
oneof operation_specifier { | ||
option (validate.required) = true; | ||
|
||
// Enable path normalization per RFC 3986. | ||
NormalizePathRFC3986 normalize_path_rfc_3986 = 2; | ||
|
||
// Enable merging adjacent slashes. | ||
MergeSlashes merge_slashes = 3; | ||
} | ||
} | ||
|
||
// A list of operations to apply. Transformations will be performed in the order that they appear. | ||
repeated Operation operations = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
generated_api_shadow/envoy/extensions/filters/network/http_connection_manager/v3/BUILD
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
45 changes: 44 additions & 1 deletion
45
...envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
generated_api_shadow/envoy/extensions/filters/network/http_connection_manager/v4alpha/BUILD
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.