Reader small image

You're reading from  Hands-On Microservices with Django

Product typeBook
Published inMay 2024
PublisherPackt
ISBN-139781835468524
Edition1st Edition
Right arrow
Author (1)
Tieme Woldman
Tieme Woldman
author image
Tieme Woldman

Tieme Woldman works as a freelance Python developer and technical writer. As a Python developer, he builds web and data engineering applications with Django and Python data transformation packages such as pandas. As a technical writer, he has written software and user documentation for software companies such as Instruqt, Noldus Information Technology, and Rulecube. Tieme lives in the Netherlands, has a bachelor's degree in computer science, and holds several (technical) writing certifications.
Read more about Tieme Woldman

Right arrow

Securing data communication between microservices

We can also use JWT to implement east-west security for safe collaboration between the match address and send email workers:

Figure 9.4 – Securing east-west access between microservices

Figure 9.4 – Securing east-west access between microservices

This way, we ensure that an authorized co-worker can only call the send email worker. We build on the modifications we made in the previous subsection for controlling access to microservices, so if you still need to make these modifications, you should process them first.

Basically, the JTW-based east-west security is similar to the north-south implementation and takes these steps:

  1. In the tasks.py file, replace the send_email_task function with this version:
    57 ...
    58 @shared_task
    59 def send_email_task(name, street, email, token):
    60    calling_producer = decode_token(token,
              'service')['service_producer'...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Hands-On Microservices with Django
Published in: May 2024Publisher: PacktISBN-13: 9781835468524

Author (1)

author image
Tieme Woldman

Tieme Woldman works as a freelance Python developer and technical writer. As a Python developer, he builds web and data engineering applications with Django and Python data transformation packages such as pandas. As a technical writer, he has written software and user documentation for software companies such as Instruqt, Noldus Information Technology, and Rulecube. Tieme lives in the Netherlands, has a bachelor's degree in computer science, and holds several (technical) writing certifications.
Read more about Tieme Woldman