NGINX tutorial: How to securely manage secrets in containers

Click for: original source

Many of your microservices need secrets to operate securely. Examples of secrets include the private key for an SSL/TLS certificate, an API key to authenticate to another service, or an SSH key for remote login. Proper secrets management requires strictly limiting the contexts where secrets are used to only the places they need to be and preventing secrets from being accessed except when needed. By Robert Haynes of F5.

In this tutorial, we show how to safely distribute and use a JSON Web Token (JWT) which a client container uses to access a service. In the four challenges in this tutorial, you experiment with four different methods for managing secrets, to learn not only how to manage secrets correctly in your containers but also about methods that are inadequate:

  • Hardcode secrets in your app
  • Pass secrets as environment variables
  • Use local secrets
  • Use a secrets manager

Although this tutorial uses a JWT as a sample secret, the techniques apply to anything for containers that you need to keep secret, such as database credentials, SSL private keys, and other API keys. There is also configuration and code included together with youtube tutorial. Nice one!

[Read More]

Tags nginx infosec devops containers