feat: add authentication and ACL primitives

This commit is contained in:
Sergey Antropoff
2026-07-13 00:01:17 +03:00
parent 7a668127a3
commit dfb1074b71
9 changed files with 364 additions and 2 deletions
+6
View File
@@ -90,6 +90,12 @@ domain models and repositories that do not depend on FastAPI or source-specific
contract structures. PostgreSQL is the system of record for resources, security
state, locks, scenarios, and tasks.
Authentication secrets use salted scrypt hashes. Session tickets are signed and
expiring; mutation requests use ticket-bound CSRF tokens. API-token privileges
are intersected with their owning principal's effective propagated ACLs, so a
token cannot escalate its owner. Logs redact recognized ticket, password, and
token representations before emission.
The API layer is an adapter. It authenticates, authorizes, validates against the
selected contract, dispatches to a semantic handler, and renders a
version-compatible response. A route without a semantic handler is explicitly