Class AuditEntry
Represents a single audit log entry. Immutable record created by the audit infrastructure.
public record AuditEntry : IEquatable<AuditEntry>
- Inheritance
-
AuditEntry
- Implements
- Inherited Members
Properties
AccessLevel
public string AccessLevel { get; init; }
Property Value
Action
public string Action { get; init; }
Property Value
CallerIdentity
public string CallerIdentity { get; init; }
Property Value
CallerKeyId
Stable identifier of the API key that authenticated this caller (the IApiKey.Key Guid string).
Null when the caller did not authenticate via an API key.
public string CallerKeyId { get; init; }
Property Value
CallerSource
public AuditCallerSource CallerSource { get; init; }
Property Value
CallerType
public AuditCallerType CallerType { get; init; }
Property Value
CallerUserIdentity
The authentication subject of the user who acted (Identity), or null for an API key, a background actor, or an unknown caller.
public string CallerUserIdentity { get; init; }
Property Value
Remarks
CallerIdentity is a display string resolved through a fallback chain — name claim, then preferred_username, then subject — so its content depends on which claims the identity provider emits, and a filter matching it has to do so by substring. This is always the subject or nothing, which makes an exact match possible. Same reasoning as CallerKeyId, which exists because a key's display name was "human-friendly but not unique".
CorrelationId
public Guid CorrelationId { get; init; }
Property Value
DurationMs
public long DurationMs { get; init; }
Property Value
ErrorMessage
public string ErrorMessage { get; init; }
Property Value
EventType
public required AuditEventType EventType { get; init; }
Property Value
Feature
public string Feature { get; init; }
Property Value
Metadata
public Dictionary<string, string> Metadata { get; init; }
Property Value
MethodName
public string MethodName { get; init; }
Property Value
ScopeChecked
public string ScopeChecked { get; init; }
Property Value
ScopeResult
public AuditScopeResult ScopeResult { get; init; }
Property Value
Success
public bool Success { get; init; }
Property Value
TeamKey
public string TeamKey { get; init; }
Property Value
Timestamp
public required DateTime Timestamp { get; init; }
Property Value
Methods
ParseScope(string)
Parses a scope string "feature:action" into Feature and Action components.
public static (string Feature, string Action) ParseScope(string scope)
Parameters
scopestring