Skip to content

Audit Logs

Track and review all system changes with tamper-evident audit logging.

Audit logs provide a complete, immutable record of all system events:

PropertyDescriptionExample
Event IDUnique identifier550e8400-e29b-41d4-a716-446655440000
Event TypeSpecific event namedeployment.created
CategoryEvent categorydeployment
SeverityImportance levelinfo, security
ActorWho performed the actionUser, System, API Key, Service
ResourceWhat was affectedTarget, Deployment
OutcomeResult of actionsuccess, denied
TimestampWhen it occurred2024-12-20 14:30:00
MetadataWhat the action carried{"changed_fields": ["status"]}
CategoryDescriptionExample Events
AuthenticationLogin, logout, tokensauth.login_success, auth.token_revoked
AuthorizationPermissions, rolesauthz.permission_denied, authz.role_updated
DeploymentDeployment lifecycledeployment.created, deployment.completed
ConfigurationSystem configurationconfig.solution_created, config.imported
User ManagementUser administrationuser.created, user.roles_assigned
Tenant ManagementTenant operationstenant.created, tenant.deleted
Target ManagementTarget operationstarget.created, auth.registration_approved
CertificateCertificate operationscertificate.rotated, tenant.certificate_authority_created
StorageStorage backendsstorage.created, storage.accessed
SystemSystem operationssystem.startup, thorax_instance.deregistered
┌─────────────────────────────────────────────────────────────┐
│ Audit Logs │
├─────────────────────────────────────────────────────────────┤
│ │
│ Filters: │
│ Category: [All ▼] Severity: [All ▼] │
│ Actor: [All ▼] Outcome: [All ▼] │
│ Date Range: [Last 7 days ▼] │
│ Search: [_______________________________] [Search] │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Timestamp │ Event │ Actor │ │
│ ├──────────────────────────────────────────────────────┤ │
│ │ Dec 20, 14:32:15 │ deployment.created │ alice │ │
│ │ Dec 20, 14:30:00 │ auth.login_success │ bob │ │
│ │ Dec 20, 14:28:45 │ target.updated │ admin │ │
│ │ Dec 20, 14:25:10 │ config.solution_updated │ alice │ │
│ │ Dec 20, 14:20:00 │ auth.login_failure │ unknown │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
│ Showing 1-50 of 1,247 entries [< Prev] [Next >] │
│ │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ Audit Log Entry │
├─────────────────────────────────────────────────────────────┤
│ │
│ Event ID: 550e8400-e29b-41d4-a716-446655440000 │
│ Event Type: deployment.created │
│ Category: Deployment │
│ Severity: ● Info │
│ Outcome: ✓ Success │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ Actor: │
│ ┌───────────────────────────────────────────────────────┐ │
│ │ Type: User │ │
│ │ ID: 42 │ │
│ │ Name: alice │ │
│ │ Email: alice@example.com │ │
│ │ IP Address: 192.168.1.100 │ │
│ │ User Agent: Mozilla/5.0... │ │
│ └───────────────────────────────────────────────────────┘ │
│ │
│ Resource: │
│ ┌───────────────────────────────────────────────────────┐ │
│ │ Type: Deployment │ │
│ │ ID: 123 │ │
│ │ Name: customer-portal v1.2.0 to Production │ │
│ └───────────────────────────────────────────────────────┘ │
│ │
│ Context: │
│ ┌───────────────────────────────────────────────────────┐ │
│ │ Tenant: Acme Corp │ │
│ │ Environment: Production │ │
│ │ Request ID: abc123... │ │
│ │ Correlation ID: def456... │ │
│ └───────────────────────────────────────────────────────┘ │
│ │
│ Timestamp: December 20, 2024 14:32:15 UTC │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ Chain Integrity: │
│ Entry Hash: a1b2c3d4e5f6... │
│ Previous Hash: 9z8y7x6w5v4... │
│ Chain Sequence: 1247 │
│ ✓ Hash verified │
│ │
└─────────────────────────────────────────────────────────────┘

For configuration changes, view before/after state:

┌─────────────────────────────────────────────────────────────┐
│ State Change: config.solution_updated │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────┬─────────────────────────────┐ │
│ │ Previous State │ New State │ │
│ ├─────────────────────────┼─────────────────────────────┤ │
│ │ { │ { │ │
│ │ "name": "portal", │ "name": "portal", │ │
│ │ "version": "1.1.0", │ "version": "1.2.0", ← │ │
│ │ "enabled": true │ "enabled": true │ │
│ │ } │ } │ │
│ └─────────────────────────┴─────────────────────────────┘ │
│ │
│ Changes detected: version (1.1.0 → 1.2.0) │
│ │
└─────────────────────────────────────────────────────────────┘

Filter logs by event category:

┌─────────────────────────────────────────────────────────────┐
│ Category Filter │
├─────────────────────────────────────────────────────────────┤
│ │
│ ☑ Authentication │
│ ☑ Authorization │
│ ☑ Deployment │
│ ☐ Configuration │
│ ☐ User Management │
│ ☐ Tenant Management │
│ ☐ Target Management │
│ ☐ Certificate │
│ ☐ Storage │
│ ☐ System │
│ │
│ [Apply] │
└─────────────────────────────────────────────────────────────┘
SeverityIconDescription
Info●Normal operations
Warning⚠Potential issues
Error✗Operation failed
Critical⚡System-level failures
Security🔒Security-related events
Actor TypeDescriptionExamples
UserHuman userLogin, create deployment
SystemAutomated systemScheduled tasks, maintenance
API KeyAPI key accessExternal integrations
ServiceInternal service or agentThorax orchestration, target heartbeat, registration
OutcomeDescription
SuccessAction completed successfully
FailureAction failed
PartialPartially completed
DeniedPermission denied
ErrorSystem error occurred
Terminal window
# List recent audit logs
mantisctl audit list
# Filter by category
mantisctl audit list --category deployment
# Filter by actor (user UUID)
mantisctl audit list --actor-id 550e8400-e29b-41d4-a716-446655440000
# Filter by date range (ISO 8601)
mantisctl audit list --from "2024-12-01T00:00:00Z" --to "2024-12-20T23:59:59Z"
# Filter by severity (one of: info, warning, error, critical, security)
mantisctl audit list --severity critical
# Filter by outcome
mantisctl audit list --outcome failure
# Combine filters
mantisctl audit list \
--category authentication \
--severity critical \
--outcome failure \
--from "2024-12-20T00:00:00Z"
Terminal window
# Get specific audit entry (by entry ID or event UUID)
mantisctl audit get 550e8400-e29b-41d4-a716-446655440000
# Output:
# Audit Log Entry
# ════════════════════════════════════════
# ID: 1247
# Event ID: 550e8400-e29b-41d4-a716-446655440000
# Event Type: deployment.created
# Category: deployment
# Severity: info
#
# Actor Type: user
# Actor ID: 9f8e7d6c-5b4a-3210-fedc-ba9876543210
# Actor Name: alice
#
# Resource Type: deployment
# Resource ID: 123
# Resource Name: customer-portal v1.2.0 to Production
#
# Action: create
# Outcome: success
#
# Occurred at: 2024-12-20T14:32:15.123456
# Entry Hash: a1b2c3d4e5f6...
Terminal window
# Export to JSON
mantisctl audit export --format json --output audit-logs.json
# Export to CSV
mantisctl audit export --format csv --output audit-logs.csv
# Export with filters
mantisctl audit export \
--category deployment \
--from "2024-12-01T00:00:00Z" \
--to "2024-12-31T23:59:59Z" \
--format json \
--output december-deployments.json

Audit logs use cryptographic hash chains to prevent tampering:

Each entry includes:

  • Entry Hash: SHA-256 hash of the entry content
  • Previous Hash: Hash of the preceding entry
  • Chain Sequence: Entry position in the chain

Each tenant has its own hash chain for data isolation:

Global Chain (system events):
[System Entry 1] → [System Entry 2] → [System Entry 3]
Tenant "Acme Corp" Chain:
[Acme Entry 1] → [Acme Entry 2] → [Acme Entry 3]
Tenant "Beta Inc" Chain:
[Beta Entry 1] → [Beta Entry 2] → [Beta Entry 3]
Terminal window
# Verify hash chain integrity for a tenant (by tenant UUID)
mantisctl audit verify --tenant-id 019b937d-4862-84ae-9c2a-6ac230cc4c7e
# Output:
# Audit Chain Integrity Check
# ════════════════════════════════════════
# Status: VALID
# Entries checked: 1247
# Checked at: 2024-12-20T02:00:00.123456789

A violation over entries written before an upgrade may be the hash change rather than tampering: the entry hash is computed over microsecond timestamps and previously used milliseconds, so a pre-change chain cannot be recomputed. See Upgrades. Entries written after the upgrade verify normally.

If tampering is detected:

┌─────────────────────────────────────────────────────────────┐
│ ⚠ Integrity Violation Detected │
├─────────────────────────────────────────────────────────────┤
│ │
│ Chain: Tenant "Acme Corp" │
│ Entry: #1,245 │
│ Expected Hash: a1b2c3d4... │
│ Actual Hash: x9y8z7w6... │
│ │
│ ┌───────────────────────────────────────────────────────┐ │
│ │ This indicates potential tampering with the audit log.│ │
│ │ Contact your security team immediately. │ │
│ └───────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
Event TypeDescription
auth.login_successSuccessful user login
auth.login_failureFailed login attempt
auth.logoutUser logged out
auth.token_issuedAuthentication token issued
auth.token_revokedToken revoked
auth.token_refreshAccess token refreshed
auth.token_refresh_failedToken refresh was rejected
auth.token_grant_refusedOAuth token grant refused
auth.password_changedPassword was changed
auth.session_revokedA session was revoked
auth.sessions_revoked_allEvery other session revoked
auth.2fa_enabledTwo-factor enrolment completed
auth.2fa_verifiedSecond factor checked at login
auth.api_key_createdAPI key created
Event TypeDescription
deployment.createdDeployment initiated
deployment.startedDeployment execution began
deployment.completedDeployment finished
deployment.cancelledAn operator stopped a deployment
deployment.freeze_overrideFreeze was overridden
deployment.off_target_executionRan on a Thorax instance
deployment.instance_movedA failure handler moved to another member of its pool
deployment.promotedPromoted to another environment
deployment.rolled_backDeployment was rolled back

Per-step progress is not an audit event: steps are execution records, read through the deployment’s own detail and log endpoints.

Event TypeDescription
config.solution_createdSolution created
config.solution_updatedSolution modified
config.solution_deletedSolution deleted
config.sequence_createdSequence created
config.action_createdAction created
config.environment_createdEnvironment created
config.importedConfig documents imported
config.repository_createdConfig repository connected
Event TypeDescription
target.createdTarget created
target.updatedTarget modified
target.deletedTarget deleted
target.thorax_reassignedMoved to another Thorax instance
auth.registration_approvedAn agent’s registration approved
auth.registration_revokedAn agent’s registration revoked

Audit entries are append-only and immutable — database triggers reject any UPDATE, DELETE or TRUNCATE, so the log cannot be tampered with or silently trimmed. Mantis keeps every entry until an administrator ages a quarter out; there is no schedule and no retention policy that runs on its own.

Ageing a completed quarter out is a single administrator-invoked operation: mantisctl audit archive (or POST /api/v1/audit/archives, both needing system:admin). It verifies every chain the quarter holds, writes the entries to your destination, reads them back to confirm they are retrievable, records the archive, and only then drops the partition — refusing, with the entries left in place, if the quarter is still open or any chain does not verify. See Database maintenance for the full procedure.

Deleting entries any other way means a database administrator using the mantis_audit_retention role, which the immutability triggers allow to delete. That keeps no archive and verifies no chain, so a tampered quarter is destroyed along with the evidence of the tampering.

Set up alerts for security-related events:

EventAlert Priority
auth.login_failure (repeated)Critical
auth.2fa_verified (outcome other than success)Critical
promotion.approval_deniedHigh
authz.permission_denied (unusual)Medium
deployment.freeze_overrideMedium

Schedule periodic integrity verification:

Terminal window
# Add to cron (verify a tenant's chain nightly; alert on non-zero exit)
0 2 * * * mantisctl audit verify --tenant-id 019b937d-4862-84ae-9c2a-6ac230cc4c7e --json || notify-failure

Archives written by mantisctl audit archive, and any logs you export (below), hold the same entries as the live table and need the same protection:

RequirementRecommendation
EncryptionEnable at-rest encryption
Access controlRestrict to security team
ImmutabilityUse write-once storage
Geographic redundancyStore in multiple regions

Export a date-bounded log set for compliance review or downstream report generation:

Terminal window
# Export a month of audit events for compliance review
mantisctl audit export \
--from "2024-12-01T00:00:00Z" \
--to "2024-12-31T23:59:59Z" \
--format csv \
--output compliance-dec-2024.csv
RegulationMinimum Retention
PCI DSS1 year (3 months immediately available)
HIPAA6 years
SOC 2Based on policy
GDPRAs long as necessary

Cause: Async batch processing delay

Solution:

  1. Logs are batched for performance (up to 1 second delay)
  2. Check if audit service is running
  3. Verify database connectivity

Cause: Database write bottleneck

Solution:

  1. Check database performance
  2. Review batch size configuration
  3. Consider scaling database

Cause: Potential tampering or data corruption

Solution:

  1. Investigate immediately
  2. Check for database issues
  3. Review backup integrity
  4. Contact security team

Cause: Channel overflow during high load

Solution:

  1. Increase channel buffer size
  2. Scale audit service
  3. Review event volume