pub struct HttpAuthority { /* private fields */ }Implementations§
Source§impl HttpAuthority
impl HttpAuthority
Sourcepub fn builder() -> HttpAuthorityBuilder
pub fn builder() -> HttpAuthorityBuilder
Start building an authority whose embedded kernel is backed by durable
receipt and revocation stores. Stores must be attached before the kernel
is wrapped in an Arc, which is what this builder does.
Sourcepub fn new(keypair: Keypair, policy_hash: String) -> Self
pub fn new(keypair: Keypair, policy_hash: String) -> Self
Fail-closed constructor: no receipt or revocation store is attached and
both ephemeral opt-ins are off. Existing callers compile unchanged, but
the first mediated call now denies with a durable-persistence error
until a durable store is wired through HttpAuthority::builder. This
matches the kernel-backed lanes, which already deny when durable
persistence is missing.
Sourcepub fn new_ephemeral(keypair: Keypair, policy_hash: String) -> Self
pub fn new_ephemeral(keypair: Keypair, policy_hash: String) -> Self
Explicitly ephemeral constructor (in-memory receipt log and revocation store) for local scaffolds and tests that intend ephemerality.
Sourcepub fn new_with_approval_store(
keypair: Keypair,
policy_hash: String,
approval_store: Arc<dyn ApprovalStore>,
) -> Self
pub fn new_with_approval_store( keypair: Keypair, policy_hash: String, approval_store: Arc<dyn ApprovalStore>, ) -> Self
Fail-closed constructor with a caller-provided approval store. Like
HttpAuthority::new, no receipt or revocation store is attached and both
ephemeral opt-ins stay off, so a mediated side-effect call denies with a
durable-persistence error until durable stores are wired through
HttpAuthority::builder. Reach for
HttpAuthority::new_ephemeral_with_approval_store_and_trusted_issuers
when in-memory receipts and revocations are intended.
Sourcepub fn new_with_approval_store_and_trusted_issuers(
keypair: Keypair,
policy_hash: String,
approval_store: Arc<dyn ApprovalStore>,
trusted_capability_issuers: Vec<PublicKey>,
) -> Self
pub fn new_with_approval_store_and_trusted_issuers( keypair: Keypair, policy_hash: String, approval_store: Arc<dyn ApprovalStore>, trusted_capability_issuers: Vec<PublicKey>, ) -> Self
Fail-closed constructor with a caller-provided approval store and trusted
issuers. Side-effect calls deny until durable stores are attached; see
HttpAuthority::new_with_approval_store.
Sourcepub fn new_ephemeral_with_approval_store_and_trusted_issuers(
keypair: Keypair,
policy_hash: String,
approval_store: Arc<dyn ApprovalStore>,
trusted_capability_issuers: Vec<PublicKey>,
) -> Self
pub fn new_ephemeral_with_approval_store_and_trusted_issuers( keypair: Keypair, policy_hash: String, approval_store: Arc<dyn ApprovalStore>, trusted_capability_issuers: Vec<PublicKey>, ) -> Self
Explicitly ephemeral constructor with a caller-provided approval store and
trusted issuers: the embedded kernel keeps its receipt log and revocation
state in memory, and both are lost on restart. Ephemerality is opted into
through the constructor name (unlike the fail-closed
HttpAuthority::new_with_approval_store_and_trusted_issuers) for local
scaffolds and tests that intend it.
pub fn approval_store(&self) -> Arc<dyn ApprovalStore>
pub fn set_execution_nonce_store( &mut self, config: ExecutionNonceConfig, store: Box<dyn ExecutionNonceStore>, ) -> Result<(), HttpAuthorityError>
pub fn evaluate( &self, input: HttpAuthorityInput<'_>, ) -> Result<HttpAuthorityEvaluation, HttpAuthorityError>
pub fn prepare( &self, input: HttpAuthorityInput<'_>, ) -> Result<PreparedHttpEvaluation, HttpAuthorityError>
pub fn sign_decision_receipt( &self, prepared: &PreparedHttpEvaluation, ) -> Result<HttpReceipt, HttpAuthorityError>
pub fn finalize_receipt( &self, prepared: &PreparedHttpEvaluation, response_status: u16, decision_receipt_id: Option<&str>, ) -> Result<HttpReceipt, HttpAuthorityError>
Sourcepub fn sign_transport_deny_receipt(
&self,
input: TransportDenyInput<'_>,
) -> Result<HttpReceipt, HttpAuthorityError>
pub fn sign_transport_deny_receipt( &self, input: TransportDenyInput<'_>, ) -> Result<HttpReceipt, HttpAuthorityError>
Sign a deny receipt for a request that was rejected before the kernel
ever evaluated it (for example, an oversized HTTP body that the
transport layer refused to buffer). The caller supplies the verdict and
the surface-level identification fields directly because no kernel
receipt id, content hash, or capability id exists yet. The receipt
carries final HTTP status scope metadata so downstream auditors can
distinguish it from in-band kernel decisions.
pub fn finalize_decision_receipt( &self, decision_receipt: &HttpReceipt, response_status: u16, ) -> Result<HttpReceipt, HttpAuthorityError>
Trait Implementations§
Source§impl Clone for HttpAuthority
impl Clone for HttpAuthority
Source§fn clone(&self) -> HttpAuthority
fn clone(&self) -> HttpAuthority
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for HttpAuthority
impl !UnwindSafe for HttpAuthority
impl Freeze for HttpAuthority
impl Send for HttpAuthority
impl Sync for HttpAuthority
impl Unpin for HttpAuthority
impl UnsafeUnpin for HttpAuthority
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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