Skip to main content

Overview

Moss records audit events and supports optional detailed request logging for compliance and security investigations.

What Gets Logged

The tables below describe detailed request logs when enabled.

Inbound Requests (SDK to Backend)

Outbound Requests (Backend to External Services)


Sensitive Data Redaction

The request-log sanitizer redacts the following credential fields before storage:

Redacted Fields

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

Redaction Example

Credential fields are redacted recursively. Detailed request logging covers instrumented paths.

Per-Application Control

Detailed request logging can be enabled or disabled per application: This setting controls detailed request logs, separately from administrative audit events.

Dashboard Configuration

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

Considerations

Enable detailed request logging when needed.

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

Applicable agreements, documented customer instructions, and lawful preservation requirements determine the deployed schedule. A required minimum must be reconciled with an expiry period before deletion. Confirm the active schedule for your deployment with Moss.

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

Append-Only Audit Events

  • Application users cannot edit or delete existing audit events through the dashboard or Audit API.
  • The retention process removes expired audit events.

Timestamps

Audit-event timestamps are generated by the server in UTC.

Best Practices

Enable for Production

Configure production audit and request logging to:
  • Meet compliance requirements
  • Enable incident investigation
  • Track usage patterns

Regular Review

Periodically review audit logs for:
  • Unusual access patterns
  • Access changes and recorded security events
  • 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