pub struct SecretEntry {
pub env_var: String,
pub value: Zeroizing<String>,
pub source: Option<SecretSource>,
pub placeholder: String,
pub allowed_hosts: Vec<HostPattern>,
pub injection: SecretInjection,
pub on_violation: Option<ViolationAction>,
pub require_tls_identity: bool,
}Expand description
A single secret entry.
value is the sensitive material — it never enters the sandbox and is
redacted by the Debug impl.
Fields§
§env_var: StringEnvironment variable name exposed to the sandbox (holds the placeholder).
Must be non-empty and must not contain = or NUL. microsandbox does
not require shell-identifier syntax because Linux environment entries
only require a NAME=value shape.
value: Zeroizing<String>The actual secret value (never enters the sandbox).
Empty when the entry carries a source reference
instead: reference-model entries resolve the value host-side at spawn
time so the durable sandbox config never stores raw secret material.
Wrapped in Zeroizing so the owned plaintext copy is wiped when the
entry drops.
source: Option<SecretSource>Host-side source reference resolved into value at
spawn time. None means value already carries the material (the
inline model used by value-based secrets).
placeholder: StringPlaceholder string the sandbox sees instead of the real value.
Must be non-empty, no longer than MAX_SECRET_PLACEHOLDER_BYTES, and
must not contain NUL, CR, or LF.
allowed_hosts: Vec<HostPattern>Hosts allowed to receive this secret.
injection: SecretInjectionWhere the secret can be injected.
on_violation: Option<ViolationAction>Action on a violation for this secret (overrides the config default).
require_tls_identity: boolRequire verified TLS identity before substituting (default: true).
When true, the secret is only substituted if the connection uses TLS interception (not bypass) and the SNI matches an allowed host.
Implementations§
Source§impl SecretEntry
impl SecretEntry
Trait Implementations§
Source§impl Clone for SecretEntry
impl Clone for SecretEntry
Source§fn clone(&self) -> SecretEntry
fn clone(&self) -> SecretEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more