Audit Logs
Track user actions, login events, and system changes for compliance and security monitoring.
oCore records audit logs for every significant action performed in your organization. Audit logs provide a tamper-resistant record of who did what and when, supporting compliance requirements, security investigations, and operational troubleshooting.
Audit Logs
View and filter audit logs for your organization.
What Events Are Logged
oCore audit logs capture events across all resource types:
Authentication Events
| Event | Description |
|---|---|
auth.login | User logged in (includes method: password, TOTP, passkey) |
auth.logout | User logged out |
auth.login_failed | Failed login attempt (wrong password, invalid TOTP) |
auth.totp_enabled | User enabled two-factor authentication |
auth.totp_disabled | User disabled two-factor authentication |
auth.passkey_registered | User registered a passkey (WebAuthn) |
auth.password_changed | User changed their password |
auth.password_reset | Password reset requested |
Organization Events
| Event | Description |
|---|---|
org.updated | Organization name, slug, or settings changed |
org.settings_updated | Organization settings modified |
member.invited | New member invitation sent |
member.joined | New member accepted invitation |
member.role_changed | Member's role was updated |
member.removed | Member was removed from organization |
Infrastructure Events
| Event | Description |
|---|---|
server.created | New server added |
server.updated | Server settings changed |
server.deleted | Server removed |
instance.created | New instance created |
instance.started | Instance started |
instance.stopped | Instance stopped |
instance.restarted | Instance restarted |
instance.deleted | Instance deleted |
instance.settings_updated | Instance settings changed |
Deployment Events
| Event | Description |
|---|---|
deployment.triggered | Deployment started (manual or webhook) |
deployment.completed | Deployment finished successfully |
deployment.failed | Deployment failed |
deployment.rolled_back | Deployment rolled back via snapshot |
Data Management Events
| Event | Description |
|---|---|
backup.created | Backup created (manual or scheduled) |
backup.restored | Backup restored |
backup.deleted | Backup deleted |
database.created | Database created |
database.dropped | Database dropped |
database.neutralized | Database neutralized |
Access Control Events
| Event | Description |
|---|---|
role.created | Custom role created |
role.updated | Role permissions changed |
role.deleted | Custom role deleted |
api_key.created | API key created |
api_key.revoked | API key revoked |
webhook_endpoint.created | Webhook endpoint created |
webhook_endpoint.deleted | Webhook endpoint deleted |
Viewing Audit Logs
Dashboard View
The audit log page in the dashboard provides a filterable, searchable view of all events. Each log entry shows:
- Timestamp -- When the event occurred (UTC)
- Actor -- Who performed the action (user email or "system" for automated events)
- Action -- The event type (e.g.,
instance.created) - Resource -- The affected resource type and ID
- Details -- Additional context (IP address, user agent, changed fields)
API Access
curl "https://ocore.example.com/api/audit-logs?limit=50&offset=0" \
-H "Authorization: Bearer $TOKEN"ocore audit list --limit 50Filtering
Filter audit logs by multiple criteria:
curl "https://ocore.example.com/api/audit-logs?\
action=instance.created&\
userId=USER_UUID&\
from=2026-02-01T00:00:00Z&\
to=2026-02-28T23:59:59Z&\
limit=50" \
-H "Authorization: Bearer $TOKEN"Available filters:
| Filter | Description | Example |
|---|---|---|
action | Event type | deployment.triggered |
userId | Actor user ID | UUID |
resourceType | Resource category | instance, server, member |
resourceId | Specific resource ID | UUID |
from | Start date (inclusive) | ISO 8601 timestamp |
to | End date (inclusive) | ISO 8601 timestamp |
limit | Results per page | 50 |
offset | Pagination offset | 0 |
Login Event Tracking
Login events receive special attention in the audit log because they are the most security-sensitive:
What Login Logs Capture
| Field | Description |
|---|---|
| IP Address | The client's IP address |
| User Agent | Browser or API client identifier |
| Auth Method | How the user authenticated (password, TOTP, passkey, API key) |
| Success/Failure | Whether the attempt succeeded |
| Failure Reason | Why it failed (wrong password, invalid TOTP code, account locked) |
Suspicious Login Detection
Review login events for security anomalies:
- Multiple failed attempts from the same IP (possible brute force)
- Logins from unusual geographic locations
- Logins at unusual times
- New user agents appearing
# View recent failed login attempts
curl "https://ocore.example.com/api/audit-logs?action=auth.login_failed&limit=20" \
-H "Authorization: Bearer $TOKEN"Data Retention
Audit log retention depends on your deployment configuration:
| Tier | Retention | Notes |
|---|---|---|
| Default | 90 days | Suitable for most organizations |
| Extended | 1 year | For compliance requirements (GDPR, SOC 2) |
| Custom | Configurable | Set via organization settings |
Audit Logs Are Immutable
Once written, audit log entries cannot be modified or deleted through the API. This ensures the integrity of the audit trail for compliance purposes.
Integration with External Systems
Exporting Audit Logs
For long-term archival or SIEM integration, export audit logs periodically:
# Export logs for a date range
curl "https://ocore.example.com/api/audit-logs/export?\
from=2026-02-01T00:00:00Z&\
to=2026-02-28T23:59:59Z" \
-H "Authorization: Bearer $TOKEN" \
-o audit-export.jsonWebhook Notifications
Configure webhook endpoints to receive real-time audit event notifications. See Webhooks for setup instructions.
Required Permissions
| Action | Permission |
|---|---|
| View audit logs | view:audit_logs |
| Export audit logs | view:audit_logs |
All system roles except Viewer have audit log view access by default.
Troubleshooting
Audit logs missing events
- Events are logged asynchronously -- there may be a brief delay (typically under 1 second)
- Check your date range filter -- events use UTC timestamps
- Automated system events (e.g., scheduled backups) show "system" as the actor
Cannot access audit logs
- Verify your role has the
view:audit_logspermission - Audit logs are scoped to your current organization
- Some events may only be visible to organization Owners
Audit log query is slow
- Use specific filters (action, date range, userId) rather than fetching all logs
- Reduce the
limitparameter for faster responses - Use pagination (
offset) to browse large result sets
Events from API keys not showing user
- API key events show the key name and ID rather than a user email
- Cross-reference with the API key list to identify the creator