I am unable to get this to work. In my .CFconfig.json file I entered (at the bottom) before the last }:
"secretProviders":{
"json": {
"class": "lucee.runtime.security.FileSecretProvider",
"custom": {
"type": "json",
"file": "/home/example/domains/dev.example.com/keyData/systemEnv.json",
"caseSensitive": true
}
}
}
And I made sure the file exists, it’s owner is the lucee user. The permissions are 640, and this is what is inside (cleaned) which was saved to a file using serializeJSON():
{"appSalt":"xxxxx","appDevelopmentHmacKey":"xxxxxxx","appKeyRingPath":"/home/example/domains/dev.example.com/keyrings/","appKeyRingFilename":"xxxxxxxx","appPassword":"xxxxxxxx"}
And I can read it back with FileRead and deserializeJSON it back to a structure.
inside Application.cfc, in the OnApplicationStart I have:
application.password = toBinary( SecretProviderGet("appPassword") );
And Lucee responds with:
no secret provider found that provides the key [appPassword]
Not sure where I am messing up as I think I followed all the instructions in the docs.