pub enum CimdError {
Ssrf(SsrfError),
DnsResolutionFailed(String, String),
DnsBlocked(String),
Fetch(String),
PeerMismatch {
expected: SocketAddr,
actual: SocketAddr,
},
InvalidDocument(String),
ClientIdMismatch {
document_client_id: String,
requested_url: String,
},
}Variants§
Ssrf(SsrfError)
DnsResolutionFailed(String, String)
A genuine DNS lookup failure (NXDOMAIN, resolver timeout, network
unreachable) — an operational problem, NOT a security event. Kept
distinct from Self::DnsBlocked so logs/callers can tell a
mistyped hostname apart from an actual SSRF attempt.
DnsBlocked(String)
DNS resolution succeeded but at least one resolved address was private/loopback/link-local/etc — the whole result is rejected rather than falling back to a public address in the same set, since a hostname resolving to a mix of public and private addresses is itself a signal worth treating as untrusted.
Fetch(String)
PeerMismatch
The actual TCP peer the response came from did not match the
address this fetch was pinned to. This is the post-connect
TOCTOU/proxy-interception backstop — see fetch_document_at.
InvalidDocument(String)
ClientIdMismatch
Implementations§
Source§impl CimdError
impl CimdError
Sourcepub fn kind(&self) -> &'static str
pub fn kind(&self) -> &'static str
Stable kind string for structured logging. Deliberately NOT surfaced
verbatim (via Display/to_string()) to the anonymous /authorize
caller — see authorize::resolve_client_redirect_uris, which logs
the full error server-side via this kind() plus Display but
returns only a generic message in the HTTP response.
A detailed message returned to an unauthenticated caller lets them
distinguish “resolves internally” from “doesn’t exist” from
“resolves publicly but unreachable,” which is a network-topology
mapping oracle.
Trait Implementations§
Source§impl Error for CimdError
impl Error for CimdError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()