-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.example
More file actions
120 lines (101 loc) · 3.18 KB
/
Copy pathenv.example
File metadata and controls
120 lines (101 loc) · 3.18 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Security Automation Gateway Environment Configuration
# Production: set CORS_ORIGINS to exact origins (no *), ALLOWED_HOSTS to API/gateway hostnames,
# and supply all secrets (SECRET_KEY, ENCRYPTION_KEY, SIGNING_KEY, GATEWAY_SERVICE_TOKEN, SETUP_TOKEN) from a secret store (e.g. K8s External Secrets). See docs/SECRETS_MANAGEMENT.md and docs/operational-runbook.md.
# Application Settings
APP_NAME=Security Automation Gateway
APP_VERSION=0.1.0
DEBUG=false
ENVIRONMENT=production
# Database Configuration
DATABASE_URL=postgresql://sag:sag@localhost:5432/sag
DB_POOL_SIZE=10
DB_MAX_OVERFLOW=20
DB_POOL_TIMEOUT=30
DB_POOL_RECYCLE=3600
DB_ECHO=false
# Redis Configuration
REDIS_URL=redis://localhost:6379/0
REDIS_MAX_CONNECTIONS=20
REDIS_SOCKET_TIMEOUT=5
REDIS_SOCKET_CONNECT_TIMEOUT=5
# Security Configuration
SECRET_KEY=your-secret-key-here-must-be-at-least-32-characters-long
# Generate: python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
ENCRYPTION_KEY=your-encryption-key-here
SIGNING_KEY=your-signing-key-here
# D11: Optional. SECURITY_HEADERS_HSTS_MAX_AGE=31536000 to enable HSTS; SECURITY_HEADERS_CSP for Content-Security-Policy.
JWT_ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
REFRESH_TOKEN_EXPIRE_DAYS=7
SESSION_TIMEOUT_MINUTES=30
# Authentication Configuration
MAX_FAILED_ATTEMPTS=5
LOCKOUT_DURATION_MINUTES=60
PASSWORD_MIN_LENGTH=12
PASSWORD_REQUIRE_UPPERCASE=true
PASSWORD_REQUIRE_LOWERCASE=true
PASSWORD_REQUIRE_NUMBERS=true
PASSWORD_REQUIRE_SYMBOLS=true
# MFA Configuration
MFA_ISSUER=Security Automation Gateway
MFA_WINDOW=1
MFA_BACKUP_CODES_COUNT=10
# API Configuration
API_HOST=0.0.0.0
API_PORT=8001
API_WORKERS=1
API_RELOAD=false
API_LOG_LEVEL=info
# CORS Configuration (Production: set to exact origins, e.g. https://console.example.com,https://api.example.com)
CORS_ORIGINS=*
CORS_ALLOW_CREDENTIALS=true
CORS_ALLOW_METHODS=*
CORS_ALLOW_HEADERS=*
# Trusted Hosts Configuration (JSON array or comma-separated). Production: set to API/gateway hostnames (e.g. api.example.com,console.example.com).
ALLOWED_HOSTS=
# Gateway proxy: token used by gateway when calling backends (service-to-service). Must be set in production.
GATEWAY_SERVICE_TOKEN=
# One-time setup: token required to call POST /auth/setup to create first admin. Set in new environments only; long random value.
SETUP_TOKEN=
# Rate Limiting Configuration
RATE_LIMIT_ENABLED=true
RATE_LIMIT_REQUESTS=100
RATE_LIMIT_WINDOW=60
RATE_LIMIT_PER_USER=1000
# Audit Configuration
AUDIT_ENABLED=true
AUDIT_RETENTION_DAYS=2555
AUDIT_ENCRYPTION_ENABLED=true
AUDIT_SIGNING_ENABLED=true
# SIEM Configuration
SIEM_ENABLED=true
SIEM_WEBHOOK_URL=
SIEM_KAFKA_BROKERS=
SIEM_KAFKA_TOPIC=sag-audit-events
# Monitoring Configuration
MONITORING_ENABLED=true
PROMETHEUS_PORT=9090
HEALTH_CHECK_INTERVAL=30
# Logging Configuration
LOG_LEVEL=INFO
LOG_FORMAT=json
LOG_FILE=
LOG_ROTATION=true
LOG_MAX_SIZE=10485760
LOG_BACKUP_COUNT=5
# External Services
VAULT_URL=
VAULT_TOKEN=your-vault-token-here
VAULT_MOUNT_POINT=kv
# OAuth2 Configuration
OAUTH2_CLIENT_ID=
OAUTH2_CLIENT_SECRET=
OAUTH2_AUTHORIZATION_URL=
OAUTH2_TOKEN_URL=
OAUTH2_USERINFO_URL=
# SAML Configuration
SAML_ENABLED=false
SAML_ENTITY_ID=
SAML_SSO_URL=
SAML_SLO_URL=
SAML_CERTIFICATE=