pub(crate) enum LanPubkeyLookup {
Found(Vec<u8>),
NotFound,
RateLimited,
}Expand description
Outcome of find_agent_lan_pubkey. Three states, not two — reagentx P0
follow-up on the LAN signing PR: collapsing “the lookup was skipped
(rate-limited)” into the same None/“not found” outcome as “genuinely
no peer has this key” let an attacker exhaust
LAN_PUBKEY_LOOKUP_RATE_LIMIT with junk lookups, then slip a forged
signature for a REAL agent’s identity through as unverified (benign)
instead of a verification failure (forced sensitive). By the time this
function is ever called, verify_lan_signature has already confirmed a
lan_sig was actually presented — so “we didn’t check” must be
distinguishable from “there was nothing to check.”
Variants§
Found(Vec<u8>)
A peer has a public key on file for this agent_id.
NotFound
No peer (that answered) has ever minted a LAN key for this agent_id — genuinely unknown sender, not a red flag on its own (same “unverified, not escalated” treatment self-declared senders already get elsewhere in this system).
RateLimited
The lookup was skipped by the rate limiter — unknown, NOT the same
as NotFound. Callers verifying an actual signature attempt must
treat this conservatively (as a failure), never as “nothing to
check.”
Auto Trait Implementations§
impl Freeze for LanPubkeyLookup
impl RefUnwindSafe for LanPubkeyLookup
impl Send for LanPubkeyLookup
impl Sync for LanPubkeyLookup
impl Unpin for LanPubkeyLookup
impl UnsafeUnpin for LanPubkeyLookup
impl UnwindSafe for LanPubkeyLookup
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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