security: harden data auth and deployment

This commit is contained in:
2026-09-17 18:31:35 +12:00
parent a6d1c73837
commit 5639dbcb83
32 changed files with 1401 additions and 378 deletions
+3
View File
@@ -9,6 +9,8 @@ from pathlib import Path
import secrets
import sys
from cryptography.fernet import Fernet
from app.runtime import get_runtime_settings
@@ -30,6 +32,7 @@ def prepare(destination: Path) -> None:
password = secrets.token_urlsafe(30)
values.update(
APP_NAME='Magent', JWT_SECRET=secrets.token_urlsafe(48),
SETTINGS_ENCRYPTION_KEY=Fernet.generate_key().decode('ascii'),
ADMIN_USERNAME='admin', ADMIN_PASSWORD=password,
AUTH_COOKIE_SECURE=True, AUTH_COOKIE_DOMAIN='magent.grizzlyflix.co.nz',
AUTH_COOKIE_NAME='magent_auth', AUTH_STATE_COOKIE_NAME='magent_logged_in',