sensu / sensu-puppet

Sensu Puppet module.
https://github.com/sensu/sensu-puppet
MIT License
165 stars 290 forks source link

Sensu Go 6.10.0 JWT changes impacting Puppet usage #1338

Open jhenderson-pro opened 1 year ago

jhenderson-pro commented 1 year ago

Description of the problem

Command used and debugging output

Platform and version information

Is there anything else you think will be helpful?

Adjusting the Sensu Puppet Module to use API keys may be helpful.

elfranne commented 1 year ago

Quick Fix:

From the 6.10 release notes:

NOTE: Custom commands making use of $SENSU_ACCESS_TOKEN and $SENSU_REFRESH_TOKEN may be impacted by the changes to sessions and refresh tokens. We recommend setting up an API key and using $SENSU_API_KEY in light of these changes.

The changes are a bit unclear, but it seems the tokens have been deleted. You can manually fix the issue by recreating a new tokens in the config (/root/.config/sensu/sensuctl/cluster): curl -X GET https://127.0.0.1:8080/auth -u user:pass -k

Then replace the new tokens in the cluster file.

maxadamo commented 1 year ago

the workaround proposed by @elfranne works. But it can't be used on a large number of hosts, because this password should be supplied on all the clients using sensuctl.

sensu-discourse commented 3 months ago

This issue has been mentioned on Sensu Community. There might be relevant details there:

https://discourse.sensu.io/t/getting-the-error-401/3232/3