[BUG] wheel client executed from engine is giving Authentication failure when key.delete is used
Description I'm using wheel module in an engine to delete old minion keys, I see the keys are not deleted anymore so I decided to follow the documentation to see if I something was changed and I have to fix it, If I follow the description of how to use key.delete from python as shown here: https://docs.saltproject.io/en/3003/ref/wheel/all/salt.wheel.key.html#module-salt.wheel.key
Every time I use it it looks ok giving me the expecting output
$: wheel.cmd_async({'fun': 'key.delete', 'match': 'minion1'})
{'tag': 'salt/wheel/20211228113345521724', 'jid': '20211228113345521724'}
But the key is not deleted and I see this error message in the logs
salt-master[29647]: [WARNING ] Authentication failure of type "user" occurred.
This is exactly what is happening when the code is executed from the engine
Steps to Reproduce the behavior from a Python interpreter ("same" code is in the engine)
import salt.wheel
wheel = salt.wheel.WheelClient(__opts__)
wheel.cmd_async({'fun': 'key.delete', 'match': 'minion1'})
Expected behavior The minion key should be deleted
Versions Report
salt --versions-report
Salt Version:
Salt: 3003.3
Dependency Versions:
cffi: 1.14.6
cherrypy: Not Installed
dateutil: 2.6.1
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 2.10
libgit2: Not Installed
M2Crypto: 0.38.0
Mako: Not Installed
msgpack: 1.0.2
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: 2.20
pycrypto: 2.6.1
pycryptodome: 3.10.1
pygit2: Not Installed
Python: 3.8.0 (default, Feb 25 2021, 22:10:10)
python-gnupg: 0.4.1
PyYAML: 3.12
PyZMQ: 22.2.1
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: ubuntu 18.04 bionic
locale: utf-8
machine: x86_64
release: 5.4.0-65-generic
system: Linux
version: Ubuntu 18.04 bionic
This code worked before? What Salt version was that? I'm guessing this is related to a security fix of some sort.
If I remember well the code was working on version 3003.1, how can be that done now?
Is there any news on this issue?
Hi any news on this issue ? I'm facing it on 3004.2
I got the [WARNING ] Authentication failure of type "user" occurred. when calling wheel.cmd_async({'fun': 'key.delete', 'match': 'minion-win-1'}))`
Using wheel.cmd instead of cmd_async seems to work
wheel.cmd('key.delete', ['minion-win-1'])
Using wheel_async client with rest_cherrypy works ok
curl ... -d '[{"client": "wheel_async", "fun": "key.delete", "match": "minion-win-1"}]'
Thanks for the original report. This issue has been open for more than three years without recent activity and carries a severity label below severity-high. As part of a backlog cleanup, we're closing older low- and medium-severity issues so triage can focus on reports against currently supported releases.
Closing isn't a judgement that the problem wasn't real — only that the codebase has moved through several releases since this was filed, and much of the surrounding code has changed.
If you — or anyone else — can still reproduce this on the 3008.x LTS release, please leave a comment with a reproduction and a maintainer will reopen. The original reporter can also reopen directly.