forked from mtusi2026/mtusi2026lab3
19 lines
679 B
Python
19 lines
679 B
Python
"""Application configuration loaded from environment variables."""
|
|
|
|
import os
|
|
import uuid
|
|
|
|
INSTANCE_ID = os.getenv("INSTANCE_ID", str(uuid.uuid4()))
|
|
|
|
APP_HOST = os.getenv("APP_HOST", "0.0.0.0")
|
|
APP_PORT = int(os.getenv("APP_PORT", "8080"))
|
|
|
|
SESSION_TTL_SECONDS = int(os.getenv("SESSION_TTL_SECONDS", "3600"))
|
|
IDEM_TTL_SECONDS = int(os.getenv("IDEM_TTL_SECONDS", "86400"))
|
|
|
|
RATE_LIMIT_REQUESTS = int(os.getenv("RATE_LIMIT_REQUESTS", "0")) # 0 = disabled
|
|
|
|
# Security: bcrypt salt rounds; 12 is minimum for bcrypt, scrypt uses n=2**14 etc.
|
|
SCRYPT_N = int(os.getenv("SCRYPT_N", "16384")) # 2**14
|
|
SCRYPT_R = int(os.getenv("SCRYPT_R", "8"))
|
|
SCRYPT_P = int(os.getenv("SCRYPT_P", "1")) |