Repository navigation
fix(gcp-install): trustedProxies is 2 behind the GKE Ingress, not 1 - #479
Conversation
Measured on a live GKE install (read-only): the Google external Application Load Balancer appends two X-Forwarded-For entries, "<client>, <load balancer address>". relay-control takes the Nth entry from the right, so the guide's trustedProxies: 1 selected the load balancer's address for every client: all users shared one per-address sign-in rate limit and one password lockout. - docs/gcp-install/values.yaml: trustedProxies: 2, with the reason. - docs/gcp-install/0-START-HERE.md: a section for installs made from an earlier copy of the guide: how to read the header from the relay-webapp access log, the value to set, and a "Done when" check. - relay-control and agent-relay READMEs: count the entries a proxy appends, not the proxies. Docs and the guide's values template only; no chart template or default changes, so no chart version bump. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
[Medium impact] The PR appears safe to merge.
|
…uests are refused Review feedback on #479: with a count one higher for a fronting proxy, a caller who connects to the load balancer directly can put any address in X-Forwarded-For and have the API trust it. The guide and the values template now say to raise the count only after the load balancer refuses requests that skip the proxy. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Second measurement, from the API's own view: the GKE proof install was moved from |
Why
The GKE install guide's
values.yamlsetrelay-control.auth.trustedProxies: 1("one hop: the Google load balancer"). That is one short.layered-infra-opsmeasured it on a live GKE install, read-only (three GETs of the dashboard, then the pod's access log):X-Forwarded-Forthe pod received<client>, <load balancer forwarding-rule address>198.51.100.7198.51.100.7, <client>, <load balancer address>The Google external Application Load Balancer appends two entries. relay-control takes the Nth entry from the right, so with 1 it uses the load balancer's own address for every client. Sign-in works, but all users share one per-address rate limit and one password lockout, so a few wrong passwords from anyone can lock everyone out for a while.
What changes
docs/gcp-install/values.yaml:trustedProxies: 2, with the reason in the comment.docs/gcp-install/0-START-HERE.md: a new section for installs made from an earlier copy of the guide. It shows how to read the header from therelay-webappaccess log, the value to set, and a "Done when" check on the renderedSELFHOST_TRUSTED_PROXIES.charts/relay-control/README.md,charts/agent-relay/README.md: count the entries a proxy appends, not the proxies; 2 behind the GKE Ingress.Docs and the guide's values template only. No chart template or default changes (the relay-control default of 1 stays right for a single appending proxy, such as the AWS ALB), so there is no chart version bump.
Limits of the measurement
relay-webapppod's nginx access log, not from relay-control, which logs no request headers. Both sit behind the same Ingress and forwarding rule.docs/azure-install/values.yamlalso hastrustedProxies: 1. It was not measured and is not changed here.Existing installs
Any GKE install made from the earlier guide still runs with 1 until its operator changes the value and upgrades. The new guide section is the upgrade note.
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.