pub struct TileZeroGate { /* private fields */ }Expand description
Gate backend wrapping cognitum_gate_tilezero::TileZero.
Provides three-way Permit/Defer/Deny decisions with Ed25519-signed
PermitTokens and blake3-chained WitnessReceipts. Gate events
are logged to the kernel chain when a ChainManager is provided.
Implementations§
Source§impl TileZeroGate
impl TileZeroGate
Sourcepub fn new(tilezero: Arc<TileZero>, chain: Option<Arc<ChainManager>>) -> Self
pub fn new(tilezero: Arc<TileZero>, chain: Option<Arc<ChainManager>>) -> Self
Create a new TileZero gate.
tilezero — a shared TileZero instance (created once at
boot, fed with tile reports by the coherence fabric).
chain — optional chain manager for audit logging. When
provided, every decision emits a gate.permit, gate.defer,
or gate.deny event.
Trait Implementations§
Source§impl GateBackend for TileZeroGate
impl GateBackend for TileZeroGate
Source§fn check(&self, agent_id: &str, action: &str, context: &Value) -> GateDecision
fn check(&self, agent_id: &str, action: &str, context: &Value) -> GateDecision
Check whether an agent is allowed to perform an action. Read more
Source§fn check_teardown(
&self,
agent_id: &str,
action: &str,
context: &Value,
) -> GateDecision
fn check_teardown( &self, agent_id: &str, action: &str, context: &Value, ) -> GateDecision
Self::check for a teardown (stop / unload / re-adoption of what
is already placed): a denial caused only by the node’s trust tier is
waived, every other denial (revocation, default deny, rule or
threshold) stands. Gates that cannot tell the difference return the
plain decision, so they never waive anything.Source§fn governance_snapshot(&self) -> Option<GovernanceSnapshot>
fn governance_snapshot(&self) -> Option<GovernanceSnapshot>
The rules and settings this gate evaluates with, when it is backed by
a governance engine. The user daemon exports it as the signed parent
policy for its project kernels (ADR-103 D8).
None for gates with no
rule set.Auto Trait Implementations§
impl !RefUnwindSafe for TileZeroGate
impl !UnwindSafe for TileZeroGate
impl Freeze for TileZeroGate
impl Send for TileZeroGate
impl Sync for TileZeroGate
impl Unpin for TileZeroGate
impl UnsafeUnpin for TileZeroGate
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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