pub struct DecisionRecord {
pub generation: u64,
pub op: Op,
pub key: String,
pub actor_kind: String,
pub actor_id: String,
pub authenticated_by: Vec<String>,
pub presenter_kind: String,
pub presenter_id: String,
pub outcome: Outcome,
pub reason: String,
}Expand description
A structured record of one authorization decision (the audit hook point).
Built from a Decision plus the request’s (subject, op, key) and
presenter context. It carries everything the audit sink needs to serialize a
JSONL audit line and nothing secret: no payloads, no key bytes, no
signatures.
Fields§
§generation: u64The id of the policy generation this decision was made against
(basil-y3e). Lets the audit trail tie a decision to the exact
catalog/policy snapshot that produced it across a hot reload.
op: OpThe op that was gated (the policy Op, e.g. sign, new_key).
key: StringThe dotted catalog key the op targeted.
actor_kind: StringActor kind. M1 authorization records are subject-based.
actor_id: StringThe policy subject being authorized.
authenticated_by: Vec<String>Evidence summaries that established the actor.
presenter_kind: StringPresenter kind, e.g. unix_peercred.
presenter_id: StringPresenter id, preferably the configured name(uid) label.
outcome: OutcomeAllow or deny.
reason: StringOn an allow, what granted it (subject / public-class); on a deny, which check failed (unknown-key / not-writable / not-permitted). Always a short stable token, never secret.
Implementations§
Source§impl DecisionRecord
impl DecisionRecord
Sourcepub fn from_actor_decision(
generation: u64,
actor: &AuthenticatedActor,
op: Op,
key: &str,
decision: &Decision,
) -> Self
pub fn from_actor_decision( generation: u64, actor: &AuthenticatedActor, op: Op, key: &str, decision: &Decision, ) -> Self
Build a record from a PDP Decision for an AuthenticatedActor.
Trait Implementations§
Source§impl Clone for DecisionRecord
impl Clone for DecisionRecord
Source§fn clone(&self) -> DecisionRecord
fn clone(&self) -> DecisionRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DecisionRecord
impl Debug for DecisionRecord
impl Eq for DecisionRecord
Source§impl PartialEq for DecisionRecord
impl PartialEq for DecisionRecord
Source§fn eq(&self, other: &DecisionRecord) -> bool
fn eq(&self, other: &DecisionRecord) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DecisionRecord
Auto Trait Implementations§
impl Freeze for DecisionRecord
impl RefUnwindSafe for DecisionRecord
impl Send for DecisionRecord
impl Sync for DecisionRecord
impl Unpin for DecisionRecord
impl UnsafeUnpin for DecisionRecord
impl UnwindSafe for DecisionRecord
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
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,
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.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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request