# API Security

> How would you secure a public REST API? Walk through the controls you would put in place.

Canonical: https://www.internhack.in/learn/interview/web-security/security-api-security-best-practices
Last updated: 2026-11-28

Difficulty: Intermediate

## Question

How would you secure a public REST API? Walk through the controls you would put in place.

*The full answer is for InternHack members. Open the page link above to read it.*

## Concepts covered

Authentication, Authorization, Rate Limiting, Input Validation, TLS

Previous: [Blind SQL Injection](https://www.internhack.in/learn/interview/web-security/security-sql-blind-injection) · Next: [XXE Attack](https://www.internhack.in/learn/interview/web-security/security-xml-external-entity-xxe) · [All of Web Security (OWASP, JWT, XSS, CSRF)](https://www.internhack.in/learn/interview/web-security)

## More Web Security (OWASP, JWT, XSS, CSRF) questions

- [Broken Auth](https://www.internhack.in/learn/interview/web-security/security-broken-auth-overview)
- [Information Disclosure](https://www.internhack.in/learn/interview/web-security/security-least-info-disclosure)
- [Side-Channel Attack](https://www.internhack.in/learn/interview/web-security/security-side-channel-attack)
- [Nonces](https://www.internhack.in/learn/interview/web-security/security-nonce-explanation)
- [MFA Factors](https://www.internhack.in/learn/interview/web-security/security-mfa-types)
- [Honey Tokens](https://www.internhack.in/learn/interview/web-security/security-honey-tokens)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
- [Web Security (OWASP, JWT, XSS, CSRF)](https://www.internhack.in/learn/interview/web-security)
