amazon-transcreation/backend/app/config.py
Vadym Samoilenko f60b7261b5 Add Azure AD MSAL SSO (SPA token exchange)
- Backend: Azure AD JWKS validator with 24h cache, new POST /api/v1/auth/sso/login
  endpoint, sso_login() in AuthService with auto-provisioning, password_hash made
  nullable, auth_provider column added, Alembic migration c1d2e3f4a5b6
- Frontend: @azure/msal-browser, msal.ts config singleton, ssoLogin() API function,
  login page updated with SSO button and redirect callback handling
- Deploy: frontend Dockerfile and docker-compose.prod.yml updated to bake Azure AD
  vars into the image at build time; deploy.sh validates SSO config on init/deploy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 18:08:46 +01:00

26 lines
761 B
Python

from pydantic_settings import BaseSettings
class Settings(BaseSettings):
"""Application settings loaded from environment variables."""
DATABASE_URL: str = "postgresql+asyncpg://transcreation:transcreation@db:5432/transcreation"
REDIS_URL: str = "redis://redis:6379/0"
ANTHROPIC_API_KEY: str = ""
JWT_SECRET_KEY: str = "CHANGE_ME_TO_A_RANDOM_SECRET"
JWT_ALGORITHM: str = "HS256"
JWT_EXPIRY_HOURS: int = 8
STORAGE_ROOT: str = "/storage"
LLM_MODEL: str = "claude-sonnet-4-6"
AZURE_AD_TENANT_ID: str = ""
AZURE_AD_CLIENT_ID: str = ""
AZURE_AD_SSO_ENABLED: bool = False
model_config = {
"env_file": ".env",
"env_file_encoding": "utf-8",
"extra": "ignore",
}
settings = Settings()