dappnode / DNP_DAPPMANAGER

Dappnode package responsible for providing the Dappnode Package Manager
GNU General Public License v3.0
31 stars 39 forks source link

Generate JWTs on Dappmanager #2009

Open dappnodedev opened 3 months ago

dappnodedev commented 3 months ago

Instead of hardcoding the JWT secrets in each of the clients, we could make the dappmanager responsible for their generation and distribution. The process is defined below:

  1. On start, dappmanager generates a random JWT per network and stores them

  2. There must be an allow list that defines which services have access to each secret. This could be inferred from the list of clients to be shown in the stakers

3A. The Dappmanager will expose an API endpoint that will return the secret in case that the request source is one of the allowed ones

3B. The Dappmanager will inject the value of that secret into the compose file of any client included in the allow list at installation time

  1. A function must be defined in the https://github.com/dappnode/staker-package-scripts repo so that the clients can use the JWT