pub struct AuditEntry {
pub seq: u64,
pub at_unix_ms: i64,
pub method: String,
pub principal: String,
pub fingerprint: String,
pub scope: String,
pub level: String,
pub auth_mode: String,
pub decision: String,
pub reason: String,
pub prev: String,
pub hash: String,
}Expand description
One entry, as it sits on disk.
Field order is the serialisation order and the hashing order. It is
deny_unknown_fields so a file written by a newer gunnar is refused loudly
rather than verified against fields this build cannot see.
Fields§
§seq: u640 for the first entry, then +1 each time. Redundant with the file’s line numbering on purpose: a chain whose only ordering was its line order could be truncated to a shorter, still-valid chain without the entries themselves saying anything was missing.
at_unix_ms: i64When the decision was made.
method: StringService.Method.
principal: StringThe ACL principal id.
fingerprint: StringThe key fingerprint.
scope: StringThe scope asked about.
level: StringThe grant level.
auth_mode: StringThe authentication mode the listener was in.
decision: Stringallow, deny, narrow.
reason: StringWhy, or empty.
prev: StringThe previous entry’s AuditEntry::hash, or GENESIS.
hash: StringThis entry’s own hash. Not hashed into itself; see AuditEntry::compute_hash.
Implementations§
Source§impl AuditEntry
impl AuditEntry
Sourcepub fn compute_hash(&self) -> String
pub fn compute_hash(&self) -> String
The hash this entry should carry, computed from everything else in it.
Verification is entry.hash == entry.compute_hash() plus
entry.prev == previous.hash. Both halves are needed: the first catches
an edited field, the second catches a removed, reordered or inserted
entry.
Trait Implementations§
Source§impl Clone for AuditEntry
impl Clone for AuditEntry
Source§impl Debug for AuditEntry
impl Debug for AuditEntry
Source§impl<'de> Deserialize<'de> for AuditEntry
impl<'de> Deserialize<'de> for AuditEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for AuditEntry
Source§impl PartialEq for AuditEntry
impl PartialEq for AuditEntry
Source§impl Serialize for AuditEntry
impl Serialize for AuditEntry
impl StructuralPartialEq for AuditEntry
Auto Trait Implementations§
impl Freeze for AuditEntry
impl RefUnwindSafe for AuditEntry
impl Send for AuditEntry
impl Sync for AuditEntry
impl Unpin for AuditEntry
impl UnsafeUnpin for AuditEntry
impl UnwindSafe for AuditEntry
Blanket Implementations§
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.