pub struct HttpPlcFetcher { /* private fields */ }Expand description
Native HTTPS did:plc document fetcher.
Same fetch+cache posture as the did:web fetcher
(crate::did_web::HttpDidDocFetcher) — no redirects, 10s connect/total
timeouts, a 1 MiB body cap ([read_capped]), a bounded TTL cache
([evict_for_insert], failures never cached, expired entries never
served) — plus the #1161 egress allowlist: a request is dispatched only
if its URL’s origin is on the allowlist, which is exactly the configured
PLC directory’s origin. A mis-derived or attacker-influenced URL pointing
anywhere else (link-local metadata endpoints, loopback, a different
directory) is refused before any network I/O.
Read-only forever: the HTTP client is private and used for GET only; this type exposes no write methods and no way to reach the client. That is structural, not a convention — a PLC write path does not exist to be misconfigured.
Implementations§
Source§impl HttpPlcFetcher
impl HttpPlcFetcher
Sourcepub fn allowed_origins(&self) -> &[Origin]
pub fn allowed_origins(&self) -> &[Origin]
The egress allowlist: the only origins this fetcher will issue requests to.
Trait Implementations§
Source§impl DidDocFetcher for HttpPlcFetcher
impl DidDocFetcher for HttpPlcFetcher
Source§impl PlcAuditFetcher for HttpPlcFetcher
impl PlcAuditFetcher for HttpPlcFetcher
Auto Trait Implementations§
impl !Freeze for HttpPlcFetcher
impl !RefUnwindSafe for HttpPlcFetcher
impl Send for HttpPlcFetcher
impl Sync for HttpPlcFetcher
impl Unpin for HttpPlcFetcher
impl UnsafeUnpin for HttpPlcFetcher
impl !UnwindSafe for HttpPlcFetcher
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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