Add improvements
This commit is contained in:
@@ -21,6 +21,8 @@ INTERNAL_SERVICES: Set[str] = {
|
||||
# Core services
|
||||
"auth-service",
|
||||
"tenant-service",
|
||||
"gateway", # API Gateway
|
||||
"gateway-service", # Alternative name for gateway
|
||||
|
||||
# Business logic services
|
||||
"inventory-service",
|
||||
@@ -30,24 +32,27 @@ INTERNAL_SERVICES: Set[str] = {
|
||||
"pos-service",
|
||||
"orders-service",
|
||||
"sales-service",
|
||||
"procurement-service",
|
||||
|
||||
# ML and analytics services
|
||||
"training-service",
|
||||
"forecasting-service",
|
||||
"ai-insights-service",
|
||||
|
||||
# Orchestration services
|
||||
"orchestrator-service",
|
||||
|
||||
# Support services
|
||||
"notification-service",
|
||||
"alert-service",
|
||||
"alert-processor-service",
|
||||
"alert-processor", # Alternative name (from k8s service name)
|
||||
"demo-session-service",
|
||||
"demo-service", # Alternative name for demo session service
|
||||
"external-service",
|
||||
|
||||
# Enterprise services
|
||||
"distribution-service",
|
||||
|
||||
# Legacy/alternative naming (for backwards compatibility)
|
||||
"data-service", # May be used by older components
|
||||
}
|
||||
|
||||
|
||||
@@ -195,16 +200,14 @@ class BaseServiceSettings(BaseSettings):
|
||||
# ================================================================
|
||||
|
||||
# JWT Configuration
|
||||
JWT_SECRET_KEY: str = os.getenv("JWT_SECRET_KEY", "your-super-secret-jwt-key-change-in-production-min-32-characters-long")
|
||||
# ✅ FIXED: Use production JWT secret key to match auth service
|
||||
# Must be same across all services for inter-service communication
|
||||
JWT_SECRET_KEY: str = os.getenv("JWT_SECRET_KEY", "usMHw9kQCQoyrc7wPmMi3bClr0lTY9wvzZmcTbADvL0=")
|
||||
JWT_ALGORITHM: str = os.getenv("JWT_ALGORITHM", "HS256")
|
||||
JWT_ACCESS_TOKEN_EXPIRE_MINUTES: int = int(os.getenv("JWT_ACCESS_TOKEN_EXPIRE_MINUTES", "30"))
|
||||
JWT_REFRESH_TOKEN_EXPIRE_DAYS: int = int(os.getenv("JWT_REFRESH_TOKEN_EXPIRE_DAYS", "7"))
|
||||
|
||||
# Service-to-Service Authentication
|
||||
SERVICE_API_KEY: str = os.getenv("SERVICE_API_KEY", "service-api-key-change-in-production")
|
||||
INTERNAL_API_KEY: str = os.getenv("INTERNAL_API_KEY", "dev-internal-key-change-in-production")
|
||||
ENABLE_SERVICE_AUTH: bool = os.getenv("ENABLE_SERVICE_AUTH", "false").lower() == "true"
|
||||
API_GATEWAY_URL: str = os.getenv("API_GATEWAY_URL", "http://gateway-service:8000")
|
||||
|
||||
|
||||
# Password Requirements
|
||||
PASSWORD_MIN_LENGTH: int = int(os.getenv("PASSWORD_MIN_LENGTH", "8"))
|
||||
|
||||
Reference in New Issue
Block a user