diff --git a/deploy/chart/vantage/templates/_helpers.tpl b/deploy/chart/vantage/templates/_helpers.tpl index 367114e..842cf5b 100644 --- a/deploy/chart/vantage/templates/_helpers.tpl +++ b/deploy/chart/vantage/templates/_helpers.tpl @@ -72,6 +72,8 @@ both read it. value: {{ .Values.server.env.proxyAdvertiseHost | quote }} - name: PROXY_LISTEN_HOST value: {{ .Values.server.env.proxyListenHost | quote }} +- name: TRUSTED_PROXIES + value: {{ .Values.server.env.trustedProxies | quote }} {{- if eq .Values.server.env.deploymentType "cloud" }} - name: VANTAGE_DEPLOYMENT value: "cloud" diff --git a/deploy/chart/vantage/values.yaml b/deploy/chart/vantage/values.yaml index 2222c0a..f325573 100644 --- a/deploy/chart/vantage/values.yaml +++ b/deploy/chart/vantage/values.yaml @@ -63,6 +63,7 @@ server: appRootLabel: vantage proxyAdvertiseHost: "{{ .Release.Name }}-server" proxyListenHost: "0.0.0.0" + trustedProxies: "10.0.0.0/8,172.16.0.0/12,192.168.0.0/16" persistence: enabled: false size: 1Gi @@ -94,6 +95,7 @@ ingress: paths: - /api/ - /auth/ + - /public/ - /update - /install - /update.ps1 diff --git a/deploy/docker/docker-compose.yml b/deploy/docker/docker-compose.yml index 0845f41..84e0efb 100644 --- a/deploy/docker/docker-compose.yml +++ b/deploy/docker/docker-compose.yml @@ -47,6 +47,7 @@ services: KEY_ENCRYPTION_KEY: ${KEY_ENCRYPTION_KEY:-} GUACD_ADDR: guacd:4822 PROXY_ADVERTISE_HOST: server + TRUSTED_PROXIES: ${TRUSTED_PROXIES:-10.0.0.0/8,172.16.0.0/12,192.168.0.0/16} depends_on: redis: condition: service_healthy diff --git a/docsite/docs/reference/environment-variables.md b/docsite/docs/reference/environment-variables.md index b0239a3..ab09677 100644 --- a/docsite/docs/reference/environment-variables.md +++ b/docsite/docs/reference/environment-variables.md @@ -25,7 +25,7 @@ it is absent. | `VANTAGE_LICENSE` | no | | A licence supplied at startup, so an automated install does not have to paste one in | | `VANTAGE_TRIVY_DB_REF` | no | `ghcr.io/aquasecurity/trivy-db:2` | Where the vulnerability database is pulled from. Point it at a mirror for an air-gapped install | | `VANTAGE_VULNDB_DISABLED` | no | | `true` switches [vulnerability scanning](../vantage/vulnerabilities.md) off entirely. Findings already stored are still served, and still shown as stale | -| `TRUSTED_PROXIES` | no | | Comma-separated CIDRs or addresses of proxies allowed to set `X-Forwarded-For`. Unset trusts none, so the client address is the direct peer — behind a reverse proxy that makes every visitor share one address for rate-limiting purposes. Set it to your proxy's range | +| `TRUSTED_PROXIES` | no | `10.0.0.0/8,172.16.0.0/12,192.168.0.0/16` | Comma-separated CIDRs or addresses of proxies allowed to set `X-Forwarded-For`. The shipped Docker Compose and Helm chart default to the private RFC1918 ranges, which covers Nginx Proxy Manager on the Docker bridge network and Traefik on a Kubernetes pod CIDR. An operator whose proxy sits on a public address must set this themselves, or every visitor behind it shares one address for rate-limiting purposes. Unset entirely (outside those shipped defaults) trusts none, so the client address is the direct peer | :::danger `KEY_ENCRYPTION_KEY` has no recovery path It encrypts SSH private keys, vault secrets, OIDC client secrets and console