GuildEducationInc / aws-jumpcloud

DEPRECATED: aws-vault like tool for JumpCloud authentication
MIT License
17 stars 8 forks source link

OTP prompt broken without 1Password CLI installed #27

Open doodlebro opened 4 years ago

doodlebro commented 4 years ago

After upgrading to latest (2.1.3) and clearing profiles to start fresh, I am unable to get the traditional OTP prompt to come up when logging in or rotating credentials. I do not have 1Password CLI (op) installed but the command treats my machine as if it does.

Computer info: MacOS 10.14.4, 13" MBP 2018

Error log:

Enter your JumpCloud email address: jess.boerner@guildeducation.com Enter your JumpCloud password: JumpCloud login details saved in your OS keychain. 1Password CLI found. Using OTP from item: jumpcloud /bin/sh: op: command not found Traceback (most recent call last): File "/usr/local/Cellar/aws-jumpcloud/2.1.3/libexec/lib/python3.7/site-packages/aws_jumpcloud/jumpcloud.py", line 25, in login self._authenticate() File "/usr/local/Cellar/aws-jumpcloud/2.1.3/libexec/lib/python3.7/site-packages/aws_jumpcloud/jumpcloud.py", line 65, in _authenticate raise self._auth_failure_exception(auth_resp, otp) aws_jumpcloud.jumpcloud.JumpCloudMFARequired: Multi-factor authentication is required on your JumpCloud account.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/bin/aws-jumpcloud", line 11, in load_entry_point('aws-jumpcloud==2.1.3', 'console_scripts', 'aws-jumpcloud')() File "/usr/local/Cellar/aws-jumpcloud/2.1.3/libexec/lib/python3.7/site-packages/aws_jumpcloud/cli.py", line 18, in main args.func(args) File "/usr/local/Cellar/aws-jumpcloud/2.1.3/libexec/lib/python3.7/site-packages/aws_jumpcloud/commands.py", line 118, in rotate_session _rotate_single_session(args) File "/usr/local/Cellar/aws-jumpcloud/2.1.3/libexec/lib/python3.7/site-packages/aws_jumpcloud/commands.py", line 154, in _rotate_single_session _login_to_jumpcloud(profile_name) File "/usr/local/Cellar/aws-jumpcloud/2.1.3/libexec/lib/python3.7/site-packages/aws_jumpcloud/commands.py", line 260, in _login_to_jumpcloud session.login() File "/usr/local/Cellar/aws-jumpcloud/2.1.3/libexec/lib/python3.7/site-packages/aws_jumpcloud/jumpcloud.py", line 28, in login otp = self._get_mfa() File "/usr/local/Cellar/aws-jumpcloud/2.1.3/libexec/lib/python3.7/site-packages/aws_jumpcloud/jumpcloud.py", line 36, in _get_mfa mfa = op.get_totp() File "/usr/local/Cellar/aws-jumpcloud/2.1.3/libexec/lib/python3.7/site-packages/aws_jumpcloud/onepassword.py", line 52, in get_totp return _cmd(f"get totp {ITEM}") File "/usr/local/Cellar/aws-jumpcloud/2.1.3/libexec/lib/python3.7/site-packages/aws_jumpcloud/onepassword.py", line 56, in _cmd return subprocess.check_output(f'op {cmd}', shell=True).decode(sys.stdout.encoding).strip() File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 411, in check_output **kwargs).stdout File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 512, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command 'op get totp jumpcloud' returned non-zero exit status 127.`

javs-perez commented 4 years ago

@doodlebro , did you keep running into this issue?