Skip to main content

Gate

Trait Gate 

Source
pub trait Gate:
    Send
    + Sync
    + Debug {
    // Required method
    fn check(&self, req: &GateRequest) -> Result<GateDecision, GateError>;

    // Provided method
    fn impl_name(&self) -> &'static str { ... }
}
Expand description

Authorization gate consulted before each verb dispatch.

Implementations live downstream:

  • AllowAllGate (this crate) — permissive default
  • RegoGate (Apache-2.0 sibling crate khive-gate-rego, ADR-032) — regorus-backed Rego eval
  • LionGate<G> (khive-cloud, BUSL) — wraps any Gate with lion-core capability witnesses for verifiable enforcement.

Required Methods§

Provided Methods§

Source

fn impl_name(&self) -> &'static str

Short name of this backend — surfaced in audit events (ADR-033) so downstream tooling can tell RegoGate results apart from LionGate<RegoGate> results without parsing the type.

Implementors§