mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #33106 from abednarik/abednarik_master_Finger_stacktrace
Moved _finger_fail method to parent class.
This commit is contained in:
commit
8acc3147d6
@ -890,6 +890,20 @@ class AsyncAuth(object):
|
||||
salt.utils.fopen(m_pub_fn, 'wb+').write(payload['pub_key'])
|
||||
return self.extract_aes(payload, master_pub=False)
|
||||
|
||||
def _finger_fail(self, finger, master_key):
|
||||
log.critical(
|
||||
'The specified fingerprint in the master configuration '
|
||||
'file:\n{0}\nDoes not match the authenticating master\'s '
|
||||
'key:\n{1}\nVerify that the configured fingerprint '
|
||||
'matches the fingerprint of the correct master and that '
|
||||
'this minion is not subject to a man-in-the-middle attack.'
|
||||
.format(
|
||||
finger,
|
||||
salt.utils.pem_finger(master_key, sum_type=self.opts['hash_type'])
|
||||
)
|
||||
)
|
||||
sys.exit(42)
|
||||
|
||||
|
||||
# TODO: remove, we should just return a sync wrapper of AsyncAuth
|
||||
class SAuth(AsyncAuth):
|
||||
@ -1099,20 +1113,6 @@ class SAuth(AsyncAuth):
|
||||
auth['publish_port'] = payload['publish_port']
|
||||
return auth
|
||||
|
||||
def _finger_fail(self, finger, master_key):
|
||||
log.critical(
|
||||
'The specified fingerprint in the master configuration '
|
||||
'file:\n{0}\nDoes not match the authenticating master\'s '
|
||||
'key:\n{1}\nVerify that the configured fingerprint '
|
||||
'matches the fingerprint of the correct master and that '
|
||||
'this minion is not subject to a man-in-the-middle attack.'
|
||||
.format(
|
||||
finger,
|
||||
salt.utils.pem_finger(master_key, sum_type=self.opts['hash_type'])
|
||||
)
|
||||
)
|
||||
sys.exit(42)
|
||||
|
||||
|
||||
class Crypticle(object):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user