|
7 | 7 | class Settings(BaseSettings): |
8 | 8 | model_config = ConfigDict(env_file=".env") |
9 | 9 |
|
10 | | - # Environment Application Settings |
11 | | - GRAPH_DB_URI: str = Field("bolt://neo4j:7687", alias="GRAPH_DB_URI") |
12 | | - GRAPH_DB_USER: str = Field("neo4j", alias="GRAPH_DB_USER") |
13 | | - GRAPH_DB_PASSWORD: str = Field("neoSecureChain", alias="GRAPH_DB_PASSWORD") |
14 | | - VULN_DB_URI: str = Field("mongodb://mongoSecureChain:mongoSecureChain@mongo:27017/admin", alias="VULN_DB_URI") |
15 | | - DOCS_URL: str | None = Field(None, alias="DOCS_URL") |
16 | | - SERVICES_ALLOWED_ORIGINS: list[str] = Field(["*"], alias="SERVICES_ALLOWED_ORIGINS") |
| 10 | + # Database connections (required) |
| 11 | + GRAPH_DB_URI: str = Field(..., alias="GRAPH_DB_URI") |
| 12 | + GRAPH_DB_USER: str = Field(..., alias="GRAPH_DB_USER") |
| 13 | + GRAPH_DB_PASSWORD: str = Field(..., alias="GRAPH_DB_PASSWORD") |
| 14 | + VULN_DB_URI: str = Field(..., alias="VULN_DB_URI") |
| 15 | + |
| 16 | + # JWT secrets (required) |
| 17 | + JWT_ACCESS_SECRET_KEY: str = Field(..., alias="JWT_ACCESS_SECRET_KEY") |
| 18 | + JWT_REFRESH_SECRET_KEY: str = Field(..., alias="JWT_REFRESH_SECRET_KEY") |
| 19 | + |
| 20 | + # Application settings (safe defaults) |
| 21 | + DOCS_URL: str | None = Field(None, alias="DOCS_URL") |
| 22 | + SERVICES_ALLOWED_ORIGINS: list[str] = Field(["*"], alias="SERVICES_ALLOWED_ORIGINS") |
17 | 23 | SECURE_COOKIES: bool = Field(True, alias="SECURE_COOKIES") |
18 | 24 | ALGORITHM: str = Field("HS256", alias="ALGORITHM") |
19 | 25 | ACCESS_TOKEN_EXPIRE_MINUTES: int = Field(15, alias="ACCESS_TOKEN_EXPIRE_MINUTES") |
20 | 26 | REFRESH_TOKEN_EXPIRE_DAYS: int = Field(7, alias="REFRESH_TOKEN_EXPIRE_DAYS") |
21 | | - JWT_ACCESS_SECRET_KEY: str = Field("your_access_secret_key", alias="JWT_ACCESS_SECRET_KEY") |
22 | | - JWT_REFRESH_SECRET_KEY: str = Field("your_refresh_secret_key", alias="JWT_REFRESH_SECRET_KEY") |
23 | 27 |
|
24 | 28 | # Database Configuration |
25 | 29 | DB_MIN_POOL_SIZE: int = 10 |
|
0 commit comments