API Security Fundamentals New
API Security Fundamentals New
API Security
Fundamentals
Table of Contents
What is the difference between APIs What is credential stuffing for APIs? 19
and endpoints? 4 What is data exfiltration through APIs? 19
What is a north-south API? 7 API Security Solutions and Trends
What is an east-west API? 7 What are the latest trends in API security? 20
What are the differences between B2C What is signature-based API security? 20
APIs and B2B APIs? 8
What is API detection and response? 21
What are the differences between private
What is advanced API threat protection? 21
APIs and public APIs? 9
What is an API security platform? 22
API Security Explained
What is an API company? 22
What is API security? 10
What is threat hunting in APIs? 23
How big is the API security problem? 12
What is WAAP? 23
How is API security different from
application security? 12 API Security Best Practices
What are the best practices for What is an API documentation example? 24
protecting APIs? 13
Is there an API security checklist
API Security Risks and Abuse businesses should follow? 24
akamai.com | 2
Introduction
APIs are enabling business operations, but they also carry the crown jewels of an
organization’s data. Even perfect APIs can be abused by hackers, so it’s essential to know
the fundamentals of API security to protect your business from evolving threats. As more
customer interactions and business processes use APIs, enterprise security teams are
reworking their security strategies to put API risks at the forefront.
Whether you’re looking to touch up on your basics or unsure of what questions to ask,
read our guide for everything you need to know about API security threats, trends, and
best practices. You’ll get an in-depth look at:
akamai.com | 3
API Basics
In other words, a web API is what most people think of when they hear “API.” It’s a
collection of endpoints. Endpoints consist of resource paths, the operations that can be
performed on these resources, and the definition of the resource data (in JSON, XML,
protobuf, or another format).
The term is useful to differentiate web APIs from other APIs, such as those exposed by
the operating system or by libraries to applications running on the same machine. But we
all understand “APIs” to mean HTTP-based (web) APIs when we talk about the enterprise
digital transformation and API security.
What are the most common types of APIs and API terms?
It is helpful for security teams to be familiar with the following terms that refer to
different usage models and technology approaches for API implementations. Web APIs
are defined as being based on HTTP, and the four main types of web APIs seen today are
RESTful, SOAP, GraphQL, and gRPC. The following table defines these four common
types, among others.
akamai.com | 4
API Usage Model Description
akamai.com | 5
API Usage Model Description
akamai.com | 6
What is the difference between APIs and endpoints?
People often use “API” when what they are really talking about is a single API endpoint.
APIs, sometimes called services or API products, are collections of endpoints that serve
a business function. An endpoint, on the other hand, is a resource (or resource path, also
known as URI or Uniform Resource Identifier) and the operation performed on it (create,
read, update, or delete — operations that in RESTful APIs are typically mapped to the
HTTP methods POST, GET, PUT, and DELETE).
North-South APIs
Open to the outside Authenticated
East-West APIs
Inside your organization
App A App B
App C
Website
Mobile App
akamai.com | 7
What are the differences between B2C APIs and B2B APIs?
Business-to-consumer (B2C) APIs are the APIs that power web and mobile applications.
They are typically consumed by modern front-end clients to allow end users access to the
company’s business functionality exposed by these APIs.
Business-to-business (B2B) APIs are the APIs offered by the organization to other
organizations to conduct business, and sometimes to provide value to their joint
customers (B2B2C).
B2B APIs are fundamental to the enterprise’s digital transformation, as they enable it to
streamline how it works with its suppliers, resellers, and other partners, as well as provide
better experiences to its customers.
Since the consumers of the APIs differ greatly, the security controls available for securing
these APIs also vary. The industry has been focused on B2C use cases until fairly
recently, but even in those cases, the focus has not been on securing B2C APIs, but rather
on securing web applications. The security controls employed for protecting B2C web
applications do not guarantee security for B2C APIs (e.g., web application firewall [WAF]/
web application and API protection [WAAP]) or do not offer security for B2C APIs at all
(e.g., most bot protection solutions).
akamai.com | 8
Protecting B2B APIs is a growing problem. When it comes
to B2B APIs, among first-generation vendors there is no
dedicated visibility and security solution that covers bulk
data access on behalf of shared users (as is the case, for
example, in open banking — in which fintech companies
and financial institutions consensually share customer
data). Newer API security solutions that offer behavioral
analytics are filling the void and addressing this issue.
akamai.com | 9
API Security Explained
• APIs that are implemented and used internally to make application functionality
and data available to various systems and user interfaces in a standardized and
scalable manner
akamai.com | 10
An effective API security strategy must include systematic techniques for assessing risk
and potential impact, as well as executing appropriate mitigation measures. The first step
in assessing risk is to build an inventory of all sanctioned and unsanctioned APIs
published and used by the organization. This inventory should include attributes such as:
Additionally, API visibility and risk mitigation measures must consider a diverse collection
of possible threats, including:
• Preventing instances of API misuse like business logic abuse and data scraping
akamai.com | 11
How big is the API security problem?
API security risks are already one of the most pressing
risks faced by enterprise security teams, and the
challenge is only growing as more customer
interactions and internal business processes make use
of APIs. In short, API usage is exploding, and many
security teams are playing catch-up with their API
security strategies. For this reason, API security is
quickly emerging as one of the top priorities and areas
of concern for IT and security executives.
Greater scale
akamai.com | 12
What are the best practices for protecting APIs?
We recommend that organizations interested in enhancing their API security start with
the following best practices:
Integrate API security standards and practices with your organization’s software
development lifecycle.
Implement rate limiting measures to help prevent APIs from being abused
or overwhelmed.
Ensure that API security monitoring and analysis extends over multiple weeks and
API sessions.
Complement API security monitoring and alerting with on-demand access to API
inventory and activity data for use by threat hunters, developers, DevOps, and
support personnel.
akamai.com | 13
The best way to approach API security best practices is by thinking in terms of
organizational maturity using a framework like the one below.
Visibility Investigate
API Behavioral
to API Risk audit Response and threat
discovery detection
activity hunt
Do you have Do you know What is your Can you detect Can you Can you find
logs for API all your risk posture? misuse or deploy threats in your
environment? micro- business automated past data?
Miscon-
services? abuse? responses?
Are your logs figured? Can you hunt
sufficient? Do you know Errors? Can you Are responses for threats?
all your APIs? Documented? identify the customizable?
How do you
Sensitive entities in your
handle
data? APIs?
sensitive data?
Are all API vulnerabilities tracked on the OWASP API Security Top 10?
The OWASP API Security Top 10 is an excellent starting point for organizations seeking to
improve their API security posture. Its categories cover a wide range of possible API risks.
But it’s important to note that the categories included in the OWASP API Security Top 10 are
quite broad. So it’s important to drill down and apply focus to the sub-areas in every one of
them. API attackers frequently attempt to exploit authorization issues (covered by OWASP
extensively), but there are also API risks that fall completely outside of the OWASP API
Security Top 10, such as the abuse of logic bugs (not covered by OWASP at all).
akamai.com | 14
How can APIs be abused?
APIs can be attacked and abused in many different ways, but some of the most common
examples include:
• Business logic abuse: These are the scary scenarios that keep CISOs up at night,
as legacy security controls are useless against them. Logic abuse is when a threat
actor exploits application design or implementation flaws to prompt unexpected
and unsanctioned behavior.
• Business denial of service (DoS): By asking the back end to perform heavy tasks,
API attackers can cause “erosion of service” or a complete DoS at the application
layer (a very common vulnerability in GraphQL, but something that can happen with
any resource-intensive API endpoint implementations).
akamai.com | 15
How can I find the various types of shadow APIs?
The best way to conduct enterprise-wide shadow API discovery is to ingest and analyze
API activity log data from the sources providing the broadest coverage. Deploying per-app
sensors around every API can provide rich information about the API activity, but by
definition cannot provide broad coverage, as legacy APIs or APIs you don’t know about
remain in the shadows.
• CDNs • WAFs
Once the raw data from all available sources is collected, AI techniques can be used to
transform it into a human-understandable inventory of all APIs, endpoints, and parameters.
From there, additional analysis can be performed to classify these elements and identify
shadow APIs that should be eliminated or brought into formal governance processes.
However, if “internal APIs” are defined as east-west APIs, which cannot be accessed from
outside the organization, then the main threat is reduced to insider threat. Protect internal
APIs (in the former sense of the word) and your business-to-business (B2B) APIs like
most APIs: Start by protecting the secure software development lifecycle (SSDLC) and
continue by ensuring authenticated and authorized access; managing quotas, rate limits,
and spike arrests; and protecting against known signatures with WAFs/WAAPs. Because
of the sensitive and often bulk nature of the transactions in B2B APIs, consider adding
— if possible — strict authentication mechanisms such as mTLS for B2B APIs.
akamai.com | 16
And for both — we recommend you employ behavioral analytics, especially if you have
many entities involved, which may make the process of distinguishing between legitimate
and illegitimate behavior difficult. For example:
• How do you know if the API credentials of a specific user have been compromised?
• How would you know if your invoicing API is being abused by a partner
enumerating through invoice numbers to steal account data?
Protection of B2B APIs and internal APIs requires business context that cannot be gained
by analyzing technical elements like IP addresses and API tokens alone. Using AI and
behavioral analytics to gain visibility into business-relevant entities is the only way to
understand and manage B2B API and internal API risk effectively. Business context and
historical benchmarks for normal use of APIs by specific entities like your users or
partners — or even business process entities (invoice, payment, order, etc.) make it
possible to see anomalies that would otherwise go undetected.
• The discovery gap of API gateways: API gateways only have visibility and control
over APIs that they are configured to manage, making them ineffective at detecting
shadow APIs and endpoints.
• The security gap of API gateways: API gateways can enforce authentication and, to
some degree, authorization schemes, but do not inspect payloads (as do WAFs and
WAAPs), nor do they profile behavior to detect abuse.
akamai.com | 17
Broken or no authentication
Authentication is foundational to securing sensitive data that is made available via APIs.
Step one is to ensure that all APIs carrying sensitive data have authentication in place
initially. But it’s also important to protect authentication mechanisms from brute-force
attacks, credential stuffing, and use of stolen authentication tokens via rate limiting.
Misconfigurations that allow API consumers to bypass authentication mechanisms can
sometimes happen, often around token management (for example, some notorious JSON
Web Token validation issues, or not checking the token scope).
Broken authorization
One of the most common uses of APIs is to provide access to data or content, including
sensitive information. Authorization is the process of verifying that an API consumer is
eligible to access the data they are trying to access, prior to making it available to them.
This can be done at the object or resource level (for example, I can access my orders but
not someone else’s), or at the function level (as is often the case with administrative
capabilities). Authorization is hard to get right because of the high number of edge cases
and conditions, and because of the various flows API calls can take between
microservices. If you don’t have a centralized authorization engine, your API
implementation likely includes some of these vulnerabilities, such as BOLA and BFLA.
Security misconfiguration
There are many possible types of security misconfigurations beyond the authentication
and authorization issues mentioned above, including insecure communication (e.g., using
vulnerable cipher suites or not using TLS [formerly SSL]), unprotected cloud storage, and
overly permissive cross-origin resource sharing policies.
akamai.com | 18
What are API attacks?
API attacks are attempts to use APIs for malicious or otherwise unsanctioned purposes.
API attacks take many forms, including:
akamai.com | 19
API Security Solutions and Trends
• Behavioral analytics and anomaly detection: Rather than trying to predict possible
attacks and relying only on signature-based detection and predefined policies (e.g.,
WAF) to mitigate risk, organizations are increasingly adding AI and behavioral
analytics to view other API activity in business context and detect anomalies.
• Analysis of larger time windows: API security approaches that only analyze individual
API calls or short-term session activity are being supplanted by platforms that analyze
API activity over days and sometimes weeks, from completing basic automated WAF
policy optimization to performing behavior analytics and detecting anomalies.
• API-enabled API security: While detecting and mitigating active API attacks and
instances of abuse is critical, forward-thinking organizations are finding ways to
use on-demand access to API security data and insights to improve threat hunting,
incident response, and API development practices.
akamai.com | 20
Look for a WAF that is part of a larger WAAP solution. That WAAP should be able to offer
advanced detections through machine learning that learn from the attack signature
patterns and can remain agile at scale. Additionally, look for a WAAP that is integrated with
an API security solution that offers behavioral analytics and customized responses to get
the best of both worlds. Together, these solutions would offer complete visibility, detection,
and response internally and externally.
• Detect attacks and anomalies that indicate possible API abuse and misuse
Effective API detection and response at scale can only be delivered under a SaaS model
because of the large datasets involved in the need for resource-intensive AI and machine
learning techniques.
• Apply machine learning to overlay business context about how APIs are being used
and abused
• Perform behavioral analysis and threat hunting on APIs and API activity data that is
stored over extended time windows
akamai.com | 21
What is an API security platform?
An API security platform is a SaaS-based offering that is specially designed to:
• Analyze APIs and their usage with AI and machine learning techniques to discover
business context and determine a baseline of expected behavior
• Detect anomalies in API usage and, when necessary, provide alert and supporting
data to security information and event management (SIEM) and security
orchestration, automation, and response (SOAR) workflows
• Provide on-demand access to API inventory, activity, and threat information to both
security and nonsecurity stakeholders
• API gateway companies that provide technology to accept API calls centrally and
route them to the appropriate back-end resources and microservices
• API security platform companies that ensure businesses have awareness of all
active APIs, detect instances of attacks and abuse, and provide rich data about
how APIs are being used
• WAAP and API security platform companies that can help seamlessly transfer API
traffic data while still offering the capability to discover APIs on and off platform;
this is ideal for vendor consolidation and closing digital gaps
akamai.com | 22
What is threat hunting in APIs?
Many security teams conduct proactive threat hunting activities to identify possible
threats early and respond with countermeasures. Many first-generation API security
products provide limited value to threat hunting teams, since they are focused on alerting,
and do not store API activity at all, which means there is no data to query and hunt
through. More advanced API security companies store large and context-rich API activity
datasets and make this information available both in a GUI and through APIs, so threat
hunters can leverage the data.
What is WAAP?
Web application and API protection (WAAP) is a categorization that the research firm
Gartner uses for its industry coverage of emerging web and API threats. It is an evolution
of earlier industry coverage of the web application firewall (WAF) market in response to
the growing strategic importance of API security and the move by WAF platforms to the
cloud as managed SaaS.
akamai.com | 23
API Security Best Practices
Does your API security approach include a mechanism for continuous enterprise-
wide API discovery?
Are you leveraging the cloud/SaaS to gain access to AI and machine learning
techniques, and avoid unnecessary deployment complexity?
Is your API security approach analyzing data over a long enough time horizon
(ideally, 30 days or more)?
Are you implementing a general purpose API security approach that won’t lock you
into specific data center or cloud infrastructure models?
Will your approach give your teams the business context they need to truly
understand the API activity and possible risks that are being observed?
Do you have a strategy for two-way automation between your API security platform
and other related business processes like SIEM/SOAR, threat hunting,
documentation, DevOps tooling, etc.?
Are you taking steps to welcome nonsecurity stakeholders, like developers, into
your API security tools and processes?
akamai.com | 24
Is there an API taxonomy that security teams should understand?
The following are common categorizations and descriptions of APIs that may come up in
a security context.
Akamai protects your customer experience, workforce, systems, and data by helping to embed security into everything you create —
anywhere you build it and everywhere you deliver it. Our platform’s visibility into global threats helps us adapt and evolve your security
posture — to enable Zero Trust, stop ransomware, secure apps and APIs, or fight off DDoS attacks — giving you the confidence to
continually innovate, expand, and transform what’s possible. Learn more about Akamai’s cloud computing, security, and content delivery
solutions at akamai.com and akamai.com/blog, or follow Akamai Technologies on X, formerly known as Twitter, and LinkedIn.
akamai.com | 25