Skip to main content

Overview

Moss provides comprehensive audit logging to help you meet compliance requirements and investigate security incidents. Every API request can be tracked, reviewed, and analyzed.

What Gets Logged

Inbound Requests (SDK to Backend)

Outbound Requests (Backend to External Services)


Sensitive Data Redaction

All audit logs are automatically sanitized before storage:

Redacted Fields

The following fields are automatically redacted:
  • api_key, apiKey
  • authorization
  • password
  • secret
  • token
  • x-api-key

Redaction Example

Redaction is recursive - nested objects and arrays are also sanitized.

Per-Application Control

Audit logging can be enabled or disabled per application:

Dashboard Configuration

Navigate to Settings > Developer Options > Audit Logging to enable or disable logging for your application.

Considerations

We recommend enabling audit logging for all production applications, especially those handling sensitive data.

Accessing Audit Logs

Dashboard Access

View audit logs in the Dashboard under Configure > Audit Log. Features:
  • Filter by date range
  • Filter by user or session
  • Filter by endpoint or status
  • Export to CSV

API Access

Query audit logs programmatically using the Audit API:
Results are paginated with page and page_size, and can be narrowed with actor_id, action, target_type, outcome, start_date, and end_date.

Audit API Key

A separate API key is used for audit log access:
  • Isolated Access - Audit key is separate from SDK API key
  • Read-Only - Cannot modify logs or other data
  • Revocable - Can be revoked independently

Log Retention

Retention is configurable per plan. Contact us for the retention period that applies to your account, or to arrange a custom period based on your compliance requirements.

Use Cases

Compliance Reporting

Generate reports for auditors:
  1. Filter logs by date range
  2. Export to CSV
  3. Include in compliance documentation

Security Investigation

Investigate suspicious activity:
  1. Identify the user or session
  2. Review all related requests
  3. Check for anomalous patterns
  4. Export evidence for incident response

Performance Analysis

Analyze API usage patterns:
  1. Review request durations
  2. Identify slow endpoints
  3. Track LLM token usage
  4. Optimize based on data

Cost Analysis

Track LLM usage costs:
  1. Review token counts per model
  2. Identify high-usage sessions
  3. Optimize prompts and context

Log Integrity

Immutability

Audit logs are immutable once created:
  • Logs cannot be modified after creation
  • Logs cannot be deleted by application owners
  • Deletion only through data retention policies

Timestamps

All timestamps are:
  • UTC normalized
  • Server-side generated
  • Cannot be client-specified

Best Practices

Enable for Production

Always enable audit logging for production applications to:
  • Meet compliance requirements
  • Enable incident investigation
  • Track usage patterns

Regular Review

Periodically review audit logs for:
  • Unusual access patterns
  • Failed authentication attempts
  • Unexpected API usage

Secure API Keys

Protect your Audit API key:
  • Store securely (not in code)
  • Rotate periodically
  • Monitor for unauthorized use

Next Steps

Compliance

GDPR, data deletion, and certifications

Authentication

Secure your SDK integration