-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* 5579 extended http methods (#9633) * Check-in before codegen * Initial commit Includes an e2e test and an attempt at implementing the fix. However, the test fails, so clearly the fix doesn't actually work * Get the implementation working Currently it's a bit of a hack as I just stuffed the functionality into the hcm plugin. I would like to move it elsewhere * Add plugin README * Move configuration to a new plugin * Codegen/formatting updates * Add makefile documentation on building docker images * Update projects/gloo/api/v1/options/header_validation/header_validation.proto Co-authored-by: Bernie Birnbaum <[email protected]> * Address some review comments Namely, remove the new plugin and stuff the functionality into the existing HCM plugin. Also, add a little more documentation on expected breaking changes when UHV is enabled. * Only allow header validation on gateway * Update documentation * Update protobuf API to use a oneof * Add unit test * Add changelog * Fix a compilation error * Add http/2 test * Revert "Add http/2 test" This reverts commit 28f0fe5. * Re-run codegen * Move changelog * Update e2e test documentation * Update API and documentation * Rename API to disable_method_validation * Rename custom_methods `oneof` to header_method_validation * Change disableMethodValidation to disableHttp1MethodValidation * Update a renamed proto variable * Update e2e test to use new framework * Fix some ginkgo methods * Remove duplicated test * Update projects/gloo/api/v1/options/header_validation/header_validation.proto Co-authored-by: Seth Heidkamp <[email protected]> * Add negative test to plugin unit test * Add an additional test * Re-run codegen --------- Co-authored-by: Bernie Birnbaum <[email protected]> Co-authored-by: Seth Heidkamp <[email protected]> Co-authored-by: Nathan Fudenberg <[email protected]> * Adding changelog file to new location * Deleting changelog file from old location --------- Co-authored-by: Bernie Birnbaum <[email protected]> Co-authored-by: Seth Heidkamp <[email protected]> Co-authored-by: Nathan Fudenberg <[email protected]> Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> Co-authored-by: changelog-bot <changelog-bot>
- Loading branch information
1 parent
7d4fa08
commit cc4f943
Showing
20 changed files
with
721 additions
and
195 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
8 changes: 8 additions & 0 deletions
8
changelog/v1.17.0-rc8/5579-support-extended-http-methods.yaml
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,8 @@ | ||
changelog: | ||
- type: NEW_FEATURE | ||
issueLink: https://github.com/solo-io/gloo/issues/5579 | ||
resolvesIssue: true | ||
description: >- | ||
Enable Envoy to accept requests with extended HTTP methods (such as `LABEL` | ||
or `UPDATE`). Previously, requests with these methods would return an HTTP | ||
400 response. Currently, this functionality is supported for HTTP/1 only. |
2 changes: 2 additions & 0 deletions
2
.../reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/options.proto.sk.md
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
45 changes: 45 additions & 0 deletions
45
...oo/projects/gloo/api/v1/options/header_validation/header_validation.proto.sk.md
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
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
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
24 changes: 24 additions & 0 deletions
24
projects/gloo/api/v1/options/header_validation/header_validation.proto
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,24 @@ | ||
syntax = "proto3"; | ||
package header_validation.options.gloo.solo.io; | ||
|
||
import "google/protobuf/empty.proto"; | ||
|
||
option go_package = "github.com/solo-io/gloo/projects/gloo/pkg/api/v1/options/header_validation"; | ||
|
||
message HeaderValidationSettings { | ||
// How header methods will be validated. By default, Envoy will | ||
// validate HTTP methods for HTTP/1 connections against the default set of allowed methods. | ||
// The default allowed methods can be found here: | ||
// https://github.com/envoyproxy/envoy/blob/2970ddbd4ade787dd51dfbe605ae2e8c5d8ffcf7/source/common/http/http1/balsa_parser.cc#L54 | ||
// or here, if Universal Header Validation is enabled: | ||
// https://github.com/envoyproxy/envoy/blob/0b9f67e7f71bcba3ff49575dc61676478cb68614/source/extensions/http/header_validators/envoy_default/header_validator.cc#L53 | ||
// Invalid methods on HTTP/1 requests will be rejected with a HTTP 400 | ||
// response. | ||
// For HTTP/2, Envoy does not validate header methods by default. | ||
oneof header_method_validation { | ||
// Disable method validation. Envoy will not perform any validation on | ||
// the method provided in the HTTP header. | ||
google.protobuf.Empty disable_http1_method_validation = 1; | ||
} | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.