Audit Trail
The Audit Trail module automatically records all actions performed on the system, enabling complete traceability of operations.
Objectives
- Trace all user actions on the system
- Secure data with an immutable history
- Analyze system usage
- Meet compliance and audit requirements
Access
Menu: Audit
Or via Settings → Audit tab
Overview
Statistics
At the top of the page, cards display statistics by action type:
| Statistic | Description |
|---|---|
| Total | Total number of records |
| Creations | Number of creations |
| Modifications | Number of modifications |
| Deletions | Number of deletions |
Action Types
Each action is categorized and displayed with a colored badge:
| Action | Badge | Description |
|---|---|---|
| Creation | Green | New record created |
| Modification | Blue | Data updated |
| Deletion | Red | Record deleted |
| View | Gray | Data viewed |
| Login | Purple | User login |
| Logout | Purple | User logout |
| Export | Yellow | Data exported |
| Import | Yellow | Data imported |
| Validation | Emerald | Record validated |
| Rejection | Orange | Record rejected |
| Execution | Indigo | Operation executed |
| Cancellation | Gray | Action cancelled |
Search and Filters
Search Bar
Search in descriptions and metadata.
Advanced Filters
Click Filters to display options:
| Filter | Description |
|---|---|
| Action | Filter by action type |
| Entity Type | Filter by data type (Household, Beneficiary, User, etc.) |
| Start Date | Actions after this date |
| End Date | Actions before this date |
Reset Filters
Click Reset filters to clear all criteria.
Audit Table
Displayed Columns
| Column | Description |
|---|---|
| Date | Action date and time |
| Action | Action type (colored badge) |
| Entity | Entity type + abbreviated ID |
| User | User email |
| Description | Action summary |
| Actions | View details button |
Pagination
- 20 records per page
- Navigation with Previous/Next buttons
- Display of page number and total
Audit Details
Click the View icon (eye) to open the details modal.
Displayed Information
| Field | Description |
|---|---|
| Date | Precise date and time |
| Action | Action type |
| Entity Type | Record category |
| Entity ID | Complete unique identifier |
| User | Author email |
| IP Address | Connection IP |
| Description | Full description |
Old Values
For modifications, old values are displayed in JSON on a light red background.
New Values
For creations and modifications, new values are displayed in JSON on a light green background.
Metadata
Additional contextual information (browser, system, etc.).
Entity Types
Main tracked entities:
| Entity | Description |
|---|---|
User | User accounts |
Menage | Household forms |
Beneficiaire | Beneficiary forms |
Cycle | Payment cycles |
Paiement | Individual payments |
Plainte | GRM complaints |
Region | Regions |
Secteur | Sectors |
Localite | Localities |
Ecole | Schools |
CentreSante | Health centers |
Use Cases
Investigate a Suspicious Modification
- Access the audit trail
- Filter by Action = "Modification"
- Filter by Entity Type = the concerned entity
- Use date filters if needed
- Click View to examine details
- Compare old and new values
Verify User Activity
- Search for the user's email
- Review the action list
- Analyze types of actions performed
- Check times and IP addresses
Audit Logins
- Filter by Action = "Login" or "Logout"
- Review dates and times
- Check IP addresses
- Identify abnormal connections
Trace Deletions
- Filter by Action = "Deletion"
- Identify deleted entities
- Note responsible users
- Check old values for recovery
Analyze Usage Over a Period
- Set the period with date filters
- Review statistics by action type
- Identify activity peaks
- Analyze usage patterns
Best Practices
Regular Review
- Review the audit trail periodically
- Monitor unusual actions
- Check connections from unknown IPs
Archiving
- Export audit data regularly
- Keep archives according to retention policies
- Document identified incidents
Security
- The audit trail is read-only
- Records cannot be modified or deleted
- Access is limited to authorized users
Incident Response
- Use the audit trail to investigate issues
- Document corrective actions
- Identify preventive measures
Permissions
| Action | Required Permission |
|---|---|
| View audit trail | audit.view |
| View details | audit.view |
The audit trail is generally reserved for administrators and supervisors for confidentiality reasons.
Integration with Other Modules
All Entities
Every creation, modification, or deletion in any module is automatically recorded in the audit trail.
Authentication
Logins, logouts, and failed login attempts are tracked.
Import/Export
All data import and export operations are recorded.
Technical Information
Record Structure
{
"id": "uuid",
"action": "update",
"entityType": "Menage",
"entityId": "household-uuid",
"userId": "user-uuid",
"userEmail": "user@example.com",
"description": "Household modification",
"oldValues": { "tailleMenage": 4 },
"newValues": { "tailleMenage": 5 },
"metadata": { "browser": "Chrome", "os": "Windows" },
"ipAddress": "192.168.1.1",
"createdAt": "2024-01-15T10:30:00Z"
}
Data Retention
Audit records are retained according to the retention policy defined by the system administrator.