Reader small image

You're reading from  Defending APIs

Product typeBook
Published inFeb 2024
PublisherPackt
ISBN-139781804617120
Edition1st Edition
Right arrow
Author (1)
Colin Domoney
Colin Domoney
author image
Colin Domoney

Colin Domoney (BSc. MSc. CSSLP, CEH) is an API Security Research Specialist and Developer Advocate with deep expertise in the development of secure software. As VP of AppSec, he took on the challenge of securing software on a large scale and running the global AppSec program at Deutsche Bank. At Veracode, as an evangelist, he produces countless webinars, and blog posts, and speak globally at conferences. Currently, he has embraced the challenge of securing APIs with 42Crunch where he has produced the API industry's first security maturity model and contributed to numerous webinars, talks, and blogs. Currently, he is working on the industry's first defensive API developer training course. He is also the curator of the APISecurity weekly newsletter.
Read more about Colin Domoney

Right arrow

Securing Microservices

Our penultimate chapter of this book explores how to secure APIs within microservices, an increasingly important topic. Although this topic warrants a chapter of its own, this does not mean that the lessons you have learned about securing API thus far are no longer applicable to microservices. Securing APIs within microservices consists of applying the cornerstone principles we’ve learned so far, albeit in new and exciting ways.

Firstly, we will understand why microservices arose as a deployment model to understand the motivations for a new architecture better. Then, we’ll look at the foundations of microservices and how they can be secured. APIs are all about connectivity, and microservices present unique challenges to securing connections due to the sheer volume of components requiring interconnection in this new architecture. Similarly, access control poses new challenges within a microservices architecture due to the increased client landscape...

Technical requirements

For this chapter, you will need the following:

  • A development machine capable of running Docker locally
  • A development machine capable of running VS Code with various marketplace extensions
  • Familiarity with Kubernetes and running basic commands
  • Access to the internet and a GitHub account to access the examples

This chapter contains sample deployments for various runtime protections, such as Gloo Edge. These configurations and associated instructions will be provided in the GitHub repository for this chapter.

The example code and various breaking changes to the instructions can be found in the Chapter 12 folder in this book’s GitHub repository: https://github.com/PacktPublishing/Defending-APIs/tree/main/Chapter12.

Understanding microservices

In this first section, we will gain an understanding of microservices by understanding the issues they intend to address, the unique advantages they offer, and some of the drawbacks...

Summary

By now, you should appreciate the key challenges of securing APIs on microservices. The biggest challenge is the increased complexity of the systems compared to a comparable monolithic application implementation. Due to the increased demands to innovate and deliver functionality, it is safe to say that microservices are here to stay, and security will need to embrace this changing landscape. The recommended approach is to build upon a solid and secure foundation, starting with securing the containers that are used and then the Kubernetes clusters that provide the runtime environments. We learned how to secure the critical connectivity between clients and the gateway using TLS and between the microservices themselves using mTLS. The service mesh promises to secure communications seamlessly while providing integration tracing and monitoring.

Finally, we learned about the foundations of zero trust, which is a key philosophy for ensuring strong access control in a complex, distributed...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Defending APIs
Published in: Feb 2024Publisher: PacktISBN-13: 9781804617120
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Author (1)

author image
Colin Domoney

Colin Domoney (BSc. MSc. CSSLP, CEH) is an API Security Research Specialist and Developer Advocate with deep expertise in the development of secure software. As VP of AppSec, he took on the challenge of securing software on a large scale and running the global AppSec program at Deutsche Bank. At Veracode, as an evangelist, he produces countless webinars, and blog posts, and speak globally at conferences. Currently, he has embraced the challenge of securing APIs with 42Crunch where he has produced the API industry's first security maturity model and contributed to numerous webinars, talks, and blogs. Currently, he is working on the industry's first defensive API developer training course. He is also the curator of the APISecurity weekly newsletter.
Read more about Colin Domoney