quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.63k stars 2.64k forks source link

Refreshing mongodb credentials #38519

Open severynm opened 8 months ago

severynm commented 8 months ago

Description

I'm trying to use AWS Secrets Manager to store my Mongo DB credentials for the Quarkus application that uses Panache. In order to do this, I implemented a custom CredentialsProvider (https://quarkus.io/guides/credentials-provider#custom-credentials-provider). However, I found that CredentialsProvider is called only during the first access to db because MongoClient is instantiated as a bean and is cached in arc ApplicationContext. So could you provide a way to refresh Mongodb credentials in runtime without restarting the application?

Implementation ideas

No response

quarkus-bot[bot] commented 8 months ago

/cc @loicmathieu (mongodb)

sberyozkin commented 8 months ago

@kdubb Hi, can you remind please how you resolved it for the HashiCorp Vault, I recall there was a discussion related to refreshing the credentials ?

mancioshell commented 3 weeks ago

+1 Any updates on this issue?