spring-cloud / spring-cloud/spring-cloud-vault

Enable use of dynamic database credentials beyond max-tty

Open
#743 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
291
Forks
152
Avg merge
11h 24m
Merged PRs (30d)
3

Description

The problem: Currently there is no way to use dynamic credentials using spring-cloud-vault-config-databases beyond the max lease time. The recommendation online seems to be to just let your container become unhealthy and let a new one replace it.

Proposed solution: VaultConfigDatabaseBootstrapConfiguration::DatabaseSecretBackendMetadataFactory::forDatabase can return a LeasingSecretBackendMetadata with lease mode set to ROTATE instead of a plain SecretBackendMetadata.

This would ensure that the lease gets rotated at expiry and the relevant database properties get updated. The responsibility of how to use the updated properties to update the connection pool can be left to the user.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at VaultConfigDatabaseBootstrapConfiguration.DatabaseSecretBackendMetadataFactory.forDatabase and read how database secret metadata is currently created. Run the relevant project tests, then verify that the database lease rotates at expiry and that the resulting database properties are updated without prescribing connection-pool handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
database
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.