Summary
In this chapter, we have looked at various technologies that can be used to protect APIs at runtime; this is the shield-right approach to API security. Adding additional protection at runtime can add a further layer of protection to an API that can build upon the strong foundations of a secure design and implementation. Firstly, we looked at some basic techniques to harden the runtime environments of our APIs. WAFs play an important role in protecting web applications and APIs, particularly against some of the older attack methods. We then looked in detail at the vital role that API gateways and API management portals fulfill in securing APIs. In particular, we saw how an open source gateway can provide various protections at runtime, such as rate-limiting, IP address restriction, and JWT validation.
Dedicated API firewalls provide a dedicated layer 7 protection for APIs by enforcing OpenAPI contracts at runtime. Finally, it is important to monitor your API runtimes to identify...