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.

HardSystem Design
91 practiced

Walk me through how you'd build a scalable pipeline to detect API abuse (credential stuffing, scraping, fraud) across hundreds of services and millions of requests per minute. Include data collection and enrichment (geo, ASN, device fingerprint), real-time detection and scoring (streaming feature aggregation, ML models), alerting to SIEM/SOAR, automated blocking/lists and the feedback loop for model updates, while preserving low latency on request paths.

HardTechnical
60 practiced

You must securely integrate several third-party APIs into your platform. Describe a secure integration strategy covering vendor vetting, credential management (per-tenant credentials, rotation), sandboxing/testing, rate-limiting and circuit-breakers, monitoring for anomalous behavior, contractual SLAs and how to mitigate supply chain risks from third-party compromises.

MediumSystem Design
92 practiced

How would you design a secure refresh-token strategy for a Single Page Application (SPA) with a backend API serving 1M users? Requirements: mitigate refresh-token theft, enable revocation, minimize user friction, support refresh-token rotation and offline access. Describe storage, rotation, revocation lists or introspection, and trade-offs between stateless and stateful approaches.

MediumSystem Design
49 practiced

You operate a mixed monolith + microservices environment. For security controls (authentication, authorization, rate limiting, input/schema validation, transport security), decide which responsibilities should be enforced at the API gateway/proxy and which should remain inside services. Justify choices with availability, security, and performance trade-offs and propose testing and observability to validate enforcement.

MediumTechnical
51 practiced

You're building a secure webhook receiver for third-party partners. Requirements: authenticate payloads, prevent replay attacks, support retries while ensuring idempotency, scale to high volume, and allow secret rotation. Describe signing schemes (HMAC vs asymmetric), replay defenses (timestamps, unique IDs), idempotency handling and operational patterns for secret rotation.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.