Skip to content

Commit fb59935

Browse files
committed
chart: surface April 2026 security hardening flags
Adds the new CLI flags introduced by the April 2026 authorizer security batch (https://github.com/authorizerdev/authorizer PRs #582–#590) so operators can configure them through values.yaml instead of having to edit the deployment template directly. values.yaml — new fields under authorizer: - trusted_proxies (default null) — comma-separated CIDRs of reverse proxies whose X-Forwarded-For will be honoured. The new authorizer binary defaults to "trust nothing" so per-IP rate limiting and audit logs key on RemoteAddr; operators behind an ingress controller, nginx, or Cloudflare must set this explicitly. See https://docs.authorizer.dev/core/security#trusted-proxies - refresh_token_expires_in (default null → 30 days in the binary) — refresh-token lifetime in seconds. Previously hardcoded. - enable_hsts (default false) — opt in to HSTS. Only enable behind TLS. - disable_csp (default false) — escape hatch for the default CSP. - graphql_max_complexity / graphql_max_depth / graphql_max_aliases / graphql_max_body_bytes — GraphQL query DoS limits, all configurable with safe defaults that match the binary defaults (300 / 15 / 30 / 1 MiB). Also documents in the admin_secret comment that the field is now required and non-empty: the authorizer binary refuses to start when --admin-secret is empty as of the same release. Operators upgrading from a chart that left admin_secret null will see a startup failure unless they set it. templates/deployment.yaml: - Add the new --trusted-proxies / --refresh-token-expires-in / --enable-hsts / --disable-csp / --graphql-max-* CLI flags to the sh -c args block, alongside the existing security flags. Defaults in the args block match the values.yaml defaults so the chart can be installed with no extra configuration. - Add the corresponding env entries beneath the SMTP block. GRAPHQL_MAX_BODY_BYTES is rendered through int64 + toString to avoid the float-conversion bug where 1048576 ends up as "1.048576e+06" in the rendered manifest. helm lint and helm template both pass; the new env vars render as expected in the dry-run output.
1 parent 8d28a45 commit fb59935

2 files changed

Lines changed: 72 additions & 1 deletion

File tree

templates/deployment.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ spec:
7878
--host="${HOST:-0.0.0.0}" \
7979
--http-port="${PORT:-8080}" \
8080
--metrics-port="${METRICS_PORT:-8081}" \
81+
--trusted-proxies="${TRUSTED_PROXIES}" \
82+
--refresh-token-expires-in="${REFRESH_TOKEN_EXPIRES_IN:-2592000}" \
83+
--enable-hsts="${ENABLE_HSTS:-false}" \
84+
--disable-csp="${DISABLE_CSP:-false}" \
85+
--graphql-max-complexity="${GRAPHQL_MAX_COMPLEXITY:-300}" \
86+
--graphql-max-depth="${GRAPHQL_MAX_DEPTH:-15}" \
87+
--graphql-max-aliases="${GRAPHQL_MAX_ALIASES:-30}" \
88+
--graphql-max-body-bytes="${GRAPHQL_MAX_BODY_BYTES:-1048576}" \
8189
--log-level="${LOG_LEVEL:-info}" \
8290
--enable-login-page="${ENABLE_LOGIN_PAGE:-true}" \
8391
--enable-playground="${ENABLE_PLAYGROUND:-true}" \
@@ -346,6 +354,29 @@ spec:
346354
value: "{{ .Values.authorizer.smtp_sender_name }}"
347355
{{- end }}
348356

357+
# April 2026 security hardening flags. See values.yaml for the
358+
# operational notes attached to each one.
359+
{{- if .Values.authorizer.trusted_proxies }}
360+
- name: "TRUSTED_PROXIES"
361+
value: {{ .Values.authorizer.trusted_proxies | quote }}
362+
{{- end }}
363+
{{- if .Values.authorizer.refresh_token_expires_in }}
364+
- name: "REFRESH_TOKEN_EXPIRES_IN"
365+
value: {{ .Values.authorizer.refresh_token_expires_in | toString | quote }}
366+
{{- end }}
367+
- name: "ENABLE_HSTS"
368+
value: {{ .Values.authorizer.enable_hsts | default false | toString | quote }}
369+
- name: "DISABLE_CSP"
370+
value: {{ .Values.authorizer.disable_csp | default false | toString | quote }}
371+
- name: "GRAPHQL_MAX_COMPLEXITY"
372+
value: {{ .Values.authorizer.graphql_max_complexity | default 300 | toString | quote }}
373+
- name: "GRAPHQL_MAX_DEPTH"
374+
value: {{ .Values.authorizer.graphql_max_depth | default 15 | toString | quote }}
375+
- name: "GRAPHQL_MAX_ALIASES"
376+
value: {{ .Values.authorizer.graphql_max_aliases | default 30 | toString | quote }}
377+
- name: "GRAPHQL_MAX_BODY_BYTES"
378+
value: {{ int64 (default 1048576 .Values.authorizer.graphql_max_body_bytes) | toString | quote }}
379+
349380
{{- if .Values.extraEnv }}
350381
{{- toYaml .Values.extraEnv | nindent 10 }}
351382
{{- end }}

values.yaml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,11 @@ authorizer:
137137
# OAuth client secret (required)
138138
client_secret: null
139139

140-
# Admin secret
140+
# Admin secret (--admin-secret).
141+
# REQUIRED, non-empty. As of the April 2026 security release the
142+
# authorizer binary refuses to start when --admin-secret is empty —
143+
# the previous insecure "password" default has been removed. Pick any
144+
# non-empty value; the strength of the secret is your responsibility.
141145
admin_secret: null
142146

143147
# JWT type (e.g. HS256, RS256)
@@ -181,3 +185,39 @@ authorizer:
181185

182186
# SMTP sender name
183187
smtp_sender_name: null
188+
189+
# ----------------------------------------------------------------------
190+
# April 2026 security hardening flags
191+
# ----------------------------------------------------------------------
192+
193+
# Trusted reverse-proxy networks (--trusted-proxies). Comma-separated CIDRs.
194+
# Empty (the default) means gin uses RemoteAddr and ignores X-Forwarded-For
195+
# — safe out of the box. If Authorizer is behind an ingress controller,
196+
# nginx, Cloudflare, etc., set this to the proxy network or per-IP rate
197+
# limiting and audit logs will key on the proxy IP. See
198+
# https://docs.authorizer.dev/core/security#trusted-proxies
199+
trusted_proxies: null
200+
201+
# Refresh-token lifetime in seconds (--refresh-token-expires-in).
202+
# Default 30 days (2592000). Shorten for higher-security deployments;
203+
# lengthen for long-lived sessions.
204+
refresh_token_expires_in: null
205+
206+
# Strict-Transport-Security response header (--enable-hsts).
207+
# Off by default — only enable behind TLS, otherwise browsers will be
208+
# locked out for a year (max-age=31536000).
209+
enable_hsts: false
210+
211+
# Disable the default Content-Security-Policy header (--disable-csp).
212+
# CSP is on by default with a conservative policy. Set true ONLY as an
213+
# escape hatch if the default policy breaks a customised dashboard.
214+
disable_csp: false
215+
216+
# GraphQL query limits (--graphql-max-*). Defaults are conservative;
217+
# raise individually if your legitimate operation surface needs them.
218+
# Rejections are emitted as the authorizer_graphql_limit_rejections_total
219+
# Prometheus counter, labelled by the limit kind that tripped.
220+
graphql_max_complexity: 300
221+
graphql_max_depth: 15
222+
graphql_max_aliases: 30
223+
graphql_max_body_bytes: 1048576

0 commit comments

Comments
 (0)