Raxol.Audit.Events.AuditEvent (Raxol v2.0.1)

View Source

Base audit event structure with common fields for all audit events.

Summary

Types

actor()

@type actor() :: %{
  user_id: String.t() | nil,
  service_id: String.t() | nil,
  api_key_id: String.t() | nil,
  ip_address: String.t(),
  user_agent: String.t() | nil
}

outcome()

@type outcome() :: :success | :failure | :error | :denied

resource()

@type resource() :: %{
  type: String.t(),
  id: String.t(),
  name: String.t() | nil,
  owner: String.t() | nil
}

severity()

@type severity() :: :critical | :high | :medium | :low | :info

t()

@type t() :: %Raxol.Audit.Events.AuditEvent{
  action: String.t(),
  actor: actor(),
  correlation_id: String.t() | nil,
  event_id: String.t(),
  event_type: String.t(),
  ip_address: String.t() | nil,
  metadata: map(),
  outcome: outcome(),
  reason: String.t() | nil,
  resource: resource(),
  session_id: String.t() | nil,
  severity: severity(),
  tags: [String.t()],
  timestamp: integer(),
  user_agent: String.t() | nil
}