Slackbot
01/23/2024, 1:43 PMspencer
01/23/2024, 6:52 PMgrails-app/conf/runtime.groovy to call a utility function to decrypt the encrypted password and set it as the dataSource.password value. I believe runtime.groovy runs before application.groovy or application.yml is processed so the password will be set before the datasource is initialized.
My current approach is to read in secrets as env variables and they are referenced by application.ymlVenkatesh
01/23/2024, 6:55 PMspencer
01/23/2024, 6:58 PMimport xxxxx.ConfigService
ConfigService configService = new ConfigService()
dataSource.password=configService.getSecureProperties()?.getProperty("dataSource.password")
ConfigService is just a utility class for handling configuration, the details don't matter but the dataSource.password is set to the result of the decryption.
If I were you I would try temporarily hard coding the password and assign it to dataSource.password - and see if it works. Then figure out how to read the actual encrypted value and decrypt itVenkatesh
01/23/2024, 6:59 PMVenkatesh
01/23/2024, 7:01 PMspencer
01/23/2024, 7:01 PMspencer
01/23/2024, 7:02 PMVenkatesh
01/23/2024, 7:05 PMspencer
01/23/2024, 7:22 PMVenkatesh
01/23/2024, 7:50 PMVenkatesh
01/23/2024, 7:51 PMVenkatesh
01/23/2024, 7:51 PM