skip to content

Why does a renewing session survive a policy that demands MFA at every login?

level: middleimportance: must knowfreq 66%

answer

  1. the gate sits on the ceremony, not the request
  2. idle timers restart on activity
  3. renewal mints tokens, not ceremonies
  4. the real ceiling is the absolute lifetime

basics

~20 s

Because the policy gates logins, and a renewing session never produces another one. Idle timers restart on every request and refresh credentials mint fresh tokens with no ceremony, so the login that would demand the factor may never arrive.

solid answer

~40 s

Multi-factor enforcement is a condition on the authentication ceremony, and that ceremony runs only when a client has no usable session. Someone holding a live session is already past the gate, and everything that keeps sessions alive works in their favour: an idle timeout restarts on every request, so activity itself prevents the lapse; a refresh credential mints new access tokens on a schedule with no human involved; "stay signed in" carries the session across browser restarts. Unless the tenant sets an **absolute lifetime** - a ceiling measured from the original `auth_time` rather than from last use - there is no future moment at which authentication must happen again. The honest bound on the exposure is that ceiling, not "the next login".

code

text · 7 lines
text
sub        u-4417
auth_time  2026-01-01T09:12:04Z    <- the one authentication ceremony
amr        ["pwd", "mfa"]         <- what was presented at that ceremony
iat        2026-01-31T07:00:11Z    <- this token minted, no ceremony involved
exp        2026-01-31T08:00:11Z    <- this token's expiry, not the session's
sid        8f2c...
...

go deeper

for a junior

Know that signing in and staying signed in are different events, and that multi-factor rules apply to signing in. A session already in hand has passed that check and will not meet it again while it works.

for a middle

Explain the mechanics that keep a session alive - idle timers that restart on use, refresh credentials that mint tokens without a prompt, persistent sign-in - and name the absolute lifetime as the only hard ceiling.

for a senior

Answer 'how long is this exposure' with a number derived from tenant settings rather than a slogan, and say which single setting you would change to make that number finite.

for a principal

Own the argument that factor strength and session lifetime buy different things, and be able to explain to a product owner why the second is where an acquired session is actually priced.

## Where the gate actually sits "Multi-factor on every login" is a condition on the **authentication ceremony**. The ceremony runs when a client turns up without a usable session: a new device, a cleared browser, a lapsed session. The population subject to the policy is therefore *people signing in*. Someone who acquired a session that has already been issued is not in that population, and never enters it while the session keeps working. ## Three mechanics that stop the next login happening **Idle (inactivity) timeout.** Measured from last use. Every request restarts the clock, and "use" does not mean a person: scripted or scheduled activity keeps it alive just as well. A session in continuous use never becomes idle, so an idle timeout alone bounds nothing. **Renewal.** Short access-token lifetimes are routinely mistaken for short session lifetimes. When an access token expires, a refresh credential is exchanged for a new one. That exchange is machine-to-machine: no prompt, no factor, no human. It can repeat for as long as the provider is willing to honour the refresh credential. **Persistent sign-in.** The "stay signed in" or "remember this browser" choice deliberately makes the session survive browser restarts, which removes the most common accidental trigger for a fresh ceremony. None of the three re-runs the ceremony, so none of them re-presents a factor. ## The one setting that does force a ceremony An **absolute session lifetime**: a hard ceiling measured from the original authentication rather than from last use. When it is reached, the provider stops honouring renewal and a ceremony is required. It is the only one of the timers that cannot be pushed forward by using the session. Plenty of tenants leave it unset or set it in weeks, in which case there is no future moment at which the factor must be presented again. ## Reading it off the token An ID token minted by renewal is explicit about this if you read the right fields. `auth_time` still points at the original ceremony. `amr` still lists the methods used *then*, unchanged. `iat` and `exp` describe this token only. A token issued this morning can be a month of renewal away from any human. ## Why this changes what the access is worth Someone who acquires one live session and never goes further - no code running anywhere, no host owned - holds exactly one identity's worth of access, and prices it by how long it will still be honoured multiplied by what that identity reaches. Where no ceiling exists, the duration term is "until somebody ends it". That is precisely why live sessions are traded rather than passwords: no factor stands between the buyer and the tenant. It also means the acquirer's own restraint predicts nothing - the objective belongs to whoever ends up holding it. ## Where a factor can still be demanded Not by the login policy, but by an operation. OpenID Connect expresses it two ways: `prompt=login` forces the provider to authenticate the user again, and `max_age` sets the maximum acceptable age in seconds since `auth_time`, obliging re-authentication when the last ceremony is older than that. Both are demands attached to a request for an operation, which is a different control class from a rule about logins. ## The corrected claim The common senior answer is: *we mandate multi-factor on every login, so a stolen session is bounded by the next login.* The correction is that a renewing session may never present a login again. The bound is the absolute lifetime plus whatever operations demand recent authentication - and when the first is unset and the second is empty, there is no bound at all.

  • What is the difference between an idle timeout and an absolute session lifetime here?
    An idle timeout measures from last use, so any activity - including automated activity - pushes it forward indefinitely. An absolute lifetime measures from the original authentication and cannot be extended by using the session, so it is the only one of the two that guarantees a future ceremony.
  • Someone acquired one live session and nothing else. How would they value it?
    By how long it will still be honoured, multiplied by what the identity reaches. With no absolute ceiling the first term is open-ended, which is what makes a live session more tradeable than a password: no factor stands between the buyer and the tenant, and the buyer picks the objective, so the acquirer's inactivity predicts nothing.
  • Where can a fresh ceremony still be forced on a session that keeps renewing?
    Only where an operation demands it. OpenID Connect has `prompt=login`, which forces the provider to authenticate again, and `max_age`, which requires re-authentication when `auth_time` is older than the given number of seconds. Without such a demand on the operation, renewal keeps the original ceremony alive indefinitely.

A turnstile checks your card at the door. Once you are inside, nothing checks again - and if the building never closes, the moment you would have to show the card once more never comes.

saying these in an interview costs you the question

  • Says a stolen session dies at the next MFA prompt
  • Confuses idle timeout with absolute session lifetime
  • Thinks a refresh exchange re-checks the user
  • Reads a short access-token lifetime as a short session
  • Believes stronger factors shorten a session's life

context