Skip to main content
Pre-release

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

forge_mvc_audit-1.0.0rc4.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

forge_mvc_audit-1.0.0rc4-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file forge_mvc_audit-1.0.0rc4.tar.gz.

File metadata

  • Download URL: forge_mvc_audit-1.0.0rc4.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for forge_mvc_audit-1.0.0rc4.tar.gz
Algorithm Hash digest
SHA256 510c4396adf68ada50ef439eb84daedbf9879902c54adba576832a93eb2bdf60
MD5 fd098b8a32017629c51087f2ce64d92f
BLAKE2b-256 2e1163d0d010478948822fb258acf7b779a78781a311eac525747e27264f30fb

See more details on using hashes here.

File details

Details for the file forge_mvc_audit-1.0.0rc4-py3-none-any.whl.

File metadata

File hashes

Hashes for forge_mvc_audit-1.0.0rc4-py3-none-any.whl
Algorithm Hash digest
SHA256 28c0a6dfcbaf16bf9df3f1ecccdf800519791c08238a315b092cd472382e7dae
MD5 611f83a80f73703190a3a677fec421f4
BLAKE2b-256 2f4af2bd6988e91c3e7613df3aaead9d4e24af3311aec921e80fd2351d21cbb9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page