A worker extends the credential its store issued rather than asking for a fresh one — what changes and what does not?
answer
- two verbs, not one
- one field moves, or every holder does
- same value against a different value
- extension has a ceiling above it
- old credential lives until withdrawn
basics
~20 sRenewal moves one field: the expiry. The value, the downstream account behind it and every connection using it stay as they are. Re-issuance mints a different credential, so every holder must be handed the new value and the old one withdrawn.
solid answer
~40 sRenewal extends the **same** credential. The consumer's value is unchanged, the downstream account and its open connections are untouched, and nothing is redistributed — one authenticated call moves `expiresAt` later. If what comes back is a different value, that was not a renewal; that was **re-issuance**, which mints a new credential, normally on a new downstream account, and puts real work on you: find every holder, hand each the new value, reconnect, then withdraw the old credential separately, because a new credential existing does not make the downstream system stop accepting the old one. Renewal is bounded — no amount of it passes the credential's maximum life — and past that ceiling re-issuance is the only path forward.
code
pseudocode · 12 lineslease = store.issue(consumerRole) // value, expiresAt, maxLifeEndsAt, handle
on renewalTimer:
if now + requestedExtension > lease.maxLifeEndsAt:
// the ceiling: nothing extends past it, so mint instead
newLease = store.issue(consumerRole) // a DIFFERENT value
reconnectDownstream(newLease.value)
withdraw(lease) // old one is still live until this runs
lease = newLease
else:
lease.expiresAt = store.renew(lease.handle, requestedExtension)
// value unchanged: no reconnect, no redistributiongo deeper
Learn the two words apart: renewing pushes the same credential's expiry later; re-issuing produces a different credential. Almost every later mistake in this area starts with treating them as synonyms.
Be able to say what each one costs. Renewal is one authenticated call and nothing else moves; re-issuance means finding every holder, handing over a new value, reconnecting, and withdrawing the old credential as a separate act.
Show that you know renewal does not reduce exposure and does not re-check authority, and that a new credential existing does not stop the old one working. Name withdrawal as its own step with its own evidence.
The judgment is where an estate should sit on the renew-to-re-issue ratio: frequent renewal is cheap and buys nothing but continuity, while forced re-issuance is the only thing that proves consumers can actually adopt a new value. Make the expensive path routine while it is still cheap to fail.
A store that **mints** credentials rather than merely holding them hands a consumer two things: the credential itself, and a **lease** — the store's record of when that credential stops working, how far its life may be pushed out, and who is entitled to push it. **Renewal** and **re-issuance** are the two ways that record changes, and confusing them is the most expensive small mistake in this material. ## The two objects on the table A **credential** is the value a downstream system accepts: an account and password on a queue, a key on a downstream service. A **lease** is what the store knows about that credential — `issuedAt`, `expiresAt`, `maxLifeEndsAt`, the holder, and a `handle` the holder uses to talk about the lease without quoting the secret. One distinction to keep straight from the start: a lease bounds a credential the store issued **outward**, to a downstream system, on a consumer's behalf. That is not the same object as the caller's own bounded session **against the store**, which governs whether the caller may ask the store for anything at all. Two clocks, two failure stories, two subjects. ## Renewal: the same credential, a later expiry Renewal asks the store to extend the lease it already granted. What that means concretely: - The value the consumer holds is unchanged, so nothing has to be redistributed to anyone. - The downstream account is unchanged — its grants, its open connections and its in-flight work carry on undisturbed. - No process restarts, no configuration is rendered again, no pool is drained. - The call is authenticated, and normally made against the handle the store issued rather than by presenting the secret value, so a third party that merely copied the value cannot extend its life. - A renewal doubles as a liveness signal. From the store's side, a lease that stops being renewed is evidence its holder has gone. ## Re-issuance: a different credential Re-issuance runs the issue path again and produces a **new** credential: - A different value, normally on a different downstream account with its own grants. - Every holder must be handed the new value — which presumes you know who the holders are. - The old credential does not stop working because a new one exists. It stops when it expires or when it is withdrawn, and removing the store's own record of it is not the same act as making the downstream system refuse it. - For a window, two credentials are live. During a planned change that is the point; left open it is two live credentials where you meant to have one. - The consumer's work is fetch, reconnect, verify — not a single call. ## Side by side | | Renewal | Re-issuance | |---|---|---| | Value the consumer holds | unchanged | new | | Downstream account | the same one | normally a new one | | Holders to update | none | all of them | | Old credential afterwards | it *is* the credential | still live until withdrawn | | Consumer work | one call, keep running | fetch, reconnect, verify | | What bounds it | the maximum life | whatever policy allows issuance | ## Where the distinction actually bites Take a fleet of message consumers, each issued a downstream queue credential with a 24-hour expiry and renewing every six hours. A team describes this as "we rotate the queue credentials four times a day". They do not. The same value has been live since the process started; four renewals a day changed one timestamp. If that value leaked on the first day, renewing it on the second extended the attacker's access rather than ending it. Ending it takes a different credential plus withdrawal of the old one. The inverse mistake costs an outage instead of an exposure. A team that believes renewal hands back a new value wires a reconnect into its renewal path, so every consumer drops its downstream connections on a timer, on schedule, for nothing. Store designs genuinely differ in how much of this they automate — some mint a downstream account per consumer and track every lease they granted, others only hold values you gave them and have no lease to renew at all. The vocabulary survives the difference; the mechanism to reason about does not change. ## What renewal does not do 1. It does not pass the **maximum life**. That ceiling is measured from first issue, and when it is reached the store refuses further extension whatever the holder does. 2. It does not repair an exposure, because it does not change the value. 3. It does not re-check authority. The downstream grants may have been changed since issue; renewal extends validity, not permission. 4. It does not revive a credential whose window already closed. Designs differ on whether any grace exists; build as though there is none.
- If a renewal call returns a different value than the consumer was holding, what actually happened?It was not a renewal. Whatever the call was named, the store issued a new credential, and the consumer is now in the re-issuance path: it must reconnect downstream with the new value, and the credential it was holding remains valid until it expires or is explicitly withdrawn. Treat the returned value as a signal to run the full adoption path, not as a timestamp update.
- Who is entitled to renew a lease, and why does that matter for a leaked value?The identity the lease was issued to, authenticating to the store and normally naming the lease by the handle it was given rather than by quoting the secret. That is why someone who copied only the downstream value cannot extend its life: they can use it until it expires, but they cannot keep it alive. The expiry therefore still bounds a leak, which is the whole reason leases are stamped in the first place.
- Your consumer renews on schedule and the downstream system starts refusing it anyway. What is worth checking first?Whether the grants on the downstream account changed. Renewal extends validity, not authority: the store will happily keep extending a lease whose account has since lost the permission it needs. The symptom is an authorisation refusal downstream while the store still reports the lease as valid, which is a different fault from an expired credential.
saying these in an interview costs you the question
- Renewal and re-issuance are two words for the same operation.
- After a renewal the consumer must re-read the value and reconnect.
- A credential that renews on schedule never needs replacing.
- Renewing a leaked credential limits the damage, because its life restarts.
- A holder can keep renewing indefinitely as long as it keeps calling.
- Once the new credential exists, the old one stops being accepted.