fix(contrib/envoyproxy): use source.ip from ext_proc attributes#5036
Draft
e-n-0 wants to merge 5 commits into
Draft
fix(contrib/envoyproxy): use source.ip from ext_proc attributes#5036e-n-0 wants to merge 5 commits into
e-n-0 wants to merge 5 commits into
Conversation
Contributor
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
source.ipattribute from the structured Envoy ext_proc attribute namespace.forwardAttributes: [source.ip]deployment setting.The rollout assumes clients connect directly to the Google Cloud Load Balancer. Deployments must also restrict access to the ext_proc endpoint to the intended GCP Service Extension path. A CDN in front of GCLB requires its own separately trusted forwarding mechanism.
Motivation
The existing generic client-IP resolver intentionally falls back to forwarding headers. In the direct GCLB Service Extension topology, that can allow a client-supplied X-Forwarded-For value to become the AppSec identity even though GCLB can provide the connection source as trusted structured metadata.
Using the GCP
source.ipattribute fixes the trust boundary without changing shared resolver behavior for other tracers, integrations, or deployments.Related Google context:
Testing
go test -count=1 ./...incontrib/envoyproxy/go-control-planego test -race -count=1 ./...incontrib/envoyproxy/go-control-planego vet ./...incontrib/envoyproxy/go-control-planego test -count=1 ./instrumentation/httptrace ./instrumentation/appsec/proxy ./instrumentation/appsec/emitter/httpsec ./internal/appsec/listener/httpsec/...go test -race -count=1 ./instrumentation/httptrace ./instrumentation/appsec/proxy ./instrumentation/appsec/emitter/httpsec ./internal/appsec/listener/httpsec/...make test/appsecmake format/gomake fix-modules./bin/golangci-lint run --new-from-rev=origin/main ./contrib/envoyproxy/go-control-plane/... ./instrumentation/appsec/emitter/httpsec ./instrumentation/appsec/proxy ./instrumentation/httptrace ./internal/appsec/listener/httpsec/...The repository-wide lint target currently reports unrelated pre-existing
modernizefindings. The broader contrib target exceeded the local 10-minute limit after unrelated CI Visibility safe-directory failures; the complete affected Envoy module and root packages pass, including race detection.Reviewer's Checklist
make fix-modules.