Support multiple database backends for initialization and for data access
See original GitHub issueI’m working on converting SpringBoot applications to utilize the Vault Config Database backends as described here: https://cloud.spring.io/spring-cloud-vault/multi/multi_vault.config.backends.database-backends.html#vault.config.backends.database
My applications utilize the standard SpringBoot database initialization configuration for Flyway, taking advantage of the multiple DataSource (Primary for application use and the Flyway specific one for migration on startup) features documented here: https://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html#howto-execute-flyway-database-migrations-on-startup . In essence, my vault configuration has 2 different roles, one for the application data source and one for the schema modifying capable data source used by the flyway initialization on startup.
I’ve dug around the VaultConfigDatabaseBootstrapConfiguration
and DatabaseSecretBackendMetadataFactory
and it’s not immediately obvious to me how I can provide 2 VaultDatabaseProperties (one for the primary datasource and another for the flyway datasource) so that I have the respective user and pass assigned with leased credentials.
- Should the Spring Cloud Vault Database Config support the reference docs database initialization provided by Spring Boot?
- If not, are there any examples around that I could get inspiration from to handle the Cloud Vault custom configuration in a way that is consistent with the general best practices?
Thanks for your time and consideration!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top GitHub Comments
Although I understand this came in as a question, I would love to see support for many roles in the library.
I created #327 to update Javadocs. I think we can close this ticket. Feel free to file a more specific issue if you run into
VaultConfigurer
issues.