Reader small image

You're reading from  Mastering Service Mesh

Product typeBook
Published inMar 2020
Reading LevelIntermediate
PublisherPackt
ISBN-139781789615791
Edition1st Edition
Languages
Right arrow
Authors (2):
Anjali Khatri
Anjali Khatri
author image
Anjali Khatri

Anjali Khatri is an enterprise cloud architect at DivvyCloud, advancing the cloud-native growth for the company by helping customers maintain security and compliance for resources running on AWS, Google, Azure, and other cloud providers. She is a technical leader in the adoption, scaling, and maturity of DivvyCloud's capabilities. In collaboration with product and engineering, she works with customer success around feature request architecture, case studies, account planning, and continuous solution delivery. Prior to Divvycloud, Anjali worked at IBM and Merlin. She has 9+ years of professional experience in program management for software development, open source analytics sales, and application performance consulting.
Read more about Anjali Khatri

Vikram Khatri
Vikram Khatri
author image
Vikram Khatri

Vikram Khatri is the chief architect of Cloud Pak for Data System at IBM. Vikram has 20 years of experience leading and mentoring high-performing, cross-functional teams to deliver high-impact, best-in-class technology solutions. Vikram is a visionary thought leader when it comes to architecting large-scale transformational solutions from monolithic to cloud-native applications that include data and AI. He is an industry-leading technical expert with a track record of leveraging deep technical expertise to develop solutions, resulting in revenues exceeding $1 billion over 14 years, and is also a technology subject matter expert in cloud-native technologies who frequently speaks at industry conferences and trade shows.
Read more about Vikram Khatri

View More author details
Right arrow

Exploring the Security Features of Linkerd

Linkerd provides mutual TLS for service-to-service communication. The securing of communication between services is an out-of-the-box capability and is enabled by default. In this chapter, we will explore Linkerd automatic encryption of TLS communication through sidecar proxies. It shows an important feature for which we do not have to write a single line of code in the application. Since we're running on Kubernetes, there are options for selecting an ingress controller. We will focus on the nginx controller because it is easy to set up, it secures the communication, and it allows certificate rotations.

In a nutshell, we will be learning about the following topics in this chapter:

  • Understanding mTLS traffic checks for proxy-to-proxy communication
  • Installing and deploying Smallstep for leaf certificates and key authority
  • Setting...

Technical requirements

This chapter has a dependency on Chapter 15, Installing Linkerd. You must complete the hands-on exercises of Chapter 15, Installing Linkerd, dealing with the following:

  • Setting up Linkerd
  • Installing a control plane
  • Deploying the booksapp and emojivoto applications

Make sure that you are in the proper Linkerd scripts directory.

$ cd ~/ # Switch to home directory
$ cd linkerd/scripts

For a complete understanding of Linkerd, we also recommend you complete the hands-on exercises from Chapter 16, Exploring the Reliability Features of Linkerd.

Let's explore how mTLS in Linkerd can be used to authenticate and authorize communication for microservices.

Setting up mTLS on Linkerd

Refer to the Enabling mutual TLS within the mesh section of Chapter 11, Exploring Istio's Security Features, for a detailed discussion of mTLS.

Linkerd has made mTLS accessible and straightforward through the use of sidecar proxies by using ephemeral (short-lived) leaf certificates. It automatically uses mTLS across host boundaries to encrypt HTTP and gRPC communication between microservices that are using Linkerd as sidecar proxies. There is no need for any code at the microservice level to handle the TLS communication as the Linkerd control plane takes care of it automatically. Linkerd frees up developers' time for not having to secure communication between microservices.

Since the Linkerd sidecar proxy is attached to a container within the same pod, the existing microservice can have unencrypted (HTTP) communication. Between a service,...

Summary

As we have seen in this chapter, the Linkerd control plane ships with a Certificate Authority (CA) called identity and sidecar proxies. Sidecars run alongside each microservice and receive certificates from the identity CA—which ties to a Kubernetes service account. The sidecar proxies automatically upgrade all communication between edges of the mesh to encrypted TLS connections.

Linkerd leaves it up to you to configure your ingress gateway to secure communications to the edge services of the applications in the Kubernetes cluster. There are choices of ingress controllers that you can use. In the examples of this chapter, we used the nginx ingress gateway to secure the communication and steps to rotate the certificates.

In the next chapter, we will explore the observability features in Linkerd. We will explain the process of metrics collection through sidecar...

Questions

  1. The TLS between service-to-service communication is fully automated in Linkerd.

A) True
B) False

  1. The TLS between the ingress gateway and edge service of the application is fully automated in Linkerd.

A) True
B) False

  1. The linkerd-identity component of the control plane of Linkerd is the Certificate Authority (CA) for the data plane proxies.

A) True
B) False

  1. linkerd-identity automatically rotates the certificates for linkerd-proxy in the data plane.

A) True
B) False

  1. linkerd-identity automatically rotates the certificate for its own CA.

A) True
B) False

  1. You can use trusted certificates of your own CA for linkerd-identity at the time of install only.

A) True
B) False

  1. You can change the trusted certificate of the control plane at any time, but that requires reinstallation of the control plane.

A) True
B) False

Further reading

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Mastering Service Mesh
Published in: Mar 2020Publisher: PacktISBN-13: 9781789615791
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 $15.99/month. Cancel anytime

Authors (2)

author image
Anjali Khatri

Anjali Khatri is an enterprise cloud architect at DivvyCloud, advancing the cloud-native growth for the company by helping customers maintain security and compliance for resources running on AWS, Google, Azure, and other cloud providers. She is a technical leader in the adoption, scaling, and maturity of DivvyCloud's capabilities. In collaboration with product and engineering, she works with customer success around feature request architecture, case studies, account planning, and continuous solution delivery. Prior to Divvycloud, Anjali worked at IBM and Merlin. She has 9+ years of professional experience in program management for software development, open source analytics sales, and application performance consulting.
Read more about Anjali Khatri

author image
Vikram Khatri

Vikram Khatri is the chief architect of Cloud Pak for Data System at IBM. Vikram has 20 years of experience leading and mentoring high-performing, cross-functional teams to deliver high-impact, best-in-class technology solutions. Vikram is a visionary thought leader when it comes to architecting large-scale transformational solutions from monolithic to cloud-native applications that include data and AI. He is an industry-leading technical expert with a track record of leveraging deep technical expertise to develop solutions, resulting in revenues exceeding $1 billion over 14 years, and is also a technology subject matter expert in cloud-native technologies who frequently speaks at industry conferences and trade shows.
Read more about Vikram Khatri