pub struct CredentialBrokerConfig {
pub broker_ip: Ipv4Addr,
pub broker_port: u16,
pub inject_proxy_env: bool,
}Expand description
Host-side credential broker endpoint for broker-only egress.
The broker process runs outside the sandbox and holds the real credential. Nucleus only allows the sandbox to reach this endpoint; the broker is responsible for injecting credentials, constraining upstream destinations, rate limiting, and auditing authenticated requests.
Fields§
§broker_ip: Ipv4AddrHost-side bridge IP reachable from the container namespace.
broker_port: u16TCP port where the host-side broker listens.
inject_proxy_env: boolWhether Nucleus should inject standard proxy environment variables pointing at the broker. Disable this when using a provider-specific base URL environment variable instead.
Implementations§
Source§impl CredentialBrokerConfig
impl CredentialBrokerConfig
Sourcepub fn new(broker_ip: Ipv4Addr, broker_port: u16) -> Self
pub fn new(broker_ip: Ipv4Addr, broker_port: u16) -> Self
Create a credential broker config from a host-side bridge IP and port.
Sourcepub fn parse_endpoint(endpoint: &str) -> Result<Self, String>
pub fn parse_endpoint(endpoint: &str) -> Result<Self, String>
Parse an endpoint in IPv4:PORT form.
pub fn with_proxy_env(self, inject_proxy_env: bool) -> Self
pub fn validate(&self) -> Result<(), String>
pub fn validate_for_bridge(&self, bridge: &BridgeConfig) -> Result<(), String>
pub fn broker_cidr(&self) -> String
pub fn proxy_url(&self) -> String
Sourcepub fn proxy_environment(&self) -> Vec<(String, String)>
pub fn proxy_environment(&self) -> Vec<(String, String)>
Standard proxy variables for HTTP API CLIs that honor proxy settings.
These values are not secrets; they only point at the broker endpoint.
pub fn egress_policy(&self) -> EgressPolicy
Trait Implementations§
Source§impl Clone for CredentialBrokerConfig
impl Clone for CredentialBrokerConfig
Source§fn clone(&self) -> CredentialBrokerConfig
fn clone(&self) -> CredentialBrokerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CredentialBrokerConfig
impl Debug for CredentialBrokerConfig
impl Eq for CredentialBrokerConfig
Source§impl PartialEq for CredentialBrokerConfig
impl PartialEq for CredentialBrokerConfig
Source§fn eq(&self, other: &CredentialBrokerConfig) -> bool
fn eq(&self, other: &CredentialBrokerConfig) -> bool
self and other values to be equal, and is used by ==.