Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

okta-awscli crashes upon authentication failure after a change in required MFA methods in Okta #198

Open
konatacarneiro opened this issue Jun 29, 2022 · 0 comments

Comments

@konatacarneiro
Copy link

konatacarneiro commented Jun 29, 2022

Describe the bug
When a change including a new required MFA factor in Okta is pushed to users, okta-awscli crashes when trying to obtain the session cookie in okta_auth.py::OktaAuth.get_session().

image

Some investigation showed that the /api/v1/sessions request was returning a HTTP 401 Unauthorized status with the error code "E0000004: Authentication exception".

The crash seems to happen because Okta is accepting the login credentials, but refusing to accept any API calls until the user logs onto the Okta web page and enrolls into the newly-added required MFA factor. After performing the enrollment, the crashes disappear.

To Reproduce
Steps to reproduce the behavior:

  1. Have a preexisting user in Okta
  2. Have a change be pushed to Okta configuration that adds a new required MFA factor
  3. Try to obtain credentials using okta-awscli - a crash will happen after entering the password and performing MFA authentication.

Expected behavior
okta-awscli should return a clear message stating that the server denied the request to obtain the session cookie, and instructing the user to log off of Okta's web page, log back in and follow the instructions shown on the screen (if any) to restore access to their Okta account.

Output
Cannot reproduce the behavior anymore as I've already enrolled into the newly added MFA factor in my Okta account

Environment (please complete the following information):

  • OS: Windows 10
  • Version of okta-awscli you're running: 0.5.4

Additional context
N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant