InterviewStack.io LogoInterviewStack.io

API Security, Authentication and Authorization Questions

Controlling who can call an API, what they may do, and defending it against abuse. Covers the access-control mechanics: API keys, OAuth 2.0 flows, OpenID Connect, JWT issuance/validation, session vs. token auth, scopes/roles for fine-grained authorization, token lifetime and refresh, mutual TLS, and machine-to-machine vs. user-delegated access. Also covers the adversarial hardening view: input validation, injection and deserialization risks, broken object-level authorization (BOLA), mass assignment, secrets handling, and the OWASP API Security Top 10, plus securing data in transit, preventing enumeration/scraping, and testing APIs for vulnerabilities.

HardTechnical
67 practiced

Given a GraphQL mutation that accepts deeply nested input to create users and related resources, perform a threat model that focuses on injection, excessive data exposure, denial-of-service via complex nested queries, and authorization bypass. Propose precise mitigations such as sanitization, field-level authorization hooks, depth/complexity limiting, persisted queries and cost estimation.

HardSystem Design
70 practiced

You need an access control model for an API that supports fine-grained permissions (resource-level, action-level) and can scale to millions of principals and resources. Discuss evaluation latency, caching of permissions, hierarchical roles, attribute-based access control, and how to keep revocation latency low.

EasyTechnical
54 practiced

Define rate limiting, throttling, and quotas in the context of APIs. Describe the token-bucket, leaky-bucket and fixed-window algorithms, and explain practical strategies for per-user, per-IP, per-client and global limits, as well as handling bursty traffic and fairness.

HardSystem Design
59 practiced

You need a scalable multi-tenant authorization model for APIs that supports hierarchical roles, resource scoping, and delegation. Specify where policy evaluation should occur (gateway vs dedicated policy service), how to store and cache policies efficiently, and how to support tenant-specific custom roles without exploding policy cardinality.

MediumTechnical
59 practiced

Propose detection and mitigation strategies for credential stuffing and automated account takeover attempts on login endpoints. Propose telemetry signals (IP velocity, failed-login patterns, device fingerprinting), anomaly detection heuristics, progressive throttling and challenge mechanisms (CAPTCHA, MFA step-up), and techniques to minimize false positives while blocking automated abuse.

Unlock Full Question Bank

Get access to all 27 API Security, Authentication and Authorization interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.