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

Extra verification: No var stateToken #164

Open
SydneyUni-Jim opened this issue May 10, 2021 · 0 comments
Open

Extra verification: No var stateToken #164

SydneyUni-Jim opened this issue May 10, 2021 · 0 comments

Comments

@SydneyUni-Jim
Copy link
Contributor

SydneyUni-Jim commented May 10, 2021

Describe the bug
Our (?) extra verification page from Okta does not have var stateToken = '…' in the html. Instead it has a var oktaData = {…}. Inside the oktaData object, there is a signIn.consent.stateToken. But I don't know if this is the same stateToken the expected at var stateToken = '…'.

Output

DEBUG - Setting AWS profile to test
DEBUG - Setting MFA factor to GOOGLE
INFO - App Link set as: [[REDACTED]]
INFO - Authenticating to: [[REDACTED]]
INFO - Authenticating as: [[REDACTED]]
INFO - Using pre-selected factor choice                                          from ~/.okta-aws
INFO - Performing secondary authentication using: GOOGLE
DEBUG - {'id': '[[REDACTED]]', 'factorType': 'token:software:totp', 'provider': 'GOOGLE', 'vendorName': 'GOOGLE', 'proafile': {'credentialId': '[[REDACTED]]'}, '_links': {'verify': {'href': '[[REDACTED]]', 'hints': {'allow': ['POST']}}}}
Enter MFA verification code: [[REDACTED]]
Traceback (most recent call last):
  File "~/.pyenv/versions/3.8.9/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "~/.pyenv/versions/3.8.9/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "~/okta-awscli/oktaawscli/okta_awscli.py", line 132, in <module>
    main()
  File "~/venv/lib/python3.8/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "~/venv/lib/python3.8/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "~/venv/lib/python3.8/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "~/venv/lib/python3.8/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "~/okta-awscli/oktaawscli/okta_awscli.py", line 120, in main
    get_credentials(
  File "~/okta-awscli/oktaawscli/okta_awscli.py", line 23, in get_credentials
    _, assertion = okta.get_assertion()
  File "~/okta-awscli/oktaawscli/okta_auth.py", line 161, in get_assertion
    assertion = self.get_saml_assertion(resp)
  File "~/okta-awscli/oktaawscli/okta_auth.py", line 142, in get_saml_assertion
    assertion = self.get_simple_assertion(html) or self.get_mfa_assertion(html)
  File "~/okta-awscli/oktaawscli/okta_auth.py", line 126, in get_mfa_assertion
    state_token = decode(re.search(r"var stateToken = '(.*)';", html.text).group(1), "unicode-escape")
AttributeError: 'NoneType' object has no attribute 'group'

Environment (please complete the following information):

  • macOS
  • okta-awscli 0.5.0
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