{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/27750","labels_url":"https://api.github.com/repos/saltstack/salt/issues/27750/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/27750/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/27750/events","html_url":"https://github.com/saltstack/salt/issues/27750","id":110226873,"number":27750,"title":"Salt-master too sensitive to whitespace in public keys (again)","user":{"login":"justyns","id":215985,"avatar_url":"https://avatars.githubusercontent.com/u/215985?v=3","gravatar_id":"","url":"https://api.github.com/users/justyns","html_url":"https://github.com/justyns","followers_url":"https://api.github.com/users/justyns/followers","following_url":"https://api.github.com/users/justyns/following{/other_user}","gists_url":"https://api.github.com/users/justyns/gists{/gist_id}","starred_url":"https://api.github.com/users/justyns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justyns/subscriptions","organizations_url":"https://api.github.com/users/justyns/orgs","repos_url":"https://api.github.com/users/justyns/repos","events_url":"https://api.github.com/users/justyns/events{/privacy}","received_events_url":"https://api.github.com/users/justyns/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Core","name":"Core","color":"fef2c0"},{"url":"https://api.github.com/repos/saltstack/salt/labels/High%20Severity","name":"High Severity","color":"ff9143"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Low-Hanging%20Fruit","name":"Low-Hanging Fruit","color":"f7c6c7"},{"url":"https://api.github.com/repos/saltstack/salt/labels/P4","name":"P4","color":"031a39"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Regression","name":"Regression","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestones/Approved","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/13/labels","id":9265,"number":13,"title":"Approved","description":"All issues that are ready to be worked on, both bugs and features.","creator":{"login":"thatch45","id":507599,"avatar_url":"https://avatars.githubusercontent.com/u/507599?v=3","gravatar_id":"","url":"https://api.github.com/users/thatch45","html_url":"https://github.com/thatch45","followers_url":"https://api.github.com/users/thatch45/followers","following_url":"https://api.github.com/users/thatch45/following{/other_user}","gists_url":"https://api.github.com/users/thatch45/gists{/gist_id}","starred_url":"https://api.github.com/users/thatch45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatch45/subscriptions","organizations_url":"https://api.github.com/users/thatch45/orgs","repos_url":"https://api.github.com/users/thatch45/repos","events_url":"https://api.github.com/users/thatch45/events{/privacy}","received_events_url":"https://api.github.com/users/thatch45/received_events","type":"User","site_admin":false},"open_issues":2620,"closed_issues":2755,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2015-10-15T13:59:08Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-10-07T13:33:54Z","updated_at":"2015-10-15T14:45:37Z","closed_at":null,"body":"```\r\n2015-10-06 16:53:07,968 [salt.utils.event                         ][DEBUG   ][23552] Sending event - data = {'_stamp': '2015-10-06T21:53:07.967800', 'result': False, 'pub': '-----BEGIN PUBLIC KEY-----\\n<snip>\\n-----END PUBLIC KEY-----', 'id': 'vm-123-123.testdomain.com'}\r\n2015-10-06 16:53:07,967 [salt.transport.mixins.auth               ][ERROR   ][23552] Authentication attempt from vm-123-123.testdomain.com failed, the public keys did not match. This may be an attempt to compromise the Salt cluster.\r\n2015-10-06 16:53:07,967 [salt.transport.mixins.auth               ][INFO    ][23552] Authentication request from vm-123-123.testdomain.com\r\n```\r\n\r\nI opened https://github.com/saltstack/salt/issues/21910 a while back, and it looks like the fixes merged in that issue have been reverted(or just not carried over to a new file.)   The same error cropped back up, but this time I had to edit `transport/mixins/auth.py` and add `.strip()` in a few different spots where the public key was read.\r\n\r\nIn the case of the error above, the key on the minion did not have a newline at the end of the file, but the key on the master did so they did not match despite the actual key being correct.\r\n\r\nThe salt-master version info:\r\n```\r\n[root@phx1-ca-saltmaster01 ~]# salt-call --versions\r\nSalt Version:\r\n           Salt: 2015.8.0\r\n\r\nDependency Versions:\r\n         Jinja2: 2.2.1\r\n       M2Crypto: 0.20.2\r\n           Mako: Not Installed\r\n         PyYAML: 3.11\r\n          PyZMQ: 14.5.0\r\n         Python: 2.6.6 (r266:84292, Jul 23 2015, 15:22:56)\r\n           RAET: Not Installed\r\n        Tornado: 4.2.1\r\n            ZMQ: 4.0.5\r\n           cffi: Not Installed\r\n       cherrypy: Not Installed\r\n       dateutil: Not Installed\r\n          gitdb: Not Installed\r\n      gitpython: Not Installed\r\n          ioflo: Not Installed\r\n        libnacl: Not Installed\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.4.6\r\n   mysql-python: Not Installed\r\n      pycparser: Not Installed\r\n       pycrypto: 2.6.1\r\n         pygit2: Not Installed\r\n   python-gnupg: Not Installed\r\n          smmap: Not Installed\r\n        timelib: Not Installed\r\n\r\nSystem Versions:\r\n           dist: centos 6.7 Final\r\n        machine: x86_64\r\n        release: 2.6.32-573.3.1.el6.x86_64\r\n         system: CentOS 6.7 Final\r\n```\r\n\r\nhttps://github.com/saltstack/salt/issues/21910 has more details, but I wasn't sure how to re-open a GH issue ;o.   Assuming there wasn't a specific reason for not using `.strip()`, would a patch similar to the one in https://github.com/saltstack/salt/issues/21910 be accepted?"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/148408309","html_url":"https://github.com/saltstack/salt/issues/27750#issuecomment-148408309","issue_url":"https://api.github.com/repos/saltstack/salt/issues/27750","id":148408309,"user":{"login":"cachedout","id":111616,"avatar_url":"https://avatars.githubusercontent.com/u/111616?v=3","gravatar_id":"","url":"https://api.github.com/users/cachedout","html_url":"https://github.com/cachedout","followers_url":"https://api.github.com/users/cachedout/followers","following_url":"https://api.github.com/users/cachedout/following{/other_user}","gists_url":"https://api.github.com/users/cachedout/gists{/gist_id}","starred_url":"https://api.github.com/users/cachedout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cachedout/subscriptions","organizations_url":"https://api.github.com/users/cachedout/orgs","repos_url":"https://api.github.com/users/cachedout/repos","events_url":"https://api.github.com/users/cachedout/events{/privacy}","received_events_url":"https://api.github.com/users/cachedout/received_events","type":"User","site_admin":false},"created_at":"2015-10-15T14:45:37Z","updated_at":"2015-10-15T14:45:37Z","body":"This should be fixed in #27979. "}}