A long-running consumer asks the store to derive a child credential from its own bounded session — what can that child carry?
answer
- downward only
- a child cannot exceed its parent
- narrower slice, shorter window
- does the store record the link?
- a cut-loose child outlives revocation
basics
~20 sA derived credential carries at most the rights of the session it came from, usually a deliberately narrower slice and a shorter window. Whether ending the parent also ends the child depends on whether the store recorded the link between them.
solid answer
~50 sDerivation moves in one direction only: **downward**. A child credential can hold a subset of the parent session's rights and no more, because the parent is the authority being spent — a caller cannot mint its way back up to what its identity would have been granted had it asked directly. In practice you deliberately take less than you could: one branch of names instead of several, read instead of read and write, minutes instead of the parent's remaining window. The part that varies by design, and the part that decides incident behaviour, is whether the store records the parent-child link. Where it does, ending the parent walks the tree and ends the children. Where the child is cut loose at creation, it outlives the parent entirely and you must find and end it on its own.
go deeper
Know that a credential handed to a helper process should be narrower than the one you hold yourself, and that handing over your own session gives away everything you can do.
Explain the subset rule: a derived credential is bounded by the session it came from, not by the identity behind that session, and you normally take less again on names, verbs and time.
Show that you know whether your store ties children to their parent, because that decides whether ending the parent is containment or theatre. Have tested it, and have an inventory for the case where it does not.
Set the rule for the estate: who may derive, how narrow and how short by default, and what is recorded. The trade-off is worker independence against being able to cut an entire branch off with one action.
## Derivation, and the one thing it cannot do A caller that already holds a bounded session can often ask the store for a second, narrower credential to hand to something else — a worker it is about to start, a one-off task, a sidecar job. The new credential is **derived**: the parent session is the authority being spent to create it. The invariant is that derivation cannot amplify. The child holds a **subset** of the parent's rights, never a superset, and never something the parent does not hold at all. This matters most in the case where the two might differ: if the parent session's rights were narrowed relative to what its identity could get — because it asked for less, or because the rule was tightened before it authenticated — the child is bounded by the *session*, not by the identity behind it. A caller cannot derive its way back up to the identity's full grant. ## What a well-shaped child carries You normally take *less* than the ceiling allows, on three axes: - **Names.** One branch of the name space, matching what the receiving worker actually reads. - **Verbs.** Read where the parent holds read and write. Withholding *list* matters on its own, because the right to list a branch discloses what exists there even when every read is refused. - **Time.** A window sized to the work, not to whatever the parent has left. A child that lives for the batch is a credential you do not have to chase afterwards. The gain is containment arithmetic: if the child leaks, the blast radius is the slice you handed over, and the exposure ends when its window does. ## Whether the parent's end reaches the child This is the part that genuinely differs between designs, and the part candidates state as universal in both directions. | If the store… | Ending the parent… | Containment means… | |---|---|---| | records the parent-child link | walks it and ends the children too | one action against the parent | | cuts the child loose at creation | leaves every child alive to its own window | finding and ending each child, or waiting out its window | A cut-loose child is not a defect by itself — it exists precisely so a worker does not die when the process that started it goes away. It becomes a defect when nobody wrote down that it works that way, because then the incident plan says "end the parent session" and quietly achieves nothing for the credentials that are actually being used. ## The consequence in an incident Work the message-consumer case. The consumer authenticated at deploy time, three weeks ago, and has since derived a short-lived child for each batch it runs. You now believe the host is compromised. Ending the parent session is one call and it feels decisive. Whether it *is* decisive depends entirely on the link: 1. If children are tied to the parent, the derived credentials stop with it, and the residual exposure is whatever was in flight. 2. If children are cut loose, the attacker keeps every child already minted, for as long as each one's window runs, and you are now enumerating credentials you never inventoried. Either way, ending the parent does stop *new* children being derived — which is why it stays the first move, not the only one. ## Practical rules - **Know the link behaviour before you need it.** Derive a child, end the parent, try the child. The result takes one minute and settles the argument permanently. - **Size the child's window to the work**, so that the wait-it-out path is short even when the kill path does not exist. - **Keep a record of what was derived and for whom.** Where children are cut loose, the only thing standing between you and an unbounded search is that record. - **Do not use derivation to work around a narrow rule.** If a worker needs rights the parent does not have, the answer is its own identity and its own rule, not a child. ## The distinction people lose A derived credential is still the caller's *access to the store*. It is not a credential the store generated in a downstream system on the caller's behalf — that object has its own expiry story and is withdrawn by acting on the system that accepts it. Keeping the two apart is what lets you answer precisely when someone asks what the compromised host can still do.
- Why deliberately derive a narrower credential instead of handing over the parent session?Because the parent is the caller's whole authority and usually a long window, and anything you hand it to inherits both. A child sized to one branch of names, one verb and the length of the work makes a leak cost only that slice, and makes the exposure end on its own. It also keeps the access trail readable: reads arrive attributed to the task, not to a shared long-lived session.
- What breaks in an incident when derived credentials are cut loose from their parent?The containment step everyone reaches for stops working. Ending the parent prevents new derivations but leaves every existing child valid to its own window, so the caller you believe you cut off is still reading. You then need an inventory of what was derived, or you accept waiting out the longest child window and say so out loud.
saying these in an interview costs you the question
- Thinks a derived credential can hold rights its parent session lacked
- Assumes ending a parent session always ends everything derived from it
- Assumes a derived credential always survives its parent
- Treats derivation as a way to reach the identity's full grant
- Cannot say whether their store ties a derived credential to its parent