Skip to main content

Interface: AuditLogEntry

Defined in: auth/src/auth/AuditLogUtils.ts:15

One durable audit-log entry recorded via AuditLogUtils.record(). Deliberately its own shape, not a pass-through of whatever payload an individual EventUtils.record() call site happens to build - field names are unified across every call site in this library (e.g. actorUid, not deletedBy/revokedBy) since this is a separate, single mechanism with its own contract.

Properties​

actorUid?​

optional actorUid?: string

Defined in: auth/src/auth/AuditLogUtils.ts:30

Who performed the action, only set when different from userUid - e.g. a trusted-role holder impersonating, deleting, or revoking sessions for another account. Mirrors BaseAccountRoute's pre-existing deletedBy/revokedBy fields, unified under one consistent name for this mechanism.


data?​

optional data?: Record<string, unknown>

Defined in: auth/src/auth/AuditLogUtils.ts:41

Any additional, entry-type-specific detail not already covered by the fields above.


ip?​

optional ip?: string

Defined in: auth/src/auth/AuditLogUtils.ts:32

The source IP address of the request that triggered this entry, if known.


method?​

optional method?: string

Defined in: auth/src/auth/AuditLogUtils.ts:39

E.g. the authentication method for a SIGNED_IN entry ("password", "passkey", "mfa", ...), or the secondary method used for an ELEVATED entry - whatever "how" is meaningful for type.


path?​

optional path?: string

Defined in: auth/src/auth/AuditLogUtils.ts:34

The request path that triggered this entry, if known.


type​

type: string

Defined in: auth/src/auth/AuditLogUtils.ts:22

A stable identifier for what happened, curated to the set of security-relevant actions this mechanism audits (see AuthEventType in ./events.js). Reuses the matching AuthEventType string value wherever one already fits the same event, so the two sinks (EventUtils/AuditLogUtils) agree on vocabulary for anything they both record.


userUid?​

optional userUid?: string

Defined in: auth/src/auth/AuditLogUtils.ts:24

The account this entry is about - the one the action was performed on or affects.