Search code examples
securitydockermicroservicespkica

How to create a public key store for microservices?


I implemented a set of microservices in a docker enviornment. And each of these services communicate with each other using JWT tokens. When service A calls to service B

  1. Service A, sign the token using his private key and pass to service B
  2. service B, gets the public key of ServiceA from a public key store and verify the token

Public/private key generation process is done by microservices itself and then they will pass the public key to the public key store. So the only thing that the public key store has to do,

  1. Store public keys send by services
  2. Send correct public key to services on request

What I am going to do is similar to what shows in this diagram.

I got this image from

I got above image from: https://www.youtube.com/watch?v=dBdZrw2pPvc&t=462s

So my problem is, are there any standard implementation of this kind of public key stores? If so what are they?


Solution

  • If security is not important:

    If security is important:

    Honestly there are a bunch more options, but these are some of the most famous and vetted by the DevOps community.