pub enum EventIdentity<'a> {
LegacyV1,
V2 {
caller_principal: &'a str,
},
}Expand description
Encoding generation of an approval-event row, mirroring what
ChainIdentity does for transaction rows: the audit_events.chain_version
column selects, per row, which message its signature was made over, so rows
written by an older binary keep verifying (#249).
A downgrade is not a hiding place, for the same reason as on the transaction
chain: rewriting a V2 row as LegacyV1 (to erase caller_principal)
makes verification re-encode it without the identity fields, the stored
signature no longer matches, and the row reports Broken.
Variants§
LegacyV1
chain_version = 1. The six-field encoding every event row written
before the approver-identity migration was signed under. It stays
byte-identical forever: historical rows have to keep verifying.
V2
chain_version = 2. Appends the account that performed this event’s
operation — the approver on approval_granted, the executor on
approval_consumed, the revoker on approval_revoked. Status events
stay LegacyV1: they are written from spawned execution tasks with no
caller attribution in scope, and signing an account the code cannot
see would be a signed guess.
Fields
caller_principal: &'a strScheme-prefixed identity rendered by crate::auth::CallerPrincipal
(uid:1000, token:vsock, none:unattributed). The scheme is
signed along with the value for the same reason as on the
transaction chain: the evidence classes differ in strength and an
auditor must be able to tell them apart.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for EventIdentity<'a>
impl<'a> Clone for EventIdentity<'a>
impl<'a> Copy for EventIdentity<'a>
Source§impl<'a> Debug for EventIdentity<'a>
impl<'a> Debug for EventIdentity<'a>
impl<'a> Eq for EventIdentity<'a>
Source§impl<'a> PartialEq for EventIdentity<'a>
impl<'a> PartialEq for EventIdentity<'a>
impl<'a> StructuralPartialEq for EventIdentity<'a>
Auto Trait Implementations§
impl<'a> Freeze for EventIdentity<'a>
impl<'a> RefUnwindSafe for EventIdentity<'a>
impl<'a> Send for EventIdentity<'a>
impl<'a> Sync for EventIdentity<'a>
impl<'a> Unpin for EventIdentity<'a>
impl<'a> UnsafeUnpin for EventIdentity<'a>
impl<'a> UnwindSafe for EventIdentity<'a>
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more