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.

EasyTechnical
52 practiced

Walk me through mutual TLS (mTLS): how does the handshake differ from standard one-way TLS, how do the client and server present and verify each other's certificates, and what are the practical options for certificate provisioning and rotation for service-to-service authentication in a microservice or service-mesh deployment?

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.

HardSystem Design
58 practiced

Architect a security model for a large-scale microservices platform (~1000 services) that uses a service mesh (e.g., Envoy/Istio) and an API gateway. Goals: enforce strong service-to-service authentication and authorization, minimize blast radius, centralize policy where sensible but avoid bottlenecks, ensure observability and incident response. Provide key components, identity model, policy enforcement points, rollout plan and scaling considerations.

HardTechnical
57 practiced

Provide a Redis Lua script (or clear pseudocode) that implements a distributed sliding-window rate limiter per key with parameters (limit, window_seconds). The script must atomically record the current request timestamp, remove expired entries, and return the current count and remaining allowance. Explain how TTL is used and how to call the script with EVALSHA for performance.

EasyTechnical
99 practiced

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

That is every published API Security, Authentication and Authorization question for Cloud Engineer so far. Browse the other topics in this category, or practice this one interactively.