Skip to content

Commit c178a90

Browse files
authored
improvement(helm): added additional envvars to helm charts (#1695)
* improvement(helm): added additional envvars to helm charts * updated docs
1 parent eb8995e commit c178a90

File tree

9 files changed

+74
-1
lines changed

9 files changed

+74
-1
lines changed

helm/sim/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,18 +629,30 @@ helm uninstall sim
629629

630630
For production deployments, make sure to:
631631

632-
1. **Change default secrets**: Update `BETTER_AUTH_SECRET` and `ENCRYPTION_KEY` with secure, randomly generated values
632+
1. **Change default secrets**: Update `BETTER_AUTH_SECRET`, `ENCRYPTION_KEY`, and `INTERNAL_API_SECRET` with secure, randomly generated values using `openssl rand -hex 32`
633633
2. **Use strong database passwords**: Set `postgresql.auth.password` to a strong password
634634
3. **Enable TLS**: Configure `postgresql.tls.enabled=true` and provide proper certificates
635635
4. **Configure ingress TLS**: Enable HTTPS with proper SSL certificates
636636

637+
**Required Secrets:**
638+
- `BETTER_AUTH_SECRET`: Authentication JWT signing (minimum 32 characters)
639+
- `ENCRYPTION_KEY`: Encrypts sensitive data like environment variables (minimum 32 characters)
640+
- `INTERNAL_API_SECRET`: Internal service-to-service authentication (minimum 32 characters)
641+
642+
**Optional Security (Recommended for Production):**
643+
- `CRON_SECRET`: Authenticates scheduled job requests to API endpoints (required only if `cronjobs.enabled=true`)
644+
- `API_ENCRYPTION_KEY`: Encrypts API keys at rest in database (must be exactly 64 hex characters). If not set, API keys are stored in plain text. Generate using: `openssl rand -hex 32` (outputs 64 hex chars representing 32 bytes)
645+
637646
### Example secure values:
638647

639648
```yaml
640649
app:
641650
env:
642651
BETTER_AUTH_SECRET: "your-secure-random-string-here"
643652
ENCRYPTION_KEY: "your-secure-encryption-key-here"
653+
INTERNAL_API_SECRET: "your-secure-internal-api-secret-here"
654+
CRON_SECRET: "your-secure-cron-secret-here"
655+
API_ENCRYPTION_KEY: "your-64-char-hex-string-for-api-key-encryption" # Optional but recommended
644656

645657
postgresql:
646658
auth:

helm/sim/examples/values-aws.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,15 @@ app:
3232
NEXT_PUBLIC_SOCKET_URL: "https://simstudio-ws.acme.com"
3333

3434
# Security settings (REQUIRED - replace with your own secure secrets)
35+
# Generate using: openssl rand -hex 32
3536
BETTER_AUTH_SECRET: "your-secure-production-auth-secret-here"
3637
ENCRYPTION_KEY: "your-secure-production-encryption-key-here"
38+
INTERNAL_API_SECRET: "your-secure-production-internal-api-secret-here"
39+
CRON_SECRET: "your-secure-production-cron-secret-here"
40+
41+
# Optional: API Key Encryption (RECOMMENDED for production)
42+
# Generate 64-character hex string using: openssl rand -hex 32
43+
API_ENCRYPTION_KEY: "your-64-char-hex-api-encryption-key-here" # Optional but recommended
3744

3845
NODE_ENV: "production"
3946
NEXT_TELEMETRY_DISABLED: "1"

helm/sim/examples/values-azure.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,15 @@ app:
3030
NEXT_PUBLIC_SOCKET_URL: "https://simstudio-ws.acme.com"
3131

3232
# Security settings (REQUIRED - replace with your own secure secrets)
33+
# Generate using: openssl rand -hex 32
3334
BETTER_AUTH_SECRET: "your-secure-production-auth-secret-here"
3435
ENCRYPTION_KEY: "your-secure-production-encryption-key-here"
36+
INTERNAL_API_SECRET: "your-secure-production-internal-api-secret-here"
37+
CRON_SECRET: "your-secure-production-cron-secret-here"
38+
39+
# Optional: API Key Encryption (RECOMMENDED for production)
40+
# Generate 64-character hex string using: openssl rand -hex 32
41+
API_ENCRYPTION_KEY: "your-64-char-hex-api-encryption-key-here" # Optional but recommended
3542

3643
NODE_ENV: "production"
3744
NEXT_TELEMETRY_DISABLED: "1"

helm/sim/examples/values-development.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,15 @@ app:
2626
NEXT_PUBLIC_SOCKET_URL: "http://localhost:3002"
2727

2828
# Example secrets for development (replace with secure values for production)
29+
# For production, generate using: openssl rand -hex 32
2930
BETTER_AUTH_SECRET: "dev-32-char-auth-secret-not-secure-dev"
3031
ENCRYPTION_KEY: "dev-32-char-encryption-key-not-secure"
32+
INTERNAL_API_SECRET: "dev-32-char-internal-secret-not-secure"
33+
CRON_SECRET: "dev-32-char-cron-secret-not-for-prod"
34+
35+
# Optional: API Key Encryption (leave empty for dev, encrypts API keys at rest)
36+
# For production, generate 64-char hex using: openssl rand -hex 32
37+
API_ENCRYPTION_KEY: "" # Optional - if not set, API keys stored in plain text
3138

3239
# Realtime service
3340
realtime:

helm/sim/examples/values-external-db.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,15 @@ app:
2626
NEXT_PUBLIC_SOCKET_URL: "https://simstudio-ws.acme.com"
2727

2828
# Security settings (REQUIRED - replace with your own secure secrets)
29+
# Generate using: openssl rand -hex 32
2930
BETTER_AUTH_SECRET: "" # Set via --set flag or external secret manager
3031
ENCRYPTION_KEY: "" # Set via --set flag or external secret manager
32+
INTERNAL_API_SECRET: "" # Set via --set flag or external secret manager
33+
CRON_SECRET: "" # Set via --set flag or external secret manager
34+
35+
# Optional: API Key Encryption (RECOMMENDED for production)
36+
# Generate 64-character hex string using: openssl rand -hex 32
37+
API_ENCRYPTION_KEY: "" # Optional but recommended - encrypts API keys at rest
3138

3239
NODE_ENV: "production"
3340
NEXT_TELEMETRY_DISABLED: "1"
@@ -150,4 +157,7 @@ networkPolicy:
150157
# --set externalDatabase.database="your-db-name" \
151158
# --set app.env.BETTER_AUTH_SECRET="$(openssl rand -hex 32)" \
152159
# --set app.env.ENCRYPTION_KEY="$(openssl rand -hex 32)" \
160+
# --set app.env.INTERNAL_API_SECRET="$(openssl rand -hex 32)" \
161+
# --set app.env.CRON_SECRET="$(openssl rand -hex 32)" \
162+
# --set app.env.API_ENCRYPTION_KEY="$(openssl rand -hex 32)" \
153163
# --set realtime.env.BETTER_AUTH_SECRET="$(openssl rand -hex 32)"

helm/sim/examples/values-gcp.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,15 @@ app:
3232
NEXT_PUBLIC_SOCKET_URL: "https://simstudio-ws.acme.com"
3333

3434
# Security settings (REQUIRED - replace with your own secure secrets)
35+
# Generate using: openssl rand -hex 32
3536
BETTER_AUTH_SECRET: "your-secure-production-auth-secret-here"
3637
ENCRYPTION_KEY: "your-secure-production-encryption-key-here"
38+
INTERNAL_API_SECRET: "your-secure-production-internal-api-secret-here"
39+
CRON_SECRET: "your-secure-production-cron-secret-here"
40+
41+
# Optional: API Key Encryption (RECOMMENDED for production)
42+
# Generate 64-character hex string using: openssl rand -hex 32
43+
API_ENCRYPTION_KEY: "your-64-char-hex-api-encryption-key-here" # Optional but recommended
3744

3845
NODE_ENV: "production"
3946
NEXT_TELEMETRY_DISABLED: "1"

helm/sim/examples/values-production.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,15 @@ app:
2727
NEXT_PUBLIC_SOCKET_URL: "https://sim-ws.acme.ai"
2828

2929
# Security settings (REQUIRED - replace with your own secure secrets)
30+
# Generate using: openssl rand -hex 32
3031
BETTER_AUTH_SECRET: "your-production-auth-secret-here"
3132
ENCRYPTION_KEY: "your-production-encryption-key-here"
33+
INTERNAL_API_SECRET: "your-production-internal-api-secret-here"
34+
CRON_SECRET: "your-production-cron-secret-here"
35+
36+
# Optional: API Key Encryption (RECOMMENDED for production)
37+
# Generate 64-character hex string using: openssl rand -hex 32
38+
API_ENCRYPTION_KEY: "your-64-char-hex-api-encryption-key-here" # Optional but recommended
3239

3340
# Email verification (set to true if you want to require email verification)
3441
EMAIL_VERIFICATION_ENABLED: "false"

helm/sim/examples/values-whitelabeled.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,15 @@ app:
2020
NEXT_PUBLIC_SOCKET_URL: "https://sim-ws.acme.ai"
2121

2222
# Security settings (REQUIRED)
23+
# Generate using: openssl rand -hex 32
2324
BETTER_AUTH_SECRET: "your-production-auth-secret-here"
2425
ENCRYPTION_KEY: "your-production-encryption-key-here"
26+
INTERNAL_API_SECRET: "your-production-internal-api-secret-here"
27+
CRON_SECRET: "your-production-cron-secret-here"
28+
29+
# Optional: API Key Encryption (RECOMMENDED for production)
30+
# Generate 64-character hex string using: openssl rand -hex 32
31+
API_ENCRYPTION_KEY: "your-64-char-hex-api-encryption-key-here" # Optional but recommended
2532

2633
# UI Branding & Whitelabeling Configuration
2734
NEXT_PUBLIC_BRAND_NAME: "Acme AI Studio"

helm/sim/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ app:
6363
# Generate secure 32-character secrets using: openssl rand -hex 32
6464
BETTER_AUTH_SECRET: "" # REQUIRED - set via --set flag or external secret manager
6565
ENCRYPTION_KEY: "" # REQUIRED - set via --set flag or external secret manager
66+
INTERNAL_API_SECRET: "" # REQUIRED - set via --set flag or external secret manager, used for internal service-to-service authentication
67+
68+
# Optional: Scheduled Jobs Authentication
69+
# Generate using: openssl rand -hex 32
70+
CRON_SECRET: "" # OPTIONAL - required only if cronjobs.enabled=true, authenticates scheduled job requests
71+
72+
# Optional: API Key Encryption (RECOMMENDED for production)
73+
# Generate 64-character hex string using: openssl rand -hex 32 (outputs 64 hex chars = 32 bytes)
74+
API_ENCRYPTION_KEY: "" # OPTIONAL - encrypts API keys at rest, must be exactly 64 hex characters, if not set keys stored in plain text
6675

6776
# Email & Communication
6877
EMAIL_VERIFICATION_ENABLED: "false" # Enable email verification for user registration and login (defaults to false)

0 commit comments

Comments
 (0)