We are running into an issue retrieving secrets from a custom plugin.
I believe we set things up properly - but that is in no way a given. We have done the steps specified in the ‘Creating and updating secrets’ section:
So the worker is registered and has ‘Client’ assigned, however, in the GlobalJobPreload.py
when I do
config = RepositoryUtils.GetPluginConfig("PluginName")
api_key = config.GetConfigEntry("TheApiKey")
it errors with the message:
System.Exception: GetConfigEntry: Attempted to access non-existent config key: TheApiKey
I take it that means the worker was not authorized to access the secret? (well, config.ConfigEntryIsPassword
returns True on the parameter, so I’m guessing it’s an access issue)
So I was wondering if there were any common pitfalls in setting up secrets management - something easy to forget or miss? Or just any ideas for anything to try.
–
Oh, at certain times I do get the key in the preload script, however if then the key value is *****
. I haven’t found out exactly what I need to do to have this happen has something to do when I save the plugin config (via Tools>Configure plugins) and when I restart the monitor.