Forge Audit — journal d'audit applicatif opt-in : table audit_log, API record_audit/get_audit_log, borné (pas un SIEM), SQL visible.
Project description
forge-mvc-audit
Journal d'audit applicatif opt-in pour Forge : tracer les actions importantes de
l'application (élève créé, note modifiée, QCM corrigé, connexion, rôle changé,
fichier supprimé) dans une table audit_log, avec une API explicite.
Périmètre volontairement borné : c'est un audit applicatif, pas un SIEM de cybersécurité. Cohérent avec ADR-008 : Forge fournit la table et le helper, la décision de tracer reste applicative.
Installation
pip install --pre forge-mvc-audit
En développement : pip install -e ./packages/forge-mvc-audit.
Mise en place de la table
forge audit:init # copie la migration dans mvc/migrations/
forge migration:apply # crée la table audit_log
Utilisation
from forge_mvc_audit import record_audit, get_audit_log
record_audit("eleve.cree", actor="prof.dupont", target_type="eleve", target_id=42)
record_audit("note.modifiee", actor="prof.dupont", target_type="note", target_id=7, details="12 -> 15")
for entree in get_audit_log(limit=20, actor="prof.dupont"):
print(entree.created_at, entree.action, entree.target_type, entree.target_id)
L'API expose record_audit, get_audit_log, AuditEntry, plus AuditError,
TABLE_NAME, MAX_LIMIT et CREATE_TABLE_SQL.
Périmètre
record_audit(action, *, actor, target_type, target_id, details, db)écrit une trace et renvoie son identifiant.get_audit_log(*, limit, actor, action, target_type, target_id, db)relit les entrées récentes, filtrables (colonnes en liste blanche).- Hors périmètre : corrélation d'événements, alerting, rétention automatique, détection d'intrusion (ce n'est pas un SIEM).
Documentation complète : https://forgemvc.com/docs/forge/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file forge_mvc_audit-1.0.0rc1-py3-none-any.whl.
File metadata
- Download URL: forge_mvc_audit-1.0.0rc1-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbca9320fc8089a2edd39fc5ea1c1d655cf3d5ec7c42dc07155a6b23c5299118
|
|
| MD5 |
160547d2c6180cb162a03ba3229a2b3f
|
|
| BLAKE2b-256 |
783a19124dcac63db0750c066491bfa81b5459076174015768a2ff2ac701e896
|