Context and Problem StatementVSecM (VMware Secrets Manager) needs a flexible and secure way to configure its components across different environments. The challenge is to find a method that is both easy to manage and secure for handling configuration settings, especially those containing sensitive information.
DecisionWe have decided to use environment variables as the primary method for configuration in VSecM.
RationaleSecurity: Environment variables provide a level of security by keeping sensitive information out of the codebase and configuration files. This reduces the risk of accidentally committing secrets to version control.
Flexibility: Environment variables can be easily set and modified across different environments (development, staging, production) without changing the application code.
Container-friendly: In containerized environments, which are common in modern deployments, environment variables are a standard way to pass configuration to applications.
Simplicity: Using environment variables simplifies the deployment process as there’s no need to manage multiple configuration files for different environments.
Integration: Many CI/CD and cloud platforms provide built-in support for managing environment variables, making it easier to integrate with existing infrastructure.
Runtime configuration: Environment variables allow for runtime configuration changes without requiring application restarts in many cases.
Consequences
Positive
Negative
ImplementationWhen implementing this approach:
Default ConfigurationVSecM codebase will contain sane defaults for all environment variable configurations as much as possible. This approach ensures that:
When implementing default configurations:
This approach balances ease of use with the flexibility to customize the configuration as needed, making VSecM both user-friendly and adaptable to various deployment scenarios.
ADRsYou can view the ADRs by browsing this following list: