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, Client
ResourceWhat was affectedTarget, Deployment
OutcomeResult of actionsuccess, denied
TimestampWhen it occurred2024-12-20 14:30:00
CategoryDescriptionExample Events
AuthenticationLogin, logout, tokensauth.login_success, auth.token_revoked
AuthorizationPermissions, rolesauthz.permission_denied, authz.role_assigned
DeploymentDeployment lifecycledeployment.created, deployment.completed
ConfigurationSystem configurationconfig.solution_created, config.variable_updated
User ManagementUser administrationuser.created, user.locked
Tenant ManagementTenant operationstenant.created, tenant.solution_attached
Target ManagementTarget operationstarget.registered, target.approved
CertificateCertificate operationscert.created, cert.rotated
StorageStorage backendsstorage.created, storage.accessed
SystemSystem operationssystem.startup, system.config_changed
┌─────────────────────────────────────────────────────────────┐
│ 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.approved │ 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
InfoNormal operations
WarningPotential issues
ErrorOperation failed
CriticalSystem-level failures
Security🔒Security-related events
Actor TypeDescriptionExamples
UserHuman userLogin, create deployment
SystemAutomated systemScheduled tasks, maintenance
ClientTarsus agentTarget heartbeat, registration
API KeyAPI key accessExternal integrations
ServiceInternal serviceThorax orchestration
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 auth \
--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-20 14:32:15 UTC
# 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 ID, an integer)
mantisctl audit verify --tenant-id 42
# Output:
# Audit Chain Integrity Check
# ════════════════════════════════════════
# Status: VALID
# Entries checked: 1247
# Checked at: 2024-12-20T02:00:00Z

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.session_createdNew session started
auth.token_issuedAuthentication token issued
auth.token_revokedToken revoked
auth.password_changedPassword was changed
auth.account_lockedAccount locked due to failures
auth.brute_force_detectedBrute force attack detected
auth.api_key_createdAPI key created
Event TypeDescription
deployment.createdDeployment initiated
deployment.startedDeployment execution began
deployment.step_startedStep execution started
deployment.step_completedStep completed successfully
deployment.step_failedStep failed
deployment.completedDeployment finished successfully
deployment.failedDeployment failed
deployment.cancelledDeployment was cancelled
deployment.freeze_overrideFreeze was overridden
deployment.rolled_backDeployment was rolled back
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.variable_createdVariable created
config.variable_updatedVariable modified
Event TypeDescription
target.createdTarget created
target.registeredTarget registration request
target.approvedRegistration approved
target.revokedTarget certificate revoked
target.command_executedCommand executed on target

Configure how long to retain audit logs:

┌─────────────────────────────────────────────────────────────┐
│ Audit Log Retention │
├─────────────────────────────────────────────────────────────┤
│ │
│ Retention Period: [365 ] days │
│ │
│ Archive Before Delete: [✓] │
│ Archive Location: [s3://backups/audit-archive ] │
│ │
│ Compliance Hold: │
│ ○ None │
│ ● Security events: [730] days │
│ ○ All events: [___] days │
│ │
│ ┌───────────────────────────────────────────────────────┐ │
│ │ Security events are retained longer for compliance. │ │
│ └───────────────────────────────────────────────────────┘ │
│ │
│ [Cancel] [Save] │
│ │
└─────────────────────────────────────────────────────────────┘

There is no dedicated archive/restore subcommand. To retain logs for long-term storage, export a date range and move the output to your archive of choice:

Terminal window
# Export everything before a cutoff for archival
mantisctl audit export \
--to "2024-01-01T00:00:00Z" \
--format ndjson \
--output audit-archive-pre-2024.ndjson
# Then copy the file to long-term storage, e.g.:
# aws s3 cp audit-archive-pre-2024.ndjson s3://backups/audit-archive/

Set up alerts for security-related events:

EventAlert Priority
auth.brute_force_detectedCritical
auth.account_lockedHigh
auth.login_failure (repeated)Medium
authz.permission_denied (unusual)Medium
authz.privilege_escalationCritical

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 42 --json || notify-failure

Store audit archives securely:

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