You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to refresh AWS tokens using an expired Okta password an exception is raised instead of a friendly message to the user.
> okta-awscli -f -v -d -P <password>
DEBUG - Setting AWS role to arn:aws:iam::<account>:role/<role>
DEBUG - Setting AWS partition to AwsPartition.AWS
DEBUG - Setting AWS profile to default
INFO - App Link set as: https://<org>.okta.com/home/amazon_aws/<...>
INFO - Authenticating to: <org>.okta.com
INFO - Authenticating as: <email>
Traceback (most recent call last):
File "/path/to/venv/bin/okta-awscli", line 33, in<module>
sys.exit(load_entry_point('okta-awscli==0.5.4', 'console_scripts', 'okta-awscli')())
File "/path/to/venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/path/to/venv/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/path/to/venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/path/to/venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/path/to/venv/lib/python3.8/site-packages/oktaawscli/okta_awscli.py", line 141, in main
get_credentials(
File "/path/to/venv/lib/python3.8/site-packages/oktaawscli/okta_awscli.py", line 36, in get_credentials
_, assertion = okta.get_assertion()
File "/path/to/venv/lib/python3.8/site-packages/oktaawscli/okta_auth.py", line 156, in get_assertion
self.session_token = self.primary_auth()
File "/path/to/venv/lib/python3.8/site-packages/oktaawscli/okta_auth.py", line 78, in primary_auth
return session_token
UnboundLocalError: local variable 'session_token' referenced before assignment
To Reproduce
Have your Okta password expire.
Try to refresh tokens.
Get an exception.
Expected behavior
I would expect to see an error saying the Okta password is expired instead of an exception stack trace.
Output
see above.
Environment (please complete the following information):
OS: MacOS Monterey 12.3.1
okta-awscli version: 0.5.4
Python 3.8.2
The text was updated successfully, but these errors were encountered:
When trying to refresh AWS tokens using an expired Okta password an exception is raised instead of a friendly message to the user.
To Reproduce
Expected behavior
I would expect to see an error saying the Okta password is expired instead of an exception stack trace.
Output
see above.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: