Game Framework
Security & Access Control

Audit Logging

Game Framework logs all actions for security, compliance, and debugging.

What is Logged

Every action creates an audit log entry:

  • Who - User ID and email
  • What - Action performed
  • When - Timestamp (UTC)
  • Where - IP address, user agent
  • Result - Success or failure

Viewing Audit Logs

curl https://registry.yourcompany.com/v1/workspaces/ws_ID/audit-logs \
  -H "Authorization: Bearer $TOKEN"

Response:

{
  "logs": [
    {
      "id": "log_123",
      "user_id": "usr_456",
      "user_email": "dev@company.com",
      "action": "package.create",
      "resource_type": "package",
      "resource_id": "pkg_789",
      "ip_address": "203.0.113.1",
      "user_agent": "dart-pub/2.19.0",
      "result": "success",
      "timestamp": "2025-01-10T14:30:00Z"
    }
  ]
}

Logged Actions

  • Package creation, updates, deletion
  • Version publishing
  • Member invitations, role changes
  • API key creation, revocation
  • Workspace settings changes
  • Permission denials

Filtering Logs

# By user
curl "https://registry.yourcompany.com/v1/workspaces/ws_ID/audit-logs?user_id=usr_ID" \
  -H "Authorization: Bearer $TOKEN"

# By action
curl "https://registry.yourcompany.com/v1/workspaces/ws_ID/audit-logs?action=package.delete" \
  -H "Authorization: Bearer $TOKEN"

# By date range
curl "https://registry.yourcompany.com/v1/workspaces/ws_ID/audit-logs?from=2025-01-01&to=2025-01-31" \
  -H "Authorization: Bearer $TOKEN"

Export Logs

# Export as JSON
curl https://registry.yourcompany.com/v1/workspaces/ws_ID/audit-logs/export \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json" \
  > audit-logs.json

# Export as CSV
curl https://registry.yourcompany.com/v1/workspaces/ws_ID/audit-logs/export \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: text/csv" \
  > audit-logs.csv

Retention

PlanRetention Period
Free30 days
Pro90 days
Enterprise1+ years (configurable)

Compliance

Audit logs support compliance with:

  • SOC 2 - Access monitoring
  • GDPR - Data access tracking
  • HIPAA - PHI access logs
  • ISO 27001 - Security controls

Next Steps