# ---------------------------------------------------------------------------- # Secure Agent Orchestrator — environment template # Copy to `.env` and fill in real values. Never commit the real `.env`. # ---------------------------------------------------------------------------- # Application settings APP_NAME="Secure Agent Orchestrator" APP_DESCRIPTION="REST API for orchestrating commands to registered security agents" APP_VERSION="0.2.0" LICENSE_NAME="MIT" CONTACT_NAME="Frangel Barrera" CONTACT_EMAIL="security@frangelbarrera.dev" # Environment: local | staging | production # - local: docs and openapi are public, validators are relaxed but still reject # known-insecure defaults (SECRET_KEY="secret-key", ADMIN_PASSWORD="!Ch4ng3Th1sP4ssW0rd!"). # - staging/production: docs/openapi are admin-only, CORS must be explicit, # CRUD_ADMIN is off by default. ENVIRONMENT="local" # Cryptography — REQUIRED in every environment (including local). # Generate one with: # python -c "import secrets; print(secrets.token_urlsafe(32))" SECRET_KEY="REPLACE_WITH_32_PLUS_CHAR_RANDOM_STRING" ALGORITHM="HS256" ACCESS_TOKEN_EXPIRE_MINUTES=30 REFRESH_TOKEN_EXPIRE_DAYS=7 # Database — SQLite only. File path is relative to the project root. SQLITE_URI="./db.sqlite" SQLITE_SYNC_PREFIX="sqlite:///" SQLITE_ASYNC_PREFIX="sqlite+aiosqlite:///" # First admin user — REQUIRED in every environment. # Use a strong, unique password (>= 12 chars). ADMIN_NAME="admin" ADMIN_EMAIL="admin@example.com" ADMIN_USERNAME="admin" ADMIN_PASSWORD="REPLACE_WITH_STRONG_PASSWORD" # CRUD Admin interface — disabled by default. Enable explicitly only when needed, # and pair it with CRUD_ADMIN_ALLOWED_IPS_LIST. CRUD_ADMIN_ENABLED=false CRUD_ADMIN_MOUNT_PATH="/admin" CRUD_ADMIN_ALLOWED_IPS_LIST=["127.0.0.1","::1"] CRUD_ADMIN_MAX_SESSIONS=10 CRUD_ADMIN_SESSION_TIMEOUT=1440 SESSION_SECURE_COOKIES=true CRUD_ADMIN_TRACK_EVENTS=true CRUD_ADMIN_TRACK_SESSIONS=true CRUD_ADMIN_REDIS_ENABLED=false # CORS — explicit origins only. `*` is rejected in non-LOCAL environments. CORS_ORIGINS=["http://localhost:3000","http://localhost:8000"] CORS_METHODS=["GET","POST","PUT","PATCH","DELETE","OPTIONS"] CORS_HEADERS=["Authorization","Content-Type","Accept"] # Rate limiting (informational; the in-process limiter is a placeholder). DEFAULT_RATE_LIMIT_LIMIT=10 DEFAULT_RATE_LIMIT_PERIOD=3600 # Client-side cache (seconds). Applied only to public, idempotent responses. CLIENT_CACHE_MAX_AGE=60