apigee-edge-drupal icon indicating copy to clipboard operation
apigee-edge-drupal copied to clipboard

Replace `EnvironmentVariablesKeyProvider` with `multi_env_vars_key_provider` for improved flexibility and maintainability

Open mxr576 opened this issue 1 year ago • 0 comments

Is your feature request related to a problem?

The current EnvironmentVariablesKeyProvider implementation within the Apigee Edge module is tightly coupled to project-specific decisions made over 7 years ago. It lacks flexibility, such as the ability to configure the environment variable prefix, and could benefit from a modern, maintainable rewrite.

Describe the solution you would like

I propose replacing the existing EnvironmentVariablesKeyProvider in the Apigee Edge module with the multi_env_vars_key_provider that Pronovix released after Apigee Summit 2024. This new module integrates with the Key module and provides a more flexible and configurable solution. Specifically, it allows users to set custom environment variable prefixes, whereas the current solution has APIGEE_EDGE_ hardcoded.

This transition would maintain backward compatibility with the previous solution, ensuring existing configurations continue to work while offering improved maintainability and flexibility for future projects.

Describe alternatives you have considered

An alternative would be updating the current EnvironmentVariablesKeyProvider in the Apigee Edge module to allow for more configuration options. However, given that the multi_env_vars_key_provider is a dedicated solution already designed for such use cases, leveraging this open-source module seems like a more future-proof and standardized approach.

Additional context

The current implementation has aged over 7+ years, and a more flexible solution would better serve users. The multi_env_vars_key_provider module offers a more modern and maintainable approach to managing Apigee credentials across multiple environment variables. This change would not only improve configurability but also align the module with other Key module-based solutions used across Drupal projects.

mxr576 avatar Oct 02 '24 13:10 mxr576