-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.env.example
More file actions
55 lines (43 loc) · 1.53 KB
/
.env.example
File metadata and controls
55 lines (43 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# 🔐 Rust Security Platform - Environment Configuration Template
#
# SECURITY: Copy this file to .env and configure with your actual values
# NEVER commit .env files to version control
# === JWT & Cryptographic Secrets ===
# Generate with: openssl rand -hex 32
JWT_SECRET=your_super_secure_jwt_secret_minimum_32_characters_required_here
# RSA private key for JWKS (PEM format)
# Generate with: openssl genpkey -algorithm RSA -pkcs8 -out private_key.pem
JWT_RSA_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----
YOUR_RSA_PRIVATE_KEY_HERE
-----END PRIVATE KEY-----"
# === Database Configuration ===
DATABASE_URL=postgresql://username:password@localhost:5432/auth_db
# === Server Configuration ===
SERVER_HOST=127.0.0.1
SERVER_PORT=8080
# === Environment Detection ===
# Set to "production" for production environments
APP_ENV=development
RUST_ENV=development
ENVIRONMENT=development
# === Rate Limiting ===
RATE_LIMIT_PER_IP_PER_MINUTE=100
RATE_LIMIT_GLOBAL_PER_MINUTE=10000
RATE_LIMIT_ENABLE_ADAPTIVE=true
# === Security Headers ===
SECURITY_CSP="default-src 'self'; script-src 'self'; style-src 'self'"
SECURITY_HSTS_MAX_AGE=31536000
# === Logging ===
RUST_LOG=info
# === Optional Features ===
# Redis for distributed rate limiting
# REDIS_URL=redis://localhost:6379
# Trust proxy headers (only enable if behind trusted proxy)
# TRUST_PROXY_HEADERS=false
# === Development/Test Only ===
# WARNING: NEVER set TEST_MODE=1 in production
# TEST_MODE=1
# === TLS Configuration ===
# ENABLE_TLS=false
# TLS_CERT_PATH=/path/to/cert.pem
# TLS_KEY_PATH=/path/to/key.pem