code
stringlengths
3
6.57k
self._authenticate_future.set_result(True)
self.authenticate()
__deepcopy__(self, memo)
cls.__new__(cls, copy.deepcopy(self.opts, memo)
id(self)
in ('io_loop',)
setattr(result, key, copy.deepcopy(self.__dict__[key], memo)
creds(self)
crypticle(self)
authenticated(self)
hasattr(self, '_authenticate_future')
self._authenticate_future.done()
self._authenticate_future.exception()
invalidate(self)
self.__key(self.opts)
authenticate(self, callback=None)
hasattr(self, '_authenticate_future')
self._authenticate_future.done()
tornado.concurrent.Future()
self.io_loop.add_callback(self._authenticate)
handle_future(future)
future.result()
self.io_loop.add_callback(callback, response)
future.add_done_callback(handle_future)
_authenticate(self)
self.sign_in()
self.opts.get('caller')
sys.exit(2)
log.info('Waiting {0} seconds before retry.'.format(acceptance_wait_time)
tornado.gen.sleep(acceptance_wait_time)
log.debug('Authentication wait time is {0}'.format(acceptance_wait_time)
isinstance(creds, dict)
self.__key(self.opts)
SaltClientError('Attempt to authenticate with the salt master failed')
self.__key(self.opts)
Crypticle(self.opts, creds['aes'])
self._authenticate_future.set_result(True)
sign_in(self, timeout=60, safe=True, tries=1)
self.opts.get('auth_timeout', None)
self.opts.get('auth_safemode', None)
self.opts.get('auth_tries', None)
os.path.join(self.opts['pki_dir'], self.mpub)
self.minion_sign_in_payload()
log.warning('SaltReqTimeoutError: {0}'.format(e)
tornado.gen.Return('retry')
SaltClientError('Attempt to authenticate with the salt master failed with timeout error')
tornado.gen.Return('retry')
sys.exit(salt.defaults.exitcodes.EX_OK)
tornado.gen.Return('full')
tornado.gen.Return('retry')
self.verify_master(payload)
format(salt.version.__version__, m_pub_fn)
SaltSystemExit('Invalid master key')
self.opts.get('syndic_master', False)
self.opts.get('syndic_finger', self.opts.get('master_finger', False)
salt.utils.pem_finger(m_pub_fn)
self._finger_fail(syndic_finger, m_pub_fn)
self.opts.get('master_finger', False)
salt.utils.pem_finger(m_pub_fn)
self._finger_fail(self.opts['master_finger'], m_pub_fn)
tornado.gen.Return(auth)
get_keys(self)
self.opts.get('user', 'root')
salt.utils.verify.check_path_traversal(self.opts['pki_dir'], user)
os.path.exists(self.rsa_path)
salt.utils.fopen(self.rsa_path)
RSA.importKey(f.read()
log.debug('Loaded minion key: {0}'.format(self.rsa_path)
log.info('Generating keys: {0}'.format(self.opts['pki_dir'])
self.opts.get('user')
salt.utils.fopen(self.rsa_path)
RSA.importKey(f.read()
gen_token(self, clear_tok)
private_encrypt(self.get_keys()
minion_sign_in_payload(self)
os.path.join(self.opts['pki_dir'], self.mpub)
salt.utils.fopen(pubkey_path)
RSA.importKey(f.read()
PKCS1_OAEP.new(pub)
cipher.encrypt(self.token)
salt.utils.fopen(self.pub_path)
f.read()
decrypt_aes(self, payload, master_pub=True)
message. ('clear', 'pub', etc)
self.opts.get('auth_trb', False)
join(traceback.format_stack()
log.debug('Decrypting the current master AES key')
self.get_keys()
PKCS1_OAEP.new(key)
cipher.decrypt(payload['aes'])
os.path.join(self.opts['pki_dir'], self.mpub)
os.path.exists(m_path)
salt.utils.fopen(m_path)
RSA.importKey(f.read()
hashlib.sha256(key_str)
hexdigest()
public_decrypt(mkey.publickey()
key_str.split('_|-')
cipher.decrypt(payload['token'])
verify_pubkey_sig(self, message, sig)