question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support multiple database backends for initialization and for data access

See original GitHub issue

I’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.

  1. Should the Spring Cloud Vault Database Config support the reference docs database initialization provided by Spring Boot?
  2. 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
xenoterracidecommented, Jun 20, 2019

Although I understand this came in as a question, I would love to see support for many roles in the library.

1reaction
mp911decommented, Apr 18, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set up a Database Backend - Apache Airflow
Set up a Database Backend¶. Airflow was built to interact with its metadata using SqlAlchemy. The document below describes the database engine ...
Read more >
Connecting to data sources | Full-Stack Quickstart
Fetch data from multiple locations. Now that we've constructed our schema, we need to connect data sources to Apollo Server. A data source...
Read more >
Organising Database Access in Go - Alex Edwards
So in this post we're going to take a look at four different methods for organizing your code and structuring access to your...
Read more >
Backend Configuration - Terraform - HashiCorp Developer
This lets multiple people access the state data and work together on that collection of infrastructure resources. This page describes how to configure...
Read more >
“How-to” Guides - Spring
Spring Boot supports multi-document YAML and Properties files (see ... anywhere one is required, including database initialization.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found