Interview Q&A · questions with model answers
Authorization Interview Questions
Part of the study plan for: Backend Engineer
Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.
-
Most asked What is IDOR (Insecure Direct Object Reference) and how do you prevent it?
IDOR (now called Broken Object Level Authorization in APIs) happens when an endpoint trusts a client-supplied ID without checking that the current user may access that object, e.g., GET…
-
Most asked What is the principle of least privilege and how do you apply it?
Least privilege means every user, service and process gets only the permissions it needs, for only as long as it needs them. It limits the blast radius of mistakes and compromises.
-
What are policy engines like OPA, Cedar or Casbin, and when would you use one?
Policy engines evaluate authorization rules written in a dedicated language (Rego for OPA, Cedar for AWS Verified Permissions, Casbin models) separately from application code, so policies can be…
-
What is Google Zanzibar and how does it inspire systems like OpenFGA and SpiceDB?
Zanzibar is Google's global authorization system that stores relationship tuples (document:42#editor@user:ana) and answers 'can user X do Y on object Z?' by traversing relationships defined in a…
-
What is role explosion and how do you avoid it?
Role explosion is when teams create ever more specific roles ('EU-manager-readonly-billing') to express fine-grained rules, until roles become unmanageable. Avoid it by keeping roles coarse and…
-
What is mass assignment and how is it an authorization problem?
Mass assignment happens when an API binds all incoming fields to a model, letting users set fields they shouldn't, like role: 'admin' or price: 0. It's a form of broken object property level…
-
What is the 'new enemy' problem in authorization systems?
It's when a permission revocation and a subsequent content change are evaluated out of order, so a user who just lost access sees content added after the revocation. Zanzibar solves it with…
-
What is privilege escalation and how do you prevent it?
Privilege escalation is gaining higher permissions than intended, either vertically (user → admin, e.g., via mass assignment or unprotected admin endpoints) or horizontally (accessing other users'…