Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make list of Vault keys configurable #677

Open
at-dro opened this issue Jan 2, 2025 · 0 comments
Open

Make list of Vault keys configurable #677

at-dro opened this issue Jan 2, 2025 · 0 comments

Comments

@at-dro
Copy link

at-dro commented Jan 2, 2025

Feature description

The Vault configuration supports structured keys based on (default and configured) application name and active environments, which is obviously a great feature. Given application name "my-application" and environment "production" the following requests are sent:

  • /application
  • /my-application
  • /application/production
  • /my-application/production

Additionally, Micronaut activates some environments automatically (e.g. "cloud" or "cli"), each causing two additional requests. However, a lot of these requests might be unnecessary - in our setup, this gives 10 requests, when we really only need "/my-application/production" (all other requests will result in 404 anyway).

In order to improve startup performance and reduce the load on the Vault service, it would be great to make this configurable (configuration names up for discussion):

  • vault.client.ignore-default-application: boolean flag to remove the /application and /application/[env] keys
  • vault.client.ignore-default-environment: boolean flag to remove the /application and /[application-name] keys
  • vault.client.ignored-environments: set of environment names to ignore when generating the keys

For backward compatibility, the defaults should be false and an empty set.

This would probably need to be implemented in the protected method VaultConfigurationClient#buildVaultKeys, which should not have any outside impact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant