How API gateways improve API security (original) (raw)

Article 2 of 5

Part of: How to start securing APIs

API gateways keep APIs secure by providing rate limiting, DDoS protection and more. Learn more about these benefits, along with API gateway security best practices.

APIs are a lucrative attack vector for cybercriminals and malicious hackers. In fact, API security vendor Salt Security found 4,845 unique API attackers operated in December 2022 -- a 400% increase from six months prior. To reduce the risk of an API-based security breach, the deployment, configuration and security of an API gateway must be an integral part of any security strategy.

Importance of APIs

APIs stipulate how software applications interact with each other and are used extensively in microservices. Uber, Amazon, Spotify and most other major enterprises rely on a microservices architecture where self-contained microservices manage a specific element of a business activity. This approach significantly simplifies the development, deployment and maintenance of complex products and services by using APIs to interact with them.

APIs enable development teams to design products that interact with a service without needing in-depth knowledge of how that service works. For example, the public Google Maps API lets anyone access more than 20 petabytes of data through a simple API request. While a request to find a restaurant's location may appear simple, validating it, collecting complex responsesfrom multiple services -- map location, photos, reviews, directions, opening times, etc. -- and combining them into a single response is extremely complex. This is why enterprise APIs get deployed with API gateways, middleware that enable access to disparate services and data through a single API call and return a single unified response.

API gateway capabilities

An API gateway is a software layer that acts as the sole interface between client requests handled by multiple back-end systems.It sends requests to the appropriate services using request routing, composition and protocol translation, and it then returns the requested data.

API gateways also provide important admin and service functions, as well as security features. They improve performance, availability and scalability, while simplifying how different services connect and share data. API gateways also add an extra layer of protection because it prevents direct contact between clients and back-end services.

The top admin and service benefits provided by an API gateway include the following:

Security-specific features of an API gateway include the following:

API gateway security best practices

To keep your API gateway, API traffic and network services secure, it is important to implement the following best practices that enable your gateway to handle any attempts to disrupt or attack any of these components:

Additional security alongside API gateways can help further protect APIs. For example, gateways benefit from being behind a web application firewall (WAF). A WAF can limit access and block requests from known malicious IP addresses and filter out malformed or suspicious requests to protect against common web exploits, such as SQL injection attacks.

To reduce contagion in the event of an attack and to more easily restore or debug a microservice, always deploy separate, dedicated API gateways for each use case, such as internal access and IoT devices. This reduces the possible attack surface and makes it easier to configure dedicated rules and policies for each particular type of service.

Next Steps

API security testing tools to mitigate risk

Dig Deeper on Application and platform security

Part of: How to start securing APIs

Article 2 of 5