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.

MediumTechnical
49 practiced

Explain OAuth 2.0 concepts relevant to APIs: scope-driven authorization, access tokens (JWT vs opaque), refresh tokens, and token revocation. Compare the trade-offs of short-lived JWTs with no introspection versus opaque tokens with centralized introspection for internal and external APIs.

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.

HardTechnical
69 practiced

Propose detection and mitigation strategies for abusive API usage and credential theft at scale. Cover techniques such as per-key behavioral baselines, anomaly detection, per-key throttling and freezing, ephemeral credential issuance, credential rotation, fingerprinting, and forensics-ready logging while balancing privacy and performance.

MediumTechnical
50 practiced

A B2B customer integration needs strong authentication, auditability, and occasional offline batch transfers. Compare OAuth2 (confidential clients), mutual TLS, API keys, and JWT-based approaches for this scenario. Outline token lifecycle, rotation, scopes/least-privilege, revocation strategies, and developer ergonomics for each approach.

MediumSystem Design
95 practiced

Build a secure, auditable data-sharing API for content partners (studios) to receive usage reports and aggregated metrics. Define authentication, authorization, data transformations/aggregation to protect PII and trade secrets, rate limits, schema versioning, and logging/auditing for access and changes.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.