As a language-agnostic specification, OpenAPI enables clients to understand and consume services without needing access to server source code or knowledge of server implementation.
OpenAPI documents are typically written in JSON or YAML and can be easily understood by both humans and machines. With OpenAPI, DevOps teams can automate documentation and make sure their APIs conform with industry standards, allowing their applications to integrate easily with other software and services.
This also improves security by enabling developers to establish security schemes — a global security definition that designates a method of authenticating client credentials and granting permissions for the API.
What Is An API?
An application programming interface (API) is a set of protocols and definitions that allows different software programs and components to communicate, exchange data, and share functionality. By defining the ways that applications can request and exchange information, APIs enable software systems to interact in ways that support a broad range of functions and transactions — from ecommerce and mobile payments to social media and cloud services.
What is API security?
APIs are essential to the functions of modern computing, including cloud services, microservices, and serverless frameworks. Because they expose application logic and resources and may involve the transfer of sensitive and valuable information, APIs are a highly attractive target for malicious actors. API security solutions help prevent hackers from exploiting vulnerabilities in APIs and from using APIs to gain unauthorized access to IT assets and systems. API security requires a multilayered approach that may include authentication, signature-based protection, rate limiting and throttling, a web application firewall, and security policy enforcement.
What are threats to API security?
There are several types of major API security threats.
- Vulnerability exploits take advantage of a flaw in an API to allow hackers to gain unauthorized access to the API.
- Authentication processes may be compromised by attackers, causing APIs to accept requests from illegitimate or malicious sources.
- Authorization errors enable clients interacting with an API to access sensitive information, which may result in a data breach.
Denial-of-service or distributed denial-of-service attacks occur when threat actors overwhelm API operations with too many simultaneous requests, causing the API to become slow or unresponsive.
What is API security?
The OpenAPI Specification (OAS) is a framework that software developers use to build applications which can interact with REST APIs. Formerly known as the Swagger Specification, The OpenAPI Specification outlines how to communicate with an API, what kind of information can be requested, and what information will be returned. OpenAPI documents are typically written in JSON or YAML and can be easily understood by both humans and machines. With OpenAPI, DevOps teams can automate documentation and make sure their APIs conform with industry standards, allowing their applications to integrate easily with other software and services.
An OpenAPI document allows developers to define the essentials of an API, including:
- The presence and operations of each endpoint
- The input and output parameters of each operation
- Techniques for authentication
- A list of contacts, metadata, information about terms of use, licensing, available docs, and more
As an open-source framework, OpenAPI is agnostic to the language used to create an API. This allows both computers and users to easily identify and understand the capabilities an API offers without needing additional documentation or access to the source code. Ultimately, the OpenAPI specification simplifies development processes where multiple protocols, environments, and interfaces are involved.
What is OpenAPI security?
OpenAPI can help improve API protection and API gateway security by providing an easily accessible and readable API documentation for every API. When DevOps teams can understand each API endpoint and its capabilities, they can better anticipate security risks and prevent vulnerabilities from going live. OpenAPI security documentation also helps security teams determine whether an API conforms to or violates internal security policy.
OpenAPI improves security by enabling developers to establish security schemes — a global security definition that designates a method of authenticating client credentials and granting permissions for the API.
While OpenAPI helps to document and communicate security requirements, the task of enforcing and implementing security measures is the responsibility of the API server and infrastructure.
What are the five types of OpenAPI security?
OpenAPI 3.0 enables five types of security schemes:
- The API key security scheme uses an API key — an access token that a client provides when making API calls.
- HTTP authentication offers two types of authentication schemes. Basic authentication uses the standard HTTP authorization header. Bearer authentication uses a security token called a “bearer token,” a cryptic string generated by the server in response to a login request.
- The OAuth2 security scheme is an authorization protocol that gives an API client limited access to user data on a web server. This OpenAPI security scheme is used by organizations such as Facebook, Google, and GitHub.
- MutualTLS is a security scheme that uses two-way or mutual authentication or authorization code between servers and clients, where the client presents a trusted certificate for API requests.
- OpenID Connect is built on top of the OAuth 2.0 protocol and defines a sign-in flow that enables a client application to authenticate and get information about a user. User identity information is encoded in a secure JSON Web Token (JWT) or ID token.
What are the challenges of OpenAPI security?
Organizations and security teams that depend solely on OpenAPI security will likely miss a significant portion of the risks and threats that APIs create.
- OpenAPI security cannot protect against many common threats. It’s not possible in an OpenAPI definition file to create policies that prevent attacks targeting API logic — which includes many of the threats defined in the OWASP API Security Top 10.
- OpenAPI security tools may not recognize or block an attacker making successive attempts to bypass OpenAPI security schema validation.
- OpenAPI security documentation may deny access to legitimate traffic when applying a strict validation technique that blocks any abnormal API call.
- OpenAPI security tools might allow many different types of malicious API calls to pass through validation when loose validation techniques are used.
Frequently Asked Questions (FAQ)
OpenAPI was initially part of the Swagger framework. It became a separate project in 2016.
The OpenAPI Specification is supported by a large number of industry leaders and a community of tens of thousands of developers. This broad industry support represents stability across a substantial code base. OpenAPI is widely recognized as the most popular open-source framework for defining and creating RESTful APIs.
Why customers choose Akamai
Akamai powers and protects life online. Leading companies worldwide choose Akamai to build, deliver, and secure their digital experiences — helping billions of people live, work, and play every day. Akamai Connected Cloud, a massively distributed edge and cloud platform, puts apps and experiences closer to users and keeps threats farther away.