When scaling secrets management, cache active leases in mlock() Edge Agents and keep Vault fail-closed on audit loss.
TL;DR30-second simplified summary▾
Delivers <10 ms reads, 1M+ dynamic leases, and zero plaintext disk exposure.
SPIFFE Auth, Edge mlock() Agent & Fail-Closed Audit.
Why this matters: Eliminate secret zero, survive Vault outages safely, and enforce zero unlogged reads.
Workloads authenticate via SPIFFE SVIDs to a local Edge Agent that caches leases in mlock() RAM (never swap/disk). Vault core rejects reads if all audit sinks fail (fail-closed).
| Choice | What it buys | What it costs |
|---|---|---|
| Fail-Open Audit | Higher availability during SIEM outage | Unlogged secret reads violate zero-trust compliance |
| Fail-Closed Dual-Sink Audit + Edge mlock() Cache | Zero unlogged Vault reads; Edge Agents serve active leases during outage | Requires dual audit sinks + mlock() agent deployment |
import hmac, hashlib
def mask_audit_token(hmac_key: bytes, secret_value: str) -> str:
return "hmac-sha256:" + hmac.new(hmac_key, secret_value.encode(), hashlib.sha256).hexdigest()
1M+ Dynamic Leases & 10ms Read Trace.
Why this matters: Scale ephemeral credential issuance and revocation without leaking orphaned DB roles.
1M active 1h leases = 278 creations/s and 278 revocations/s, managed by a sharded timing wheel. Dual-slot active/previous keys prevent rotation drops.
- Problem
- How to enforce strict zero-trust auditability (no unlogged secret reads) without taking down 50,000 RPS of production workloads if the central SIEM stalls.
- Naive Solution
- Configure Vault to fail-open on audit errors, or write secret caches to local plaintext files on every pod.
- Why It Fails
- Fail-open audit allows unlogged credential exfiltration during a SIEM attack; plaintext disk caches leak secrets in container snapshots and core dumps.
- Alternatives
- Fail-open logging, plaintext disk caching, or fail-closed dual-sink Vault auditing paired with swap-locked RAM (mlock) Edge Agents.
- Engineering Decision
- Keep Vault strictly fail-closed across two independent audit sinks (local disk + SIEM) while Edge Agents cache active leases in mlock() RAM until TTL expiry.
- Trade-Offs
- New lease issuance halts if both audit sinks fail simultaneously, but existing workloads continue running safely on their cached RAM leases.
Both the primary SIEM and secondary audit disk sink on a Vault leader fail simultaneously. What should Vault do?
public boolean issueSecret(boolean auditCommitted) {
if (!auditCommitted) {
throw new SecurityException("Fail-closed: all audit sinks failed");
}
return true;
}
Practice: Make the trade-off yourself.
Why do Edge Secret Agents call mlock() on their lease cache memory?