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
56 practiced

Design an audit logging and telemetry schema for APIs to support security investigations and compliance (e.g., GDPR, SOC2). Specify required log fields (principal, action, resource, timestamp, request/response metadata, trace-id), redaction rules, retention policies, storage backends, indexing strategies, sampling, and how to balance forensic needs with cost and privacy.

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
57 practiced

Perform a threat model for an external-facing API. Identify threats such as injection attacks, broken authentication, excessive data exposure, rate-limiting bypass, and DDoS. As a Solutions Architect, propose mitigation strategies including validation, least-privilege, rate limits, WAF, and API-level quotas, and discuss trade-offs and monitoring approaches.

MediumTechnical
101 practiced

Describe a secure key management and rotation architecture for API signing and encryption keys. Cover the roles of HSM/KMS vs Vault, envelope encryption, automated rotation schedules, key versioning, secure provisioning to services, access control policies, and rollback strategies if a key is compromised.

EasyTechnical
99 practiced

What is an API gateway, and what security responsibilities does it typically take on for the services sitting behind it?

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.