Files
bdinvite/backend/app/auth
kiskaadee 30d9a889a3 feat(security): harden authentication edge cases and verify deployment independence
- Reject forged, replayed, and expired CSRF state with HTTP 400 Bad Request
- Enforce cryptographic validation rejecting tampered ID token signatures and mismatched/missing nonces with HTTP 401 Unauthorized
- Reject missing, invalid, or mismatched PKCE code_verifier with HTTP 401 Unauthorized (InvalidCodeVerifierError)
- Invalidate expired ID tokens and session cookies returning HTTP 401 Unauthorized
- Enforce role-based access control blocking authenticated non-admin users from admin APIs with HTTP 403 Forbidden
- Eliminate legacy Remote-User trust ensuring session identity strictly governs authorization
- Document and verify dual deployment modes (Standalone Mode vs Homelab Production Mode behind Traefik TLS proxy)
- Add comprehensive security hardening regression suite (tests/test_security_hardening.py) and .env.example template
- Ensure clean multi-stage Docker build
2026-10-03 01:26:05 -05:00
..