pub struct CredentialStore { /* private fields */ }Expand description
Credential store for all configured routes.
Implementations§
Source§impl CredentialStore
impl CredentialStore
Sourcepub fn load(routes: &[RouteConfig]) -> Result<Self>
pub fn load(routes: &[RouteConfig]) -> Result<Self>
Load credentials for all configured routes from the system keystore.
Routes without a credential_key are skipped (no credential injection).
Routes whose credential is not found (e.g. unset env var) are skipped
with a warning — this allows profiles to declare optional credentials
without failing when they are unavailable.
Returns an error only for hard failures (keystore access errors, config parse errors, non-UTF-8 values).
Sourcepub fn get(&self, prefix: &str) -> Option<&LoadedCredential>
pub fn get(&self, prefix: &str) -> Option<&LoadedCredential>
Get a credential for a route prefix, if configured.
Sourcepub fn loaded_prefixes(&self) -> HashSet<String>
pub fn loaded_prefixes(&self) -> HashSet<String>
Returns the set of route prefixes that have loaded credentials.
Sourcepub fn is_credential_upstream(&self, host_port: &str) -> bool
pub fn is_credential_upstream(&self, host_port: &str) -> bool
Check whether host_port (e.g. "gitlab.example.com:443") matches
any credential upstream. Used to block CONNECT tunnels that would
bypass L7 path filtering.
Sourcepub fn credential_upstream_hosts(&self) -> HashSet<String>
pub fn credential_upstream_hosts(&self) -> HashSet<String>
Return the set of normalised host:port strings for all credential
upstreams. Used to compute smart NO_PROXY — hosts in this set must
NOT be bypassed because they need reverse proxy credential injection.