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

Build automated tests to detect field level authorization bypass in a GraphQL service where some schema fields should only be visible to certain roles. Provide a practical test script example (for instance in Python or JavaScript) that: 1) enumerates accessible fields for an admin user, 2) repeats the same queries for a low privilege user, and 3) asserts unauthorized fields are absent or redacted. Explain how to handle schema introspection differences between environments.

HardTechnical
50 practiced

You need to test a streaming API using WebSocket or Server Sent Events for security and correctness. Design automated tests that verify authentication handshake, message integrity, replay protection, payload schema validation, rate limiting and DoS protection for the streaming endpoint. Suggest libraries and approaches to simulate many clients and how to assert server behavior under load.

MediumTechnical
58 practiced

Build an automated test to detect timing side-channel leaks in an authentication API where the response time might differ based on username validity. Explain how you would reduce noise, choose sample sizes, apply statistical analysis, and automate detection in CI without producing many false positives due to network variance.

That is every published API Security, Authentication and Authorization question for Software Development Engineer in Test (SDET) so far. Browse the other topics in this category, or practice this one interactively.