API keys, secrets, and the Vault
To avoid hardcoding secrets in your application code, Open Horizon includes a secrets manager that will securely make those secrets available to your service wherever it gets deployed. To enable this, Open Horizon integrates with the HashiCorp Vault.
To leverage the secrets manager to protect your application’s secrets, you must follow these steps:
- Write your application with the expectation that any secrets it needs will be made available in a file stored in the container’s private (and protected) storage system (you will specify the name of that file as part of the service configuration file in a later step).
- Create a container image for your microservice.
- In the deployment section of the service configuration file, include the following JSON segment:
"secrets": { "<secret-name>": { "description": "<optional...