Open anderssynstad opened 9 months ago
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!
Description salt.states.keystore.managed appears to be looking for incorrect key when trying to get the SHA1 fingerprint from a certfile.
Using x509_v2 in minion config:
It is able to successfully run and create the keystore files initially, but on consecutive runs, it throws the following error:
https://github.com/saltstack/salt/blob/2b364c92e6319ec3a9884afff10e6e4e1e1642db/salt/states/keystore.py#L92
Reading the cert manually with x509.read_certificate gives the following structure:
Changing the keystore.py file with something like this seems to make it work as expected:
Setup The sls file I'm running contains some fairly simple state definitions:
Expected behavior Expect the keystore state to function as documented.
Versions Report $ salt-call --versions-report Salt Version: Salt: 3006.6
Python Version: Python: 3.10.13 (main, Nov 15 2023, 04:34:27) [GCC 11.2.0]
Dependency Versions: cffi: 1.14.6 cherrypy: 18.6.1 dateutil: 2.8.1 docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed Jinja2: 3.1.3 libgit2: Not Installed looseversion: 1.0.2 M2Crypto: 0.40.1 Mako: Not Installed msgpack: 1.0.2 msgpack-pure: Not Installed mysql-python: Not Installed packaging: 22.0 pycparser: 2.21 pycrypto: Not Installed pycryptodome: 3.19.1 pygit2: Not Installed python-gnupg: 0.4.8 PyYAML: 6.0.1 PyZMQ: 23.2.0 relenv: 0.14.2 smmap: Not Installed timelib: 0.2.4 Tornado: 4.5.3 ZMQ: 4.3.4
System Versions: dist: debian 12 bookworm locale: utf-8 machine: x86_64 release: 6.1.0-17-cloud-amd64 system: Linux version: Debian GNU/Linux 12 bookworm