[BUG] much of the gpg module does not work on Windows
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
The gpg module does not generally work on Windows.
Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info).
Steps to Reproduce the behavior
Drop a gpg public key in c:\tmp, then...
- Try to import a key
[root@master1 salt]# salt win2012 gpg.import_key filename='c:\tmp\pubkey.gpg' user=salt
win2012:
ERROR executing 'gpg.import_key': User SYSTEM does not exist
ERROR: Minions returned with non-zero exit code
[root@master1 salt]# salt win2012 gpg.import_key filename='c:\tmp\pubkey.gpg'
win2012:
ERROR executing 'gpg.import_key': User SYSTEM does not exist
ERROR: Minions returned with non-zero exit code
- After manually importing the key, try to trust it:
[root@master1 salt]# salt win2012 gpg.trust_key keyid=A4E89A0D3328D483 trust_level=ultimately user=salt
win2012:
ERROR: No mapping between account names and security IDs was done.
ERROR: Minions returned with non-zero exit code
[root@master1 salt]# salt win2012 gpg.trust_key keyid=A4E89A0D3328D483 trust_level=ultimately
win2012:
ERROR executing 'gpg.trust_key': User SYSTEM does not exist
ERROR: Minions returned with non-zero exit code
Expected behavior
There is no documentation suggesting Windows is not supported, so these should work.
Versions Report
# salt win2012 test.versions_report
win2012:
Salt Version:
Salt: 3000.1
Dependency Versions:
cffi: 1.12.2
cherrypy: 17.4.1
dateutil: 2.8.0
docker-py: Not Installed
gitdb: 2.0.5
gitpython: Not Installed
Jinja2: 2.10.1
libgit2: Not Installed
M2Crypto: Not Installed
Mako: 1.0.7
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: 2.19
pycrypto: Not Installed
pycryptodome: 3.8.1
pygit2: Not Installed
Python: 3.5.4 (v3.5.4:3f56838, Aug 8 2017, 02:17:05) [MSC v.1900 64 bit (AMD64)]
python-gnupg: 0.4.4
PyYAML: 5.1.2
PyZMQ: 18.0.1
smmap: 2.0.5
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.1
System Versions:
dist:
locale: cp1252
machine: AMD64
release: 2012ServerR2
system: Windows
version: 2012ServerR2 6.3.9600 SP0 Multiprocessor Free
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the gpg module documentation linked in the issue and reproduce gpg.import_key and gpg.trust_key on Windows using the shown commands. Investigate the reported user and account-mapping errors; done means the affected operations work on Windows or their unsupported behavior is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100