A secret store hands a caller a bounded session at authentication — what is fixed at that moment, and what is not?
answer
- a snapshot, not a subscription
- identity settled once, then presented
- rights resolved at issue
- values still read live
- rule edits may not reach live sessions
basics
~20 sAuthentication settles identity and attaches a rights snapshot plus a validity window to the session; it does not settle the secret values, which are read fresh per call. Whether a later rule change reaches a live session differs by design.
solid answer
~50 sAuthenticating buys a **bounded session**, not standing access. At issue the store decides which identity the proof belongs to, resolves the rights attached to that identity, and binds both to a handle with a validity window. Everything after that is the caller presenting the handle — the proof is not re-examined. What is *not* fixed is the data: a read is live, so a value written a minute ago comes back, because the session is a right to ask rather than a copy of the answers. The contentious part is the rights themselves. Some stores resolve them once and freeze them into the session; others consult the rule on every request. That difference decides whether narrowing a rule cuts off a caller that is already running, so it is worth knowing which one you operate — and testing it rather than assuming.
code
json · 16 lines{
"session": {
"subject": "message-consumer-07",
"issuedAt": "2026-09-01T02:14:00Z",
"expiresAt": "2026-10-01T02:14:00Z",
"rightsResolvedAt": "2026-09-01T02:14:00Z",
"rights": [
{ "nameBranch": "payments/consumer/", "may": ["read"] }
],
"endableByReference": true
},
"notCarriedBySession": [
"the values stored under that name branch",
"any rule edit made after rightsResolvedAt"
]
}go deeper
Remember that logging in to a secret store gives you a time-limited handle, not permanent access, and that the handle lets you ask for values rather than containing them.
Explain the two halves: identity and rights are resolved once at issue, while data is read live on every call. Then say that stores differ on whether a later rule edit reaches a session already issued.
Show that you have tested which behaviour your store has, and that your containment plan matches it. If rights are frozen, narrowing a rule is not a containment action for live callers and you must end the session instead.
Decide what the estate standardises on. Re-reading rules per request puts the rule store on every hot path; freezing at issue buys predictability and a clean audit answer but makes session lifetime the only lever you have on stale authority.
## What authentication actually hands back A secret store rarely re-checks a caller's proof of identity on every request. Authentication is an exchange: the caller presents whatever proof the store accepts, the store decides **which identity** that proof belongs to, resolves **which rights** that identity has, and hands back a handle the caller presents on every later call. That handle is a **bounded session**. *Bounded* means two things at once — it stops working at some point, and it carries a fixed set of rights rather than open-ended membership. One distinction has to come first, because the two objects are swapped constantly. A **session** bounds *the caller's own access to the store*. A **lease** bounds *a credential the store issued, on that caller's behalf, to some downstream system* — a generated database account, for instance. They expire differently, they are ended differently, and only the first is the subject here. ## What is settled at the moment of issue - **The identity.** The proof is evaluated once. Later calls are accepted because they carry the session, not because the proof is re-examined. A proof that would be rejected today does not retroactively invalidate a session issued while it was good. - **The rights resolved for that identity.** The store reads the rules attached to the identity and turns them into this session's authority — which branches of the name space it may read, write or list. - **That a validity window exists, and when it started.** How long that window runs, how it is extended, and the ceiling past which nothing extends are a neighbouring subject. What belongs here is that the window is attached at issue and is not open-ended. - **Whether there is anything to end.** Some stores record the session and hand back a reference an operator can use to end it; others hand back a self-contained proof they verify without consulting any record. That is decided at issue too, and it decides containment later. ## What is not settled - **The values behind the rights.** A read is live. Whatever the store holds at the moment of the call is what comes back. A session is permission to ask, not a snapshot of answers. - **Which of those rights the caller will use.** Nothing is declared in advance; the access trail is written as calls happen, not predicted at issue. - **The downstream credentials the caller may go on to request.** Those are separate objects with their own expiry stories. ## The consumer that authenticated three weeks ago A message consumer authenticated once at deploy time and has been running on the same session ever since. Today someone narrows the rule behind its identity — the branch of names it may read shrinks. Ten minutes later, the consumer is still reading the value it always read. That is not automatically a bug, and it is the most common surprise in this material. Two designs are both in the field: | Question | Rights resolved at issue | Rule consulted per request | |---|---|---| | When does a narrowed rule bite? | at the next session, not this one | at the next request | | What is on the request path? | the session record only | the rule store as well | | What can you tell an incident commander? | exactly what this session can reach, from the session itself | what the rule allows right now | | How do you cut a live caller off? | end the session | edit the rule, or end the session | Neither behaviour is universally true of secret stores, so the answer an interviewer is listening for is not a verdict. It is *"it depends on whether this store froze the rights or re-reads them, and here is how I would find out."* ## Finding out 1. Issue a session for a test identity and confirm it can read a chosen name. 2. Narrow the rule so that name is no longer covered. 3. Read again on the **same** session. Success means the rights were frozen at issue; refusal means the rule is consulted per request. 4. Authenticate afresh and read again, to confirm the narrowed rule is genuinely in force for new sessions. ## Why it matters past curiosity Narrowing a rule is often someone's first containment move. If the store froze the rights, that move does nothing at all to sessions already issued, and the action you actually needed was to end the session. It is also worth keeping the three verbs apart: **rotation** puts a new value in place, **revocation** makes an existing credential stop working, and **narrowing a rule** changes what future resolutions allow. Only one of them reaches a caller that is already holding resolved rights, and on some designs none of them does until the window runs out. One practical habit follows: record the resolved rights *in* the session record. Then an external audit that asks what a given session could have reached is answered from one row, rather than by replaying the history of every rule edit since it was issued.
- How would you establish which of the two behaviours your own store has, without reading its documentation?Empirically. Issue a session for a throwaway identity, confirm it can read a chosen name, then narrow the rule so that name is excluded. Read again on the same session: success means rights were frozen at issue, refusal means the rule is consulted per request. Re-authenticate and read once more to confirm the narrowed rule really is in force for new sessions.
- Why record the resolved rights inside the session record rather than only the identity?So that one row answers "what could this session reach?" When only the identity is stored, answering that question means reconstructing which rules were attached to that identity at the moment of issue, and every edit since has to be replayed. Under incident pressure, or when an external audit asks after the fact, the reconstruction is exactly what nobody has time to do correctly.
saying these in an interview costs you the question
- Assumes every store re-reads the caller's rights on each request
- Says narrowing a rule instantly cuts off callers already holding a session
- Believes the session carries a copy of the values it may read
- Confuses the caller's session with a lease on a credential issued downstream
- Treats a still-working consumer as proof the rule edit failed to save