Skip to content

Commit 37bd9e1

Browse files
committed
feat(chart): add TLS, rate limit burst and client cache settings
- Add server.tls.certFile/keyFile for optional HTTPS support - Add per-endpoint rate limit burst sizes for memory store - Add cache.client settings for OAuth client lookup cache
1 parent 164a03e commit 37bd9e1

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

templates/configmap.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ data:
99
SERVER_ADDR: {{ .Values.server.addr | quote }}
1010
BASE_URL: {{ .Values.server.baseUrl | quote }}
1111
ENVIRONMENT: {{ .Values.server.environment | quote }}
12+
{{- if and .Values.server.tls.certFile .Values.server.tls.keyFile }}
13+
TLS_CERT_FILE: {{ .Values.server.tls.certFile | quote }}
14+
TLS_KEY_FILE: {{ .Values.server.tls.keyFile | quote }}
15+
{{- end }}
1216

1317
# Database
1418
DATABASE_DRIVER: {{ .Values.database.driver | quote }}
@@ -60,9 +64,13 @@ data:
6064
RATE_LIMIT_STORE: {{ .Values.rateLimit.store | quote }}
6165
RATE_LIMIT_CLEANUP_INTERVAL: {{ .Values.rateLimit.cleanupInterval | quote }}
6266
LOGIN_RATE_LIMIT: {{ .Values.rateLimit.login | quote }}
67+
LOGIN_RATE_LIMIT_BURST: {{ .Values.rateLimit.loginBurst | quote }}
6368
DEVICE_CODE_RATE_LIMIT: {{ .Values.rateLimit.deviceCode | quote }}
69+
DEVICE_CODE_RATE_LIMIT_BURST: {{ .Values.rateLimit.deviceCodeBurst | quote }}
6470
TOKEN_RATE_LIMIT: {{ .Values.rateLimit.token | quote }}
71+
TOKEN_RATE_LIMIT_BURST: {{ .Values.rateLimit.tokenBurst | quote }}
6572
DEVICE_VERIFY_RATE_LIMIT: {{ .Values.rateLimit.deviceVerify | quote }}
73+
DEVICE_VERIFY_RATE_LIMIT_BURST: {{ .Values.rateLimit.deviceVerifyBurst | quote }}
6674
INTROSPECT_RATE_LIMIT: {{ .Values.rateLimit.introspect | quote }}
6775

6876
# Redis
@@ -112,6 +120,12 @@ data:
112120
CLIENT_COUNT_CACHE_CLIENT_TTL: {{ .Values.cache.clientCount.clientTTL | quote }}
113121
CLIENT_COUNT_CACHE_SIZE_PER_CONN: {{ .Values.cache.clientCount.sizePerConn | quote }}
114122

123+
# Client Cache (OAuth client lookups by client_id)
124+
CLIENT_CACHE_TYPE: {{ .Values.cache.client.type | quote }}
125+
CLIENT_CACHE_TTL: {{ .Values.cache.client.ttl | quote }}
126+
CLIENT_CACHE_CLIENT_TTL: {{ .Values.cache.client.clientTTL | quote }}
127+
CLIENT_CACHE_SIZE_PER_CONN: {{ .Values.cache.client.sizePerConn | quote }}
128+
115129
# OAuth Providers
116130
OAUTH_AUTO_REGISTER: {{ .Values.oauth.autoRegister | quote }}
117131
OAUTH_TIMEOUT: {{ .Values.oauth.timeout | quote }}

values.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ server:
2424
# -- Environment mode: "production" or "development"
2525
# production: session cookies require HTTPS, stricter security headers
2626
environment: "production"
27+
# -- TLS / HTTPS (optional). When both certFile and keyFile are set,
28+
# AuthGate serves HTTPS on server.addr. Mount the PEM files into the pod via
29+
# extraVolumes/extraVolumeMounts and point these paths at the mounted location.
30+
# Remember to update server.baseUrl to https://... when enabling TLS.
31+
tls:
32+
certFile: ""
33+
keyFile: ""
2734

2835
# ============================================================
2936
# Database Configuration
@@ -152,6 +159,11 @@ rateLimit:
152159
token: 20
153160
deviceVerify: 10
154161
introspect: 20
162+
# -- Burst sizes (requests per minute). Ignored when store=redis.
163+
loginBurst: 2
164+
deviceCodeBurst: 3
165+
tokenBurst: 5
166+
deviceVerifyBurst: 3
155167

156168
# ============================================================
157169
# Audit Logging
@@ -213,6 +225,13 @@ cache:
213225
ttl: "1h"
214226
clientTTL: "10m"
215227
sizePerConn: 32
228+
# -- OAuth client lookup cache (queried on every OAuth flow).
229+
# Mutations (create/update/delete/approve/reject/secret regen) invalidate immediately.
230+
client:
231+
type: "memory"
232+
ttl: "5m"
233+
clientTTL: "30s"
234+
sizePerConn: 32
216235

217236
# ============================================================
218237
# Authentication

0 commit comments

Comments
 (0)