初步实现数据加密、权限管理、日志审计等功能
This commit is contained in:
@@ -3,9 +3,15 @@ from pydantic_settings import BaseSettings
|
||||
class Settings(BaseSettings):
|
||||
PROJECT_NAME: str = "TJWater Server"
|
||||
API_V1_STR: str = "/api/v1"
|
||||
SECRET_KEY: str = "your-secret-key-here" # Change in production
|
||||
|
||||
# JWT 配置
|
||||
SECRET_KEY: str = "your-secret-key-here-change-in-production-use-openssl-rand-hex-32"
|
||||
ALGORITHM: str = "HS256"
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
||||
REFRESH_TOKEN_EXPIRE_DAYS: int = 7
|
||||
|
||||
# 数据加密密钥 (使用 Fernet)
|
||||
ENCRYPTION_KEY: str = "" # 必须从环境变量设置
|
||||
|
||||
# Database Config (PostgreSQL)
|
||||
DB_NAME: str = "tjwater"
|
||||
|
||||
Reference in New Issue
Block a user