Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

static database roles auto rotation support

Aperta
#939 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
java, spring

Direzione di ricerca

Inizia tracciando il modo in cui spring-cloud-starter-vault-config e spring-cloud-vault-config-databases recuperano le credenziali statiche del database e il modo in cui viene creato o aggiornato il bean datasource. Esamina i campi della risposta delle credenziali del database di Vault, inclusi ttl e rotation_period, e l’endpoint API di rotazione configurato. Il lavoro è completato quando le credenziali vengono ruotate in modo proattivo e il datasource viene aggiornato senza perdere la sincronizzazione con Vault.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Is your feature request related to a problem? Please describe.
We are using vault to manage existing database account. The roles are not created by vault, but vault will manage the passwords for these roles. We have add "spring-cloud-starter-vault-config" and "spring-clould-vault-config-databases" dependencies, no issue to retrieve the username/password from our springboot application. However in terms of password rotation, looks spring clould valut doesn't support auto refresh datasouce bean when password got rotated on vault end for these static database role.
So we want this can be supported.
For our vault setup, I could see following:

  1. In the response of calling vault database credential retrieve API, I could see following:

{
...
lease_id: "",
renewable: false,
lease_duration: 0,
data: {
...
username: xxx
password: yyy
rotation_period: 15552000,
ttl: 4274939
}
mount_type: "database"
...
}
Here the ttl tell the remaining time that the password will get rotated.

  1. On valut end, there is a rotation API configured so that client application can call it to rotate the password proactively before just before the password get rotated by vault based on TTL value.
    The applicaitons cache the passwords in-memory to avoid repeated calls to Hashicorp vault to read the passwords. In such scenarios, if the vault rotates the password on its own, application functionality will fail as the cached password and the new one will not be in sync. Hence a controlled rotation of password via API will always gives the added assurance to the applications.

Describe the solution you'd like
The spring clould vault database library can support the database password rotation by calling the vault rotation API endpoint before it gets expired.

Describe alternatives you've considered
Since currently looks spring clould vault doesn't support rotation for static database role, we have to stop using it which is configuraiton-driven solution, and writing code to retrive password and do the rotation and bean refresh.

Additional context
Add any other context or screenshots about the feature request here.

Lingua principale
Java
Stelle
291
Fork
152
Merge medio
7h 10m
PR unite (30g)
23

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di spring-cloud/spring-cloud-vault

Tutte le issue di spring-cloud/spring-cloud-vault

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.