Unable To Use Keyring Created Using keyctl Via Code

I’m using keyctl package - github.com/jsipprell/keyctl - Go Packages to create 2 named keyrings, one anchored to the process keyring, another anchored to the session keyring. I can share the code here if needed but basically I’m creating keys (anchoring one to the process keyring & another to the session keyring) and then properly referencing them in the config file, yet somehow telegraf always fails with the following error
retrieving resolver failed: linking secrets failed: resolving “@{processeyringFIVE:db_password}” failed: The specified item could not be found in the keyring

I want to create a keyring and some keys via a Go program (using the aforementioned Go package) and then launch telegraf with a config file set up to use the os secretstore such that it uses the keyring & keys that I’ve created, I’m right now exploring with process & session keyrings but they always run into the aforementioned error.

Any help resolving this error or providing me with an alternative solution is highly appreciated


Essentially means that the user telegraf is running as cannot see whatever keys you created.

I’m going to assume you are using Linux given the reference to the process and session keyrings. Note that in the docs it is stated that the user scope is used. I believe that means you cannot use the process keyring.

You can also use the telegraf secrets list command to verify what telegraf can see. and use that command to set secrets.

Got it, I’m trying to set & get secrets via scripts, the process & session keyrings seemed most apt. My use case is rather peculiar and the Go packages I was using didn’t have methods to easily fetch the user scope keyring. With that being said, I’ve managed to get it to work, thanks @jpowers