sensu-go
sensu-go copied to clipboard
Declare API-KEY to grant user instead of auto-generation
Just a quick note, I don't see that this is possible in the current docs around sensuctl api-key grant <username>
Feature Suggestion
I would like to define the api key I want to assign a sensuctl user instead of having to have one auto-generated for me.
Something like this:
# This would ideally be injected by some secret management command, or a k8s deployment variable.
SENSU_API_KEY='cc1dc0e7-3f5a-4072-ac17-7d012c351bd3'
sensuctl api-key grant some-user $SENSU_API_KEY
Possible Implementation
🤷♂️
Context
When deploying sensugo backend in a kubernetes cluster, spruce and helm charts can inject the desired api-key for each needed sensuctl backend user and a startup command on the sensugo-backend pod would be to ensure that the specific api key is assigned to the specific user.
Without this, a new cluster would auto-generate a new api key for a user, and we would store that in our secret management solution.
With this, we know that the api-key per user per environment because the key that will be deployed comes from our secret management tool.