Files
nessi f925009977 chore: initial project setup with backend, frontend, Android app, and CI/CD
Add complete NexaMFA push MFA system with:
- FastAPI backend with PostgreSQL, Redis, OIDC provider, and Prometheus metrics
- React TypeScript admin console
- Android Kotlin/Jetpack Compose app with biometric authentication
- Docker Compose deployment configuration
- Gitea CI workflow for backend, frontend, and Android builds
- Environment configuration template with security settings
- Documentation for security model, deployment
2026-06-28 09:37:51 +02:00

26 lines
581 B
Python

from sqlalchemy.ext.asyncio import AsyncSession
from app.models.audit import AuditLog
async def audit(
session: AsyncSession,
action: str,
*,
actor: str | None = None,
target_type: str | None = None,
target_id: str | None = None,
ip_address: str | None = None,
metadata: dict | None = None,
) -> None:
session.add(
AuditLog(
actor=actor,
action=action,
target_type=target_type,
target_id=target_id,
ip_address=ip_address,
metadata_json=metadata,
)
)