pub enum AuditLevel {
Minimal,
Standard,
Detailed,
Forensic,
}Expand description
How much of each change is recorded. Each level includes everything from the previous one.
Variants§
Minimal
Who, when, what (object id) and whether it was applied.
Standard
Plus a summary of the change (permission, subject, target, effect, scope) and the names of the invariants that refused it.
Detailed
Plus the whole object (grant with condition, tuple), the full actor, the violation messages and the application metadata (ip, request id, reason).
Forensic
Plus the digest of the grant set before and after, and the hash chain.
Implementations§
Source§impl AuditLevel
impl AuditLevel
pub const ALL: [AuditLevel; 4]
Sourcepub const fn typical_record_bytes(self) -> u64
pub const fn typical_record_bytes(self) -> u64
Typical size of a record in compact JSON, in bytes, measured on the reference record of
reference_record (grant with a scope and a two-clause condition, actor with two roles and
three metadata entries). The test estimates_match_reference_records keeps these numbers
honest.
Sourcepub const fn typical_decision_bytes(self) -> u64
pub const fn typical_decision_bytes(self) -> u64
Like AuditLevel::typical_record_bytes, for decision records, measured on
reference_decision_record (three grants in the source, one with a condition).
pub const fn estimate_decision_bytes(self, records: u64) -> u64
Sourcepub const fn estimate_bytes(self, records: u64) -> u64
pub const fn estimate_bytes(self, records: u64) -> u64
Storage estimate for records records in JSON Lines, with no compression and no index. In a
database, add the per-row overhead (in Postgres, about 28 bytes between the tuple header and the
item pointer, plus whatever indexes you create).