Audit Logs

Audit Logs describe actions that were performed on potentially sensitive data to create a digital paper trail for compliance and security. The UserMirror platform automatically generates the logs in each service which can export into any customer destination for monitoring and operations.

type AuditLogs struct {
    AuditLog []AuditLog `json:"logs"`
    Cursor   string `json:"cursor"`
}

type AuditLog struct {
    Agent      `json:"agent"`
    Action     `json:"action"`
    Resource   `json:"resource"`
    Timestamp  time.Time              `json:"ts"`
    Metadata   map[string]interface{} `json:"metadata"`
}

type Agent struct {
    ID       string                 `json:"id"`
    Metadata map[string]interface{} `json:"metadata"`
}

type Action struct {
    Success bool                   `json:"success"`
    Info    map[string]interface{} `json:"info"`
}

type Resource struct {
    ID   string `json:"id"`
    Type string `json:"type"`
}
{
  "cursor": "um:cursor:logs::after:1548550417227",
  "logs": [
    {
      "ts": "2019-01-27T00:59:14.788Z",
      "action": {
        "success": true,
        "metadata": {
          "actions": ["kms:GetKey"]
        }
      },
      "agent": {
        "id": "um:client:browser::1GKNnqjTEZg0I0VzzgKNeWxODTi",
        "metadata": {
          "okta_id": "0oabkvBLDEKCNXBGYUAS",
          "app": "https://work.internal/support-desk"
        }
      },
      "resource": {
        "id": "007febf3f8bb9b9a0bc26f9cc7dfed38",
        "type": "user"
      },
      "metadata": {
        "decrypted_fields": ["name", "email"],
        "reason": "Following up on support request"
      }
    }
  ]
}