Skip to content
Preptima

Authentication & Authorisation interview questions

Sessions versus tokens, OAuth 2 and OIDC flows, JWT validation pitfalls, and RBAC versus ABAC.

3 questions in Backend Engineering.

hard3

hardScenarioDesign

A maintenance script updates your permissions table and every user in one tenant can suddenly edit everything. What should have stopped that, and how would you have found out?

Permission data is as privileged as the code that reads it, so a bulk write to it needs the same review, staged rollout and reversibility as a deploy. Derive grants from a source of truth rather than stamping them, assert tenant invariants continuously, and know how long a cached decision keeps the mistake alive.

6 minsenior, staff, lead
hardConceptDesign

Would you use server-side sessions or JWTs for authenticating your API, and why?

Default to server-side sessions in an opaque HttpOnly cookie, because revocation is a row delete and the browser cannot read the credential. Choose JWTs only when a resource server must validate without calling the issuer, keep them short-lived, and pin the algorithm, issuer, audience and expiry on every verification.

5 minmid, senior, staff