Deciding which risks can be accepted and which cannot ◦ Guarding against violations of norms • Risk increases with system complexity ◦ More points of failure, confusion, ingress and egress
risk if exposed to unauthorized entities • Undesired consequences are harm ◦ Unauthorized data access ◦ Identity spoofing ◦ Private data egress ◦ Regulatory fines
are identifiers ◦ Username (identifier) vs. Password (secret) ◦ TLS certificate (identifier) vs. TLS key (secret) ◦ GitHub user name (identifier) vs. API key (secret) • Identifiers aren’t completely risk-free ◦ Have chosen to ignore that risk
Storage Random Users General apps/services NSA Random Wi-Fi Hotspot Your Mother’s Notepad.txt Employees? CPU Cloud? RAM root Secret Management Tool CPU Cloud? Employees?
of trust Persistent Storage Random Users General apps/services NSA Random Wi-Fi Hotspot Your Mother’s Notepad.txt Employees? CPU Cloud? RAM root Secret Management Tool CPU Cloud? Employees?
a potential access point/interception point ◦ Accidental logging ◦ Exploitation by attacker ◦ Lookup by operator ◦ Employee Post-It™ ◦ Conspiracy of One/Compromised employee
◦ Managing secrets in a given environment means establishing trust chains in the environment • Links in the chains have associated risk ◦ Minimize hops and minimize risk-per-link
securely get a secret from producer to consumer ◦ Duh, right? • You have to take the roundabout approach ◦ Understanding trust and trust levels along the way is incredibly important ◦ Only after understanding trust can you figure out where and how to minimize risk
the requirements it must fulfill to keep secrets protected • Good news: we (often) only need to do this for one secret! ◦ First secret authenticates us to allow direct access to more
• First: establish success criteria based on your organization’s acceptable risk ◦ Any given organization needs a security policy and associated success criteria that meets their individual needs
to implement the accepted security policy • For secure introduction for this talk: ◦ Don’t let them live forever (rotate/expire) ◦ Distribute them securely ◦ Limit exposure if disclosed ◦ Have a break-glass procedure ◦ Detect unauthorized access
as short as possible • User passwords vs. machine secrets ◦ xkcd’s ______ ______ ______ ______ → bad policies + frequent rotation = written down user passwords ◦ Less frequently/more used = more likely overseen ◦ Machines: it’s just data - plan/build for rotation and rotate often
• Env vars are a common way to pass in container secrets. Also: ◦ Often logged, sometimes multiple places ◦ Easily discoverable by operator ▪ Both Docker commands and non-Docker commands can spill the beans
is knowing if an unintended party has intercepted it • Audit logs are great… ◦ ...but do you look at them? • Active detection (when possible) is even better
resources ◦ Perform forensics ◦ Rotate all secrets after re-establishing identities of legitimate secret-holders ◦ … • Figure this out during the planning process -- not after!
Vault and its capabilities • Vault has a focus on providing security primitives ◦ Enables creation of complex workflows ◦ We’ll see how this provides necessary flexibility
problem ◦ Core competency from ground up ◦ Necessary tools/capabilities/primitives • 100k containers can support existing SI paradigms ◦ But imagine… ▪ Managing 100k LDAP/AD users churning at high rate ▪ Generating/dropping 100k Kerberos keytabs ◦ ...and you’ve solved SI anyways
use-count ◦ Limited time-to-live (TTL), possibly renewable ◦ Set of authorization policies ▪ e.g. use first secret (auth token) to get application secrets ◦ Consistent ID in audit logs ◦ Token-scoped secure storage tied to token lifetime ▪ ‘cubbyhole’ • Claim: These primitives allow excellent secret coverage
let them live forever (rotate/expire) ✓ Outer token expires (use limit) with only copy of inner token value ◦ Distribute them securely ✓ Inner token covered the entire way ◦ Limit exposure if disclosed ✓ Only specific policies granted, can only access specific secrets ◦ Have a break-glass procedure ✓ Can lock down access at SM tool ✓ Audit logs ensure we know area of exposure ◦ Detect unauthorized access
token due to time and use limit • Application: ◦ Reads inner token: success ◦ Reads storage but no inner token found: log error and recover (e.g. fail job) ◦ Invalid token? Check current time vs. issue time + TTL: ▪ Expired? YELLOW FLAG: investigate, but probably just bad timing ▪ Not expired? RED FLAG: Unauthorized use
available for nearly any Vault call and known as response wrapping • Mechanism not container- or authentication-specific ◦ CM tool drops wrapped secret on EC2 instance ◦ File with wrapped value injected into chroot ◦ Etc.
set out to tackle this problem in a generic way • Any scheduler can implement what Nomad has (or another variation on this model) ◦ Primitives to do so are there in Vault