Answering Trade-Off Questions Like a Senior

The meta-skill: how to answer when there is no right answer, which is what separates levels.

Past a certain level, interviews stop having correct answers. "Sessions or JWTs?" has no answer — it has a decision procedure. How you handle that is the assessment.

The four-part shape

  1. Name the axis. "This is a trade between revocation latency and per-request cost."
  2. State both sides honestly, including the weakness of the option you will choose.
  3. Commit, with a reason tied to a requirement.
  4. Say what would change your mind. "If we needed instant revocation for compliance, I'd switch to opaque tokens with introspection."

Step 4 is the one that reads as senior. It shows the choice is conditional on facts rather than a preference you carry between jobs.

Reframe when the premise is wrong

"How do you handle cross-site cookies between abc.com and dfg.com?" invites you to configure SameSite=None. The better answer starts: "First I'd ask whether they need to be different sites." Interviewers routinely plant a constraint to see whether you question it.

Quantify

"Short-lived tokens are safer" is a slogan. "Ten minutes means a ban takes effect within ten minutes; if that is too slow we add a version check with a five-second cache" is engineering. Numbers turn opinions into decisions.

Say what you do not know

"I have not implemented SAML end to end — I know it is a signed XML assertion, that the failures are almost all verification failures, and that you never hand-roll the parsing because of signature wrapping." That is far stronger than a confident wrong answer, and interviewers are explicitly checking for it.

Have opinions with reasons

  • "Default to Authorization Code + PKCE for everything user-facing."
  • "Make the frontend same-site with the API if you possibly can."
  • "Access tokens live minutes, refresh tokens rotate, and revocation is a number you state."
  • "Ownership checks belong in the query."
  • "Buy the authorization server; build the tenancy."

The closing question

When asked if you have questions: "What is your current revocation delay, and does the product's copy match it?" — a question that demonstrates the whole area in one sentence.

Example

Example · bash
# The shape, applied to the most common question

"Sessions or JWTs?"

1. AXIS      "It's revocation latency against per-request cost and shared state."

2. BOTH      "Sessions: instant logout, one Redis lookup per request, and every
              instance needs to reach that store.
              JWTs: verify locally in ~50µs, no shared state, and you cannot
              take a token back before it expires."

3. COMMIT    "For a first-party web app on the same site, sessions — instant
              logout matters more than a sub-millisecond lookup."

4. WHAT'D    "Mobile clients, third-party integrations, multi-region with no
   CHANGE IT  shared store, or a cross-site frontend. Any of those and I'd
              move to short-lived tokens with rotating refresh tokens."

# Thirty seconds, no hedging, and every claim is falsifiable.

When to use it

  • A candidate names the axis before answering and the interviewer stops probing, because the trade-off was clearly already understood.
  • A planted constraint about two domains is questioned rather than accepted, revealing the candidate has made this decision in production.
  • An admission of not having implemented SAML, paired with an accurate outline of its failure modes, scores higher than a confident guess.

More examples

The same shape across five questions

Practising the same four steps across different questions makes the structure automatic, so under pressure you produce it without thinking about it.

Example · bash
"localStorage or memory for the access token?"
  AXIS   : durability of the credential after an XSS
  BOTH   : localStorage survives reload but hands over a portable credential;
           memory dies on reload and needs a refresh call on boot
  COMMIT : memory, plus refresh-on-boot — an XSS can act while the tab is open
           but cannot steal something usable tomorrow
  CHANGE : a client with no refresh endpoint, or an offline-first app

"Do you need MFA?"
  AXIS   : account-takeover risk against signup and login friction
  BOTH   : MFA stops credential stuffing dead; it also costs conversion and
           generates recovery support load
  COMMIT : mandatory for admins and anything touching money, optional for
           consumer accounts, with passkeys offered as the low-friction path
  CHANGE : a compliance requirement, or a measured takeover rate

"Microservices: verify at the edge or everywhere?"
  AXIS   : latency and duplication against internal blast radius
  BOTH   : edge-only is fast and assumes the network is perfect; verify-
           everywhere costs microseconds and assumes nothing
  COMMIT : verify at the edge AND re-sign a short internal token that every
           service verifies — normalisation plus real internal checks
  CHANGE : a service mesh already giving mTLS workload identity might let me
           lean on that for the service half, but not for the user half

"Rate limit per IP or per account?"
  AXIS   : which attack you are stopping
  BOTH   : per-IP stops one noisy machine and punishes corporate NAT;
           per-account stops distributed stuffing and can be used to lock
           someone out
  COMMIT : both, with exponential backoff rather than hard lockout
  CHANGE : if lockout were a compliance requirement, add it with an
           out-of-band unlock path

"Build or buy the auth server?"
  AXIS   : control against the cost of operating a security-critical system
  BOTH   : building fits it to your model exactly; it also means you own
           key rotation, protocol conformance and every CVE
  COMMIT : buy, unless there is a specific requirement no provider meets
  CHANGE : extreme scale economics, data residency, or an air-gapped
           deployment

Recovering from a question you cannot answer

Calibration is a scored dimension at senior level. Demonstrating accurate self-assessment is worth more than one extra memorised fact.

Example · bash
# You will be asked something you do not know. The recovery is scored.

❌ Bluffing
   "Yes, DPoP is basically mTLS for browsers."
   → Half-right sounds worse than not knowing, and invites a follow-up you
     cannot survive.

❌ Shutting down
   "I don't know."
   → True, and it ends the thread with nothing.

✅ Bound what you know, reason from it, ask
   "I haven't implemented DPoP. I know the category — sender-constrained
    tokens, so possession of the token alone isn't enough. I'd expect the
    client to hold a key and sign per-request proofs, with the token carrying
    a thumbprint the resource server checks. Is that roughly right, and is it
    the browser case you're interested in or service-to-service?"

   → You demonstrated the concept, reasoned to a plausible mechanism, and
     turned it into a conversation. That often scores higher than the
     candidate who had memorised it.

✅ Bring it back to something you have done
   "I've solved the adjacent problem — we kept access tokens in memory so a
    stolen one wasn't portable. Sender-constraining sounds like the stronger
    version of the same goal."

# Interviewers are explicitly assessing calibration: do you know what you
# know? A candidate who never says 'I'm not sure' is a risk, not an asset.

A self-test before the interview

Speaking the answers is the point — the gap between recognising a concept and producing it under time pressure is exactly what an interview measures.

Example · bash
# Answer each in under two minutes, out loud. Gaps show up immediately.

FUNDAMENTALS
  □ authn vs authz, and why 401 vs 403 changes client behaviour
  □ why the server can never trust a client-supplied user id
  □ what TLS does and does not give you

SESSIONS & TOKENS
  □ the five questions that decide sessions vs tokens
  □ four ways to revoke a JWT, with the delay and cost of each
  □ every check a verify call must perform, and why aud matters
  □ algorithm confusion: the attack and the one-line fix
  □ refresh rotation, reuse detection, and the parallel-refresh bug

CROSS-ORIGIN
  □ origin vs site, and which one cookies care about
  □ what triggers a preflight
  □ why wildcard + credentials is refused
  □ debugging a dropped cookie, in order
  □ why bearer tokens have no CSRF

OAUTH
  □ why OAuth is not authentication
  □ what state and PKCE each defend against
  □ why implicit and ROPC were removed
  □ the access-token-as-login vulnerability

SENIOR
  □ sender-constrained tokens: DPoP vs mTLS binding
  □ token exchange, and impersonation vs delegation
  □ where auth belongs in a microservice estate
  □ multi-tenant isolation, and why the tenant comes from the credential
  □ what fails when the IdP is down — and why never fail open

DESIGN
  □ design an auth service in 45 minutes
  □ state a revocation delay as a number and justify it
  □ say what you would not build

# Anything you cannot answer aloud in two minutes, you do not know yet.
# Reading is not the same as retrieval.

Discussion

  • Be the first to comment on this lesson.