Hi,
Our app needs to retrieve the DB password from a secrets manager. There is an agent running adjacent to our app that we talk to when retrieving the password. Doing this at app startup is no problem.
The problem is that the secrets manager is configured to rotate the password every 90 days (or even before or after that time).
I'm wondering is there a way I can intervene in all calls to driver.connect(jdbcUrl, driverProperties) in order to lookup the password from the agent each time? I am aware that this is not a nice approach but I don't seem to have any other choices. I'm assured that the password lookup from the local agent will be fast. On the Oracle server there is also a policy in place where by the DB account will lock up after 3 failed password connection attempts so it's obviously quite important that I don't allow any stale password attempts.
One way I was thinking to handle it was the have a scheduled task run that reads the password from the agent and updates the pool password via the HikariConfigMXBean but doing this I have noticed the password is not changed in the driverProperties when the next connection request is made to the driver. I've seen other posts relating to this functionality so I'm guessing it should work fine. Can you point to where I'm going wrong with this?
Thanks