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.

  1. Most asked How do you enforce tenant isolation in a multi-tenant SaaS?

    Resolve the tenant from the authenticated session or token (never from an unchecked request parameter), and scope every query, cache key, file path and message by tenant, ideally enforced centrally…

  2. How do you design privileged admin access safely?

    Separate admin roles from normal accounts, require MFA and step-up authentication, use just-in-time elevation with approval and expiry, log every admin action with justification, restrict admin…

  3. How do you cache authorization decisions safely?

    Cache decisions or permission sets briefly (seconds to minutes) keyed by user, tenant and resource, and invalidate them when roles, memberships or sharing change; never share cached authorized…

  4. How do you audit who has access to what?

    Keep authoritative, queryable records of role assignments, group memberships and sharing relationships; log grants and revocations; run periodic access reviews with owners; and generate reports of…

  5. How do you model resource ownership and sharing?

    Store an owner (user or team) on each resource and a sharing table (resource, principal, permission level) or relationship tuples; resolve access as owner OR shared-with-user OR…

  6. How do you test authorization logic?

    Write table-driven tests for policies (roles × actions × resources), integration tests that call endpoints as different users and tenants to assert 403/404, regression tests for every past access…

  7. How do you implement delegated access (acting on behalf of someone)?

    Use explicit delegation records or OAuth token exchange (RFC 8693) that produce tokens carrying both the subject and the actor (act claim), limit the delegated scope and duration, and audit actions…

  8. How do you enforce authorization in background jobs and queues?

    Record who initiated the job (user, tenant) and re-check permissions when the job runs, because access may have changed since enqueueing; scope all data access by the job's tenant, and run workers…

  9. How do you return only the data a user is allowed to see in list endpoints?

    Push authorization into the query (filters by tenant, ownership, sharing joins, or lists from a ReBAC system), rather than loading everything and filtering in memory, so pagination and counts stay…

Was this page helpful?

Report a mistake