pub struct SecretEntry {
pub env_var: String,
pub value: Zeroizing<String>,
pub source: Option<SecretSource>,
pub placeholder: String,
pub allowed_hosts: Vec<HostPattern>,
pub substitution: SecretSubstitution,
pub passthrough_hosts: Vec<HostPattern>,
pub violation_action: Option<SecretViolationAction>,
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 the substituted secret value.
substitution: SecretSubstitutionRequest locations where the placeholder can be substituted.
passthrough_hosts: Vec<HostPattern>Hosts allowed to receive the placeholder unchanged.
violation_action: Option<SecretViolationAction>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.