Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
96041c7
Partial work
ryanrolds Nov 1, 2024
1120361
Some more partial work
ryanrolds Nov 1, 2024
4730779
Added EHM to HCM settings
ryanrolds Nov 1, 2024
d32d60e
Merge main into rolds/early_header_mutation
soloio-bulldozer[bot] Nov 1, 2024
5b8acd6
Merge refs/heads/main into rolds/early_header_mutation
soloio-bulldozer[bot] Nov 1, 2024
2fe7a8b
Merge refs/heads/main into rolds/early_header_mutation
soloio-bulldozer[bot] Nov 1, 2024
b37bec9
Some work on the transform
ryanrolds Nov 1, 2024
ac6c98c
Merge branch 'rolds/early_header_mutation' of ssh://github.com/solo-i…
ryanrolds Nov 1, 2024
693a879
Adjusted fields for HCM Early Header Manipulation settings
ryanrolds Nov 4, 2024
1bb3d19
Adding changelog
ryanrolds Nov 4, 2024
510827c
Adjusted version of changelog
ryanrolds Nov 4, 2024
37ac4fd
Adjusted version of changelog
ryanrolds Nov 4, 2024
54854dc
Merge refs/heads/main into rolds/early_header_mutation
soloio-bulldozer[bot] Nov 5, 2024
0787a9c
Merge refs/heads/main into rolds/early_header_mutation
soloio-bulldozer[bot] Nov 5, 2024
56d862a
Merge refs/heads/main into rolds/early_header_mutation
soloio-bulldozer[bot] Nov 5, 2024
3f7b90c
Adding unit tests
ryanrolds Nov 5, 2024
8776526
Merge branch 'rolds/early_header_mutation' of ssh://github.com/solo-i…
ryanrolds Nov 5, 2024
d59ab1f
Adding changelog file to new location
Nov 5, 2024
78a11e2
Deleting changelog file from old location
Nov 5, 2024
4645e57
Start of E2E tests and adding httpbin upstream generator
ryanrolds Nov 5, 2024
9f00e1f
Merge branch 'rolds/early_header_mutation' of ssh://github.com/solo-i…
ryanrolds Nov 5, 2024
9f996ef
Merge refs/heads/main into rolds/early_header_mutation
soloio-bulldozer[bot] Nov 6, 2024
36ba6d0
Merge refs/heads/main into rolds/early_header_mutation
soloio-bulldozer[bot] Nov 6, 2024
fc9b96b
Merge refs/heads/main into rolds/early_header_mutation
soloio-bulldozer[bot] Nov 6, 2024
5cde89e
Additional header e2e tests
ryanrolds Nov 6, 2024
2322f5d
Merge branch 'rolds/early_header_mutation' of ssh://github.com/solo-i…
ryanrolds Nov 6, 2024
0a26cff
Trying adjustment to runnings tests to address wrong wrapper containe…
ryanrolds Nov 6, 2024
ca5995f
Adding changelog file to new location
Nov 6, 2024
a61d45d
Deleting changelog file from old location
Nov 6, 2024
12c4470
Ran a generate
ryanrolds Nov 6, 2024
7d2e3e5
Merge refs/heads/main into rolds/early_header_mutation
soloio-bulldozer[bot] Nov 6, 2024
ea401db
Additional tests to confirm intraction with zipkin works as expected
ryanrolds Nov 6, 2024
5af0172
Merge branch 'rolds/early_header_mutation' of ssh://github.com/solo-i…
ryanrolds Nov 6, 2024
9386537
Merge refs/heads/main into rolds/early_header_mutation
soloio-bulldozer[bot] Nov 7, 2024
3a139a7
Adjusted tests and comments
ryanrolds Nov 7, 2024
bc38ff8
Merge branch 'rolds/early_header_mutation' of ssh://github.com/solo-i…
ryanrolds Nov 7, 2024
79376da
Merge refs/heads/main into rolds/early_header_mutation
soloio-bulldozer[bot] Nov 7, 2024
0f0b56c
Removed focus
ryanrolds Nov 7, 2024
e50d36a
Merge branch 'rolds/early_header_mutation' of ssh://github.com/solo-i…
ryanrolds Nov 7, 2024
b745539
Removed setting of ENVOY_GLOO_TAG in make test
ryanrolds Nov 7, 2024
dea49ea
Update changelog/v1.18.0-beta34/early-header-manipulation.yaml
Nov 7, 2024
552b00e
Update changelog/v1.18.0-beta34/early-header-manipulation.yaml
Nov 7, 2024
29e2475
Merge refs/heads/main into rolds/early_header_mutation
soloio-bulldozer[bot] Nov 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ SOURCES := $(shell find . -name "*.go" | grep -v test.go)
# for more information, see https://github.com/solo-io/gloo/pull/9633
# and
# https://soloio.slab.com/posts/extended-http-methods-design-doc-40j7pjeu
ENVOY_GLOO_IMAGE ?= quay.io/solo-io/envoy-gloo:1.31.2-patch1
ENVOY_GLOO_IMAGE ?= quay.io/solo-io/envoy-gloo:1.31.2-patch3
LDFLAGS := "-X github.com/solo-io/gloo/pkg/version.Version=$(VERSION)"
GCFLAGS ?=

Expand Down
22 changes: 22 additions & 0 deletions changelog/v1.18.0-beta34/early-header-manipulation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
changelog:
- type: NEW_FEATURE
issueLink: https://github.com/solo-io/gloo/issues/9604
description: >-
Added support for early header manipulation on Gateways.
This feature allows headers to be manipulated before significant processing
and routing decisions.
It affords the ability to add or remove headers that affect request processing
and can be used to implement override headers.
This can be configured by setting the
`gateway.spec.httpGateway.options.httpConnectionManagerSettings.earlyHeaderMutation` field.
The headersToAdd field will add key-value pair headers to the request if not already
present or overwrite them unless append is set to true.
The headersToRemove field removes the specified headers and is processed after
the headers have been added.
- type: DEPENDENCY_BUMP
dependencyOwner: solo-io
dependencyRepo: envoy-gloo
dependencyTag: 1.31.2-patch3
description: >
Bumped the Envoy version to 1.31.2-patch3.
Needed the Early Header Manipulation extensions enabled.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/content/static/content/osa_provided.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Name|Version|License
[inconshreveable/go-update](https://github.com/inconshreveable/go-update)|v0.0.0-20160112193335-8152e7eb6ccf|UNKNOWN
[jhump/protoreflect](https://github.com/jhump/protoreflect)|v1.15.3|Apache License 2.0
[kelseyhightower/envconfig](https://github.com/kelseyhightower/envconfig)|v1.4.0|MIT License
[go-httpbin/v2](https://github.com/mccutchen/go-httpbin)|v2.15.0|MIT License
[olekukonko/tablewriter](https://github.com/olekukonko/tablewriter)|v0.0.5|MIT License
[ginkgo/v2](https://github.com/onsi/ginkgo)|v2.20.1|MIT License
[onsi/gomega](https://github.com/onsi/gomega)|v1.34.2|MIT License
Expand Down
3 changes: 3 additions & 0 deletions docs/data/ProtoMap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,9 @@ apis:
header_validation.options.gloo.solo.io.HeaderValidationSettings:
relativepath: reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/options/header_validation/header_validation.proto.sk/#HeaderValidationSettings
package: header_validation.options.gloo.solo.io
headers.options.gloo.solo.io.EarlyHeaderManipulation:
relativepath: reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/options/headers/headers.proto.sk/#EarlyHeaderManipulation
package: headers.options.gloo.solo.io
headers.options.gloo.solo.io.HeaderManipulation:
relativepath: reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/options/headers/headers.proto.sk/#HeaderManipulation
package: headers.options.gloo.solo.io
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ require (
github.com/golang/mock v1.6.0
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.6.0
github.com/mccutchen/go-httpbin/v2 v2.15.0
github.com/quasilyte/go-ruleguard/dsl v0.3.22
github.com/stretchr/testify v1.9.0
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2374,6 +2374,8 @@ github.com/mattn/go-zglob v0.0.6/go.mod h1:MxxjyoXXnMxfIpxTK2GAkw1w8glPsQILx3N5w
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k=
github.com/mccutchen/go-httpbin/v2 v2.15.0 h1:3b2s8LMRR2aFd+8U+1Bx2kdgHNQ5ZQkQOiW8e52Jj9A=
github.com/mccutchen/go-httpbin/v2 v2.15.0/go.mod h1:GBy5I7XwZ4ZLhT3hcq39I4ikwN9x4QUt6EAxNiR8Jus=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
Expand Down
87 changes: 87 additions & 0 deletions install/helm/gloo/crds/gateway.solo.io_v1_Gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,35 @@ spec:
type: string
drainTimeout:
type: string
earlyHeaderManipulation:
properties:
headersToAdd:
items:
properties:
append:
nullable: true
type: boolean
header:
properties:
key:
type: string
value:
type: string
type: object
headerSecretRef:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
type: array
headersToRemove:
items:
type: string
type: array
type: object
enableTrailers:
nullable: true
type: boolean
Expand Down Expand Up @@ -1502,6 +1531,35 @@ spec:
type: string
drainTimeout:
type: string
earlyHeaderManipulation:
properties:
headersToAdd:
items:
properties:
append:
nullable: true
type: boolean
header:
properties:
key:
type: string
value:
type: string
type: object
headerSecretRef:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
type: array
headersToRemove:
items:
type: string
type: array
type: object
enableTrailers:
nullable: true
type: boolean
Expand Down Expand Up @@ -2817,6 +2875,35 @@ spec:
type: string
drainTimeout:
type: string
earlyHeaderManipulation:
properties:
headersToAdd:
items:
properties:
append:
nullable: true
type: boolean
header:
properties:
key:
type: string
value:
type: string
type: object
headerSecretRef:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
type: array
headersToRemove:
items:
type: string
type: array
type: object
enableTrailers:
nullable: true
type: boolean
Expand Down
29 changes: 29 additions & 0 deletions install/helm/gloo/crds/gateway.solo.io_v1_HttpListenerOption.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,35 @@ spec:
type: string
drainTimeout:
type: string
earlyHeaderManipulation:
properties:
headersToAdd:
items:
properties:
append:
nullable: true
type: boolean
header:
properties:
key:
type: string
value:
type: string
type: object
headerSecretRef:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
type: array
headersToRemove:
items:
type: string
type: array
type: object
enableTrailers:
nullable: true
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,35 @@ spec:
type: string
drainTimeout:
type: string
earlyHeaderManipulation:
properties:
headersToAdd:
items:
properties:
append:
nullable: true
type: boolean
header:
properties:
key:
type: string
value:
type: string
type: object
headerSecretRef:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
type: array
headersToRemove:
items:
type: string
type: array
type: object
enableTrailers:
nullable: true
type: boolean
Expand Down
4 changes: 4 additions & 0 deletions projects/gloo/api/v1/options/hcm/hcm.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import "google/protobuf/any.proto";
import "github.com/solo-io/gloo/projects/gloo/api/v1/options/tracing/tracing.proto";
import "github.com/solo-io/gloo/projects/gloo/api/v1/options/protocol_upgrade/protocol_upgrade.proto";
import "github.com/solo-io/gloo/projects/gloo/api/v1/options/protocol/protocol.proto";
import "github.com/solo-io/gloo/projects/gloo/api/v1/options/headers/headers.proto";


import "extproto/ext.proto";
Expand Down Expand Up @@ -240,4 +241,7 @@ message HttpConnectionManagerSettings {
InternalAddressConfig internal_address_config = 38;
// If true, configure Envoy to set the x-fowarded-port header to allow services to find Envoy's listener port.
google.protobuf.BoolValue append_x_forwarded_port = 40;

// Configuration for early header manipulation
headers.options.gloo.solo.io.EarlyHeaderManipulation early_header_manipulation = 41;
}
17 changes: 17 additions & 0 deletions projects/gloo/api/v1/options/headers/headers.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,23 @@ message HeaderManipulation {
repeated string response_headers_to_remove = 4;
}

// EarlyHeaderManipulation can be specified on Gateways to manipulate headers before significant processing
// has happened and routing decisions are made.
// Early header manipulation allows adding/removing headers that affect request processing
// and can be used to implement override headers.
// Note: The adding of headers happens before the removal of headers.
message EarlyHeaderManipulation {
// Specifies a list of HTTP headers that should be added to each request
// handled by this gateway. For more information, including
// details on header value syntax, see the
// [Envoy documentation](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/headers.html#) .
repeated .solo.io.envoy.api.v2.core.HeaderValueOption headers_to_add = 1;


// Specifies a list of HTTP headers that should be removed from each request
// handled by this gateway.
repeated string headers_to_remove = 2;
}

// Header name/value pair plus option to control append behavior.
message HeaderValueOption {
Expand Down
8 changes: 8 additions & 0 deletions projects/gloo/pkg/api/v1/options/hcm/hcm.pb.clone.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions projects/gloo/pkg/api/v1/options/hcm/hcm.pb.equal.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading