This release is a pre-release and may not be stable for production use.
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 et MAX_LIMIT.
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/.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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.0rc5.tar.gz.
File metadata
- Download URL: forge_mvc_audit-1.0.0rc5.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cc803c9d8f91b877732cd58564a96aa04f9d9550ab690ab95bfe837a1c09110
|
|
| MD5 |
22d67a4d6390d04028500bc78eb45fbf
|
|
| BLAKE2b-256 |
e3b68c96604152bfb91c519cca8bc38030f981c203044d1cb9f26c218980fea0
|
File details
Details for the file forge_mvc_audit-1.0.0rc5-py3-none-any.whl.
File metadata
- Download URL: forge_mvc_audit-1.0.0rc5-py3-none-any.whl
- Upload date:
- Size: 12.8 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 |
22c6767bb9e3d172eb070350f1cee3034899dc43d6437ce62f32017e1c850405
|
|
| MD5 |
b576d07b3e4a1d909f914b69fab38e8a
|
|
| BLAKE2b-256 |
d2708792df4118f02fa6bb248654b3e0f841f9393459472835e119cb1a2851a2
|