skip to content

The Secret Store

The system that holds credentials as a running service rather than a file: its own ciphertext, the key that unlocks it at start-up, its replicas, its backups. Asked because the estate waits on it.

on this pageshow

questions

25

What does a secret store give that one encrypted credentials file cannot, when the file's key is held outside the repository?

level: juniorimportance: must knowfreq 70%

answer

  1. The file is already encrypted
  2. Granularity, record, withdrawal, generation
  3. One key opens every entry
  4. Offline decryption is unobserved
  5. A store can mint per consumer

basics

~20 s

Four things the file structurally cannot: rights granted per name instead of one key that opens everything, a record of each read, withdrawal of one holder without re-keying the rest, and values minted per consumer on request.

solid answer

~50 s

Encrypting the file answers confidentiality at rest, and nothing after it. The file has one unit of access — its key — so any holder reads every entry, and there is no way to give a service the two values it needs and nothing else. Decryption happens on the reader's own machine, so the file can only ever tell you who *could* have opened it, never who read what. When one holder leaves there is no per-holder grant to withdraw: you replace every value the file held, re-encrypt it and redeploy every consumer. And a file holds only what a person typed into it, where a store can be given authority on a downstream system and mint a distinct credential per consumer at request time. The cost is that the store becomes a service you have to keep running.

go deeper

for a junior

Recall that encrypting the file only protects it at rest. Be able to name at least two things it still cannot do: give one service only the values it needs, and tell you who read what.

for a middle

Explain why the granularity limit follows from there being one key: decryption is all-or-nothing, so grants cannot be expressed per value, and neither can a per-holder withdrawal.

for a senior

Show the operational consequence. Say what a departure actually costs under each model, and note that the file's cost is identical for a routine leaver and an emergency, which is why it gets skipped.

for a principal

Frame it as a trade, not an upgrade. The store buys granularity, a read record and local withdrawal, and charges an availability dependency the whole estate starts against.

## What the encrypted file already gets right A credentials file committed to a repository and encrypted, with the key that opens it held somewhere else, genuinely provides one property: **confidentiality at rest**. Anyone who gets a copy of the repository — a clone, an old backup, a laptop that left the building — gets ciphertext. That is not nothing, and it is why the reflex answer ("never commit a credential in plaintext") is not the answer to this question. The interesting part starts once that property is granted. A **secret store** is a running service that holds values and answers requests for them, and the case for paying that operational cost rests on four things the file cannot do however well it is encrypted. ## One key against rights over a branch of names The file has exactly one unit of access: the key that decrypts it. Whoever holds that key reads **every entry**, because decryption is all-or-nothing over the whole file. There is no way to express "this service may read the two values it needs and nothing else", and no way to express "this person may write this entry but never read that one". A store expresses access as a rule over **a branch of the name space**: an identity is granted read on one branch, and the store refuses everything else. The reach of one compromised consumer becomes the set of names it was granted rather than the entire inventory. That is the difference between a blast radius of one file and a blast radius of one grant. ## A read you can see against a read you cannot Decryption of a file happens **on the reader's own machine**, with no participation from anything you operate. Nothing observes it. Afterwards you can reconstruct who held the key and when they last pulled a copy, which is a statement about *opportunity*, not about *use*. When a store serves the value, every successful read is an event the store recorded — which identity, which name, at what time. That record is what turns "assume all forty entries are exposed" into "these three names were fetched". It bounds the scope of the clean-up; it does not prove what the reader did with the value once they had it. ## Withdrawing one holder against re-keying everyone There is no per-holder object in a file, so there is nothing to withdraw. Removing one holder means: replace every value the file held, re-encrypt the file under a new key, distribute that new key to everything that decrypts at deploy time, and redeploy every consumer. The cost scales with entries multiplied by consumers, and it is the same cost for a routine departure as for an emergency — which is precisely why, in practice, it is skipped, and why the departed holder's copy stays good. In a store you revoke that one identity's grant. Every other holder is untouched, and the rotation list narrows to the names that identity could reach. ## Values you hold against values made on request A file contains only what somebody typed into it. That value is long-lived by construction, shared by everyone who reads the file, and identical everywhere it is used, so no use of it is attributable and withdrawing it affects everyone at once. A store that has been given authority on a downstream system can instead **create a credential per consumer at request time**: each consumer gets its own account with its own rights, and no shared password exists for anyone to copy. Store designs genuinely differ here — some mint downstream credentials, others only hold what you gave them — so this is a capability to check for, not one to assume. ## The four gaps side by side | Question | One encrypted file | A secret store | |---|---|---| | Who may read one value? | Anyone holding the file's key reads all of them | A rule grants one identity read over one branch of names | | Who did read it? | Unknowable — decryption is offline | Each read is an event the store recorded | | One holder leaves | Replace every value, re-key the file, redeploy everyone | Withdraw that identity's grant | | Where the value comes from | Only what a person typed in | Can be minted per consumer on request | ## What moving to a store does not give you - It does not write your access rules. A store with one wildcard grant reproduces the file exactly, with better logging: **proving who is calling and deciding what they may read are separate steps**, and the second is still yours. - It does not make the values that were in the file safe. They stay live until each one is replaced; moving a value is not the same as replacing it. - It does not recall copies already delivered to consumers, or the copies those consumers wrote to disk. - It adds a service the whole estate starts against, with its own availability, its own start-up key and its own backups to rehearse. A workable order for the move: 1. Stand the store up and grant each consumer read over only the names it needs. 2. Move each value **and replace it as you move it**, because every value the file held must be treated as known to every key holder. 3. Delete the file and confirm no consumer still reads it before calling the migration done.

  • The file is decrypted at deploy time and the value handed to the process — is that not the same result as a store serving it?
    The value in the process is identical; everything around it differs. Access is still file-wide, so the deploy step holds every credential, not the two a service needs. No read is recorded anywhere. And withdrawing one holder still means replacing every value and re-keying the file, because the grant being withdrawn does not exist.
  • Which of the four gaps does a store fail to close by itself?
    Granularity. Authentication and authorization are separate steps: a store can prove exactly who is calling and still allow that caller everything, and a single wildcard grant reproduces the file's reach precisely. The record, the per-holder withdrawal and per-consumer generation come with the store; narrow rules have to be written and kept narrow.

saying these in an interview costs you the question

  • Says encryption at rest settles it, so a store adds nothing
  • Claims the file can show who read which credential
  • Thinks a departing holder is handled by editing the file
  • Treats a store as only a place to put a typed-in password
  • Assumes a store decides who may read what on your behalf
  • Believes moving a value to a store also replaces it
open as a page

A secret store encrypts its files and backups on disk - which attacks does that remove, and which does it leave untouched?

level: middleimportance: must knowfreq 62%

basics

~20 s

Encrypting a store's files removes the value of any offline copy: a stolen disk, a decommissioned volume, a copied backup. It changes nothing for anyone the store answers - an allowed caller, or an operator reading the serving process.

open as a page

A restarted secret store is running but refuses every read until the key protecting its contents is supplied — where can that key come from?

level: middleimportance: must knowfreq 60%

basics

~20 s

The protecting key must arrive from outside the store's own records: recombined from a threshold of shares held separately, unwrapped by a device or a separate key service the store authenticates to, or held by a managed provider that applies it for you.

open as a page

After a stored database password is replaced, what makes the previous value still fetchable to the same callers?

level: middleimportance: must knowfreq 62%

basics

~20 s

Most stores append a version rather than overwriting the old one, so the earlier value stays in the name's history and any caller with read rights on that name can ask for it by version. Replacing is not retiring.

open as a page

A departing contractor held the key to one encrypted credentials file — what must you do that a store would not?

level: middleimportance: must knowfreq 58%

basics

~20 s

Re-key and replace everything. One file-wide key means the departure exposes every entry, so each value is replaced, the file re-encrypted under a new key and every consumer redeployed. A store withdraws that one identity's grant instead.

open as a page

Consumers report that the secret store is down — how do you tell a slow store from a read-only one and from one that cannot decrypt its own contents?

level: seniorimportance: must knowfreq 58%

basics

~20 s

Three failures share one complaint. Slow means requests still complete, past the caller's timeout. Read-only means reads answer instantly while writes and issuance are rejected instantly. Unable to decrypt means every request fails alike, from the moment the process started.

open as a page

The secret store is rebuilt from last night's backup — what worked before the loss that the restored store does not bring back?

level: seniorimportance: must knowfreq 58%

basics

~20 s

A restore rewinds the store and nothing else. Values, grants and registrations written after the restore point are gone, as is the read trail for that window — and credentials the store issued into other systems stay live there, unrecorded.

open as a page

During a network partition, why does a secret store's follower keep answering reads of a stored value while requests to generate a new credential fail?

level: middleimportance: should knowfreq 42%

basics

~20 s

Reading a stored value is served from the copy the follower already holds; generating a credential is a write — the store must record the new credential and its expiry before returning it, and a follower has no write path.

open as a page

Your nightly backup of the secret store is ciphertext — what else must recovery have in hand, and why is it deliberately not in the backup?

level: middleimportance: should knowfreq 44%

basics

~20 s

A store's backup holds its own ciphertext, so recovery also needs the key that protects the store, kept in separate custody. Keeping both in one place makes the backup self-opening: a single stolen copy is then a full compromise.

open as a page

What can a store do with a downstream database account that a file holding the same password structurally cannot?

level: middleimportance: should knowfreq 40%

basics

~20 s

Make the credential instead of holding it. Given authority on the downstream system, a store can create a distinct account per consumer at request time, so each has its own identity, its own rights and a withdrawal that touches nobody else.

open as a page

Why does a secret store partition that steady-state services barely notice break a service scaling out and a fleet on a rolling restart?

level: seniorimportance: should knowfreq 45%

basics

~20 s

The store is a start-up dependency, not a per-request one. Already-running processes hold what they fetched and never call it, so a degraded store is invisible until something new starts — and scaling out and rolling restarts are the two activities that manufacture new start-ups.

open as a page

A restored secret store hands out a credential the downstream system now rejects — what does that tell you about the restore point, and what is the fix?

level: seniorimportance: should knowfreq 37%

basics

~20 s

The credential was rotated after the restore point, and the restore rewound only the store's copy while the downstream system kept the new value. Repair forward: set a fresh value downstream, write it into the store, never reinstate the old one.

open as a page

A decommissioned volume from a secret store node and a months-old store backup turn up on a workstation - is either a disclosure?

level: seniorimportance: should knowfreq 48%

basics

~20 s

You cannot tell from the artefacts. It turns on custody: whether the material that opens each copy ever sat with it, whether it still exists and is reachable, and which values inside have been replaced since.

open as a page

Beyond its own files, where else does a running secret store's plaintext exist, and what does at-rest encryption cover?

level: seniorimportance: should knowfreq 42%

basics

~20 s

At-rest encryption covers exactly the store's dataset files and the backups written from them. Plaintext also lives in the serving process's memory, in what the system pages out, in a crash dump, and in the response leaving the store.

open as a page

Your store only serves after a quorum of holders each supply a share — what do you give up if you automate that step instead?

level: seniorimportance: should knowfreq 50%

basics

~20 s

Automating the step buys an unattended restart and gives up the property the quorum existed for: that no single holder, and nothing present on the host alone, can open the store. Protection then rests on whatever guards the automated path.

open as a page

After a cold restart, a store cannot unwrap its protecting key because the credential for that call is itself stored inside it — how do you break the loop?

level: seniorimportance: should knowfreq 42%

basics

~20 s

The input that opens a store must be obtainable while the store is closed. Move the unwrap credential to something the node holds independently — an identity its platform signs for the machine, or material its hardware holds — and rehearse a genuinely cold start.

open as a page

A review asks whether a retired credential's earlier values are truly gone — what does deleting the entry leave behind?

level: seniorimportance: should knowfreq 38%

basics

~20 s

Deletion is reversible in many stores: the entry stops answering reads while the value is still held and can be brought back during a recovery window. Destruction is the separate, irreversible step, and even that covers only the live store.

open as a page

A staging connection value was written over the production entry in the store — how do you put the correct value back without a backup restore?

level: seniorimportance: should knowfreq 45%

basics

~20 s

Read the entry's previous version and write that value back — the undo is a new version, not an erase. It works only where history is kept and still enabled, and the pasted staging value stays in the history until it is retired.

open as a page

After a holder of the file's key leaves, what can you establish about which credentials they actually read?

level: seniorimportance: should knowfreq 44%

basics

~20 s

With an encrypted file, nothing about reads — decryption is offline and unobserved, so the honest scope is every entry it held. A store serves the value itself, so each read is an event that narrows the scope to names actually fetched.

open as a page

Every service now starts against one secret store — how do you decide how much of the estate's availability to stake on it?

level: principalimportance: nice to knowfreq 28%

basics

~20 s

Two levers exist: make the store more available, or make the estate need it less. Decide which operations must survive a partition — plain reads — and which may fail, then publish that as the contract every consumer designs against.

open as a page

Your secret store's recovery procedure is written down but has never been run — what do you commit to as its owner, and what counts as a pass?

level: principalimportance: nice to knowfreq 26%

basics

~20 s

A written recovery procedure is an untested assumption; a rehearsal turns it into evidence. Commit to a cadence, a named owner and an isolated environment, and define a pass as a restored store serving a known value within the promised time.

open as a page

Your archive keeps secret store backups for years - how long should the material that opens them live, and what does each answer cost?

level: principalimportance: nice to knowfreq 28%

basics

~20 s

Keeping the opening material as long as the ciphertext keeps every old backup recoverable, and a disclosure waiting on that material. Retiring it sooner makes the archive noise, cheaply and irreversibly, and trades recoverability for custody.

open as a page

Choosing a store whose provider holds the protecting key means it never shows a locked state — what have you actually decided?

level: principalimportance: nice to knowfreq 28%

basics

~20 s

Handing the protecting key to a provider decides who must be present for the estate to start. It buys unattended recovery with no custody to run, and costs the ability to withhold consent or to show that only you can open the contents.

open as a page

Across an estate, how long should a store keep earlier versions of a secret before destroying them?

level: principalimportance: nice to knowfreq 24%

basics

~20 s

Long enough to undo a mistaken write and no longer: days rather than quarters, with destruction on a schedule rather than on memory, and a tighter setting for names whose single value reaches a large part of the estate.

open as a page

Twelve services outgrew one encrypted credentials file — what decides whether you operate a secret store yourself or take a hosted one?

level: principalimportance: nice to knowfreq 28%

basics

~20 s

Which operations you will actually perform, not which feature list is longer. Running one yourself means owning start-up, replicas, backups and a rehearsed restore for a service the whole estate depends on; taking a hosted one trades that for a dependency on somebody else's availability and boundary.

open as a page