API Security
API security protects application programming interfaces from unauthorized access, data leakage, and abuse. It covers authentication, authorization, input validation, rate limiting, transport encryption, and defense against injection and business-logic attacks targeting API endpoints.
itOffensive security and application security | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic — API Security
An API is the agreed way one piece of software asks another for data or an action. API security keeps that agreement from becoming a cheerful note saying “please take whatever you find.” The useful picture is a guarded contract at every trust boundary: the contract says what can happen, and the guards decide who may make it happen.
A request travels through transport, perhaps a gateway, then a service and its data or downstream systems. Here is the surprise. A gateway can route traffic, check a token's shape, and apply a shared limit. It does not know whether the caller owns order 731, may change creditLimit, or has reached the approve stage. The service holding that business knowledge must make those decisions. The gateway is helpful; it is not clairvoyant.
Keep authentication, authorization, and a schema separate. Authentication checks an identity claim. Authorization decides whether that identity may perform this action on this object now. A schema describes the allowed message shape. None substitutes for the others. A valid token can ask for somebody else's record. A well-formed request can attempt an invalid workflow transition. A random identifier can be found, copied, or leaked, then become a tidy route to an unauthorized object.
The contract also needs limits. One request can contain a large payload, a costly query, many batch operations, or a third-party charge. A rate limit counts requests over a short period; a quota counts total use over a longer one. Neither is a magical “no bad things” dial, which is inconvenient but honest. Bound the work that matters: concurrency, payload, query complexity, retries, storage, and cost.
Then keep an inventory. A shadow API is active but outside the governed inventory. A zombie API was replaced but remains reachable. Both are awkward because a control cannot protect a route nobody remembers exists. Compare contracts with deployments and observed traffic; otherwise the retirement plan is mostly a decorative suggestion.
Read the intro for the full guarded-contract model and authorization layers. Use the slides when the path through gateway and service needs a picture. Keep the cheatsheet nearby when reviewing token checks, limits, server-side request forgery, or an authorization matrix. Field Notes covers the operational traps that make a technically correct rule fail after it meets alternate paths, business flows, and deployment speed.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-228-upd1.pdf
Supports
- API protection across pre-runtime and runtime lifecycle stages
- Contracts, request and response schemas, inventories, ownership, and runtime discovery
- Service and end-user authentication and authorization at service boundaries
- Request and response validation, resource limits, rate limiting, monitoring, and gateway patterns
- Shadow and zombie API risks and version retirement controls
- https://owasp.org/API-Security/editions/2023/en/0x11-t10/
Supports
- OWASP API Security Top 10 2023 category names and summaries
- The taxonomy's role as API security awareness material
- https://owasp.org/API-Security/editions/2023/en/0xa1-broken-object-level-authorization/
Supports
- Object-level authorization on every operation that resolves a client-supplied object identifier
- Unpredictable identifiers as supplementary rather than sufficient protection
- https://owasp.org/API-Security/editions/2023/en/0xa2-broken-authentication/
Supports
- Authentication and account-recovery flows as protected assets
- Token authenticity and lifetime validation
- API keys as unsuitable for user authentication
- https://owasp.org/API-Security/editions/2023/en/0xa3-broken-object-property-level-authorization/
Supports
- Separate authorization for readable and writable object properties
- Explicit field selection, restricted binding, and response schema enforcement
- https://owasp.org/API-Security/editions/2023/en/0xa4-unrestricted-resource-consumption/
Supports
- Resource risk across rate, memory, execution, payload, batching, pagination, and provider cost
- Per-operation limits, payload limits, and business-tuned rate limits
- https://owasp.org/API-Security/editions/2023/en/0xa5-broken-function-level-authorization/
Supports
- Function authorization independent of URL naming and client interface
- Deny-by-default enforcement and explicit grants for operations
- https://owasp.org/API-Security/editions/2023/en/0xa6-unrestricted-access-to-sensitive-business-flows/
Supports
- Harm caused by excessive automated use of technically valid business flows
- Business identification of sensitive flows followed by engineering controls
- https://owasp.org/API-Security/editions/2023/en/0xa7-server-side-request-forgery/
Supports
- Server-side request forgery through user-influenced remote resource fetching
- Destination allowlists, redirect control, maintained URL parsing, network isolation, and response handling
- https://owasp.org/API-Security/editions/2023/en/0xa8-security-misconfiguration/
Supports
- Misconfiguration across the network, gateway, application, orchestration, and cloud stack
- Repeatable hardening, continuous configuration review, TLS, method restrictions, content types, and safe errors
- https://owasp.org/API-Security/editions/2023/en/0xa9-improper-inventory-management/
Supports
- Inventory of hosts, environments, exposure, versions, integrated services, and sensitive data flows
- Retirement planning and equivalent protection for non-production deployments using production data
- https://owasp.org/API-Security/editions/2023/en/0xaa-unsafe-consumption-of-apis/
Supports
- Integrated API responses as untrusted data requiring validation
- TLS, provider assessment, response limits, timeouts, and redirect restrictions for upstream calls
- https://cheatsheetseries.owasp.org/cheatsheets/REST_Security_Cheat_Sheet.html
Supports
- HTTPS-only REST endpoints and access control on each operation
- JSON Web Token claim validation and the limits of API keys
- Method allowlists, workflow-state validation, input limits, content-type validation, and audit logging
- https://www.rfc-editor.org/rfc/rfc9700.html
Supports
- Current OAuth two point zero security best practice and attacker model
- Authorization code flow guidance, proof key for code exchange, token privilege restriction, and sender constraints
- Refresh-token replay protection through rotation or sender constraint
- https://www.rfc-editor.org/rfc/rfc8725.html
Supports
- Explicit algorithm verification and complete cryptographic validation for JSON Web Tokens
- Issuer and audience validation, explicit typing, and mutually exclusive rules for different token kinds
- https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html
Supports
- Separation of authentication from authorization
- Least privilege, deny by default, permission checks on every request, and server-side enforcement
- Authorization matrices and unit and integration testing of policy
- https://owasp.org/www-project-application-security-verification-standard/
Supports
- ASVS as a requirements basis for testing application technical security controls
- ASVS as guidance for secure development and procurement requirements
- https://www.rfc-editor.org/info/rfc2616/
Supports
- HTTP/1.1 standardization in June 1999
- https://www.rfc-editor.org/info/rfc5849/
Supports
- OAuth 1.0 standardization in April 2010
- https://www.rfc-editor.org/info/rfc6749/
Supports
- OAuth 2.0 standardization in October 2012
- https://www.rfc-editor.org/info/rfc7636/
Supports
- PKCE publication in September 2015
- https://www.rfc-editor.org/info/rfc7519/
Supports
- JSON Web Token standardization in May 2015
- https://owasp.org/API-Security/editions/2019/en/0x04-release-notes/
Supports
- First OWASP API Security Top 10 edition in 2019
- https://www.akamai.com/products/api-security
Supports
- Akamai API Security discovery, testing, governance, and runtime protection
- https://developers.cloudflare.com/api-shield/
Supports
- Cloudflare API Shield traffic learning, schema validation, and inventory
- https://www.wallarm.com/product/api-security
Supports
- Wallarm API discovery, inline protection, and API abuse response
- https://docs.42crunch.com/latest/content/concepts/about_platform.htm
Supports
- 42Crunch API definition auditing, scanning, and runtime protection
- https://developer.konghq.com/gateway/security/
Supports
- Kong Gateway authorization, data protection, and logging controls
- https://www.imperva.com/products/api-security/
Supports
- Imperva API security discovery and runtime protection
