What would you like to be added?
Relax the clientIPGeoLocations validator so that ClientTrafficPolicy.spec.clientIPDetection is no longer mandatory. When omitted, EG should emit the geoip filter without xff_config / custom_header_config, letting Envoy fall back to its native default: the downstream connection source address (TCP peer).
No new CRD fields needed — only relaxing the check in validateAuthorizationGeoIP:
if clientIPDetection == nil {
return nil, errors.New("authorization clientIPGeoLocations requires ClientTrafficPolicy.spec.clientIPDetection to be configured")
}
Why is this needed?
Envoy's HTTP geoip filter (proto) supports three IP-source modes:
xff_config set → use XFF
custom_header_config set → use a named header
- Neither set → use the downstream connection source address
EG today only exposes modes 1 and 2. Mode 3 — Envoy's own default and the correct behavior for L4-transparent topologies — is unreachable through any EG configuration.
This matters for setups behind L4-transparent load balancers that preserve the client source IP at TCP level and don't touch HTTP headers, e.g.:
- AWS NLB with
target-type: instance + externalTrafficPolicy: Local
- Azure Standard Load Balancer (default behavior)
In these topologies the TCP peer is the real client IP. The current workaround — setting numTrustedHops: 1 purely to satisfy the validator — also opens an XFF spoofing window, since EG then asks Envoy to trust whatever the client puts in XFF.
Proposed solution
In validateAuthorizationGeoIP: accept nil clientIPDetection, and emit the geoip filter without xff_config / custom_header_config in that case. Operator intent is expressed by omission, mirroring raw Envoy config.
Environment
- Envoy Gateway: v1.8.0-rc.1+
- Topology: Client → AWS NLB / Azure Standard LB → Envoy Gateway → Backend
What would you like to be added?
Relax the
clientIPGeoLocationsvalidator so thatClientTrafficPolicy.spec.clientIPDetectionis no longer mandatory. When omitted, EG should emit the geoip filter withoutxff_config/custom_header_config, letting Envoy fall back to its native default: the downstream connection source address (TCP peer).No new CRD fields needed — only relaxing the check in
validateAuthorizationGeoIP:Why is this needed?
Envoy's HTTP geoip filter (proto) supports three IP-source modes:
xff_configset → use XFFcustom_header_configset → use a named headerEG today only exposes modes 1 and 2. Mode 3 — Envoy's own default and the correct behavior for L4-transparent topologies — is unreachable through any EG configuration.
This matters for setups behind L4-transparent load balancers that preserve the client source IP at TCP level and don't touch HTTP headers, e.g.:
target-type: instance+externalTrafficPolicy: LocalIn these topologies the TCP peer is the real client IP. The current workaround — setting
numTrustedHops: 1purely to satisfy the validator — also opens an XFF spoofing window, since EG then asks Envoy to trust whatever the client puts in XFF.Proposed solution
In
validateAuthorizationGeoIP: accept nilclientIPDetection, and emit the geoip filter withoutxff_config/custom_header_configin that case. Operator intent is expressed by omission, mirroring raw Envoy config.Environment