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

Python error on Okta retrieval for 2.8.2 #466

Open
itsjamie opened this issue May 16, 2024 · 3 comments
Open

Python error on Okta retrieval for 2.8.2 #466

itsjamie opened this issue May 16, 2024 · 3 comments

Comments

@itsjamie
Copy link

Expected Behavior

Role is written successfully.

Current Behavior

Traceback (most recent call last):
  File "snip/bin/gimme-aws-creds", line 17, in <module>
    GimmeAWSCreds().run()
  File "snip/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 453, in run
    self._run()
  File "snip/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 876, in _run
    for data in self.iter_selected_aws_credentials():
  File "snip/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 845, in iter_selected_aws_credentials
    aws_results = executor.map(generate_credentials_prepare_data, self.aws_selected_roles)
  File "snip/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 727, in aws_selected_roles
    selected_roles = self._get_selected_roles(self.requested_roles, self.aws_roles)
  File "snip/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 718, in aws_roles
    self.saml_data['SAMLResponse'],
  File "snip/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 709, in saml_data
    self._cache['saml_data'] = saml_data = self.okta.get_saml_response(self.aws_app['links']['appLink'], self.auth_session)
  File "snip/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 702, in aws_app
    self._cache['aws_app'] = aws_app = self._get_selected_app(self.conf_dict.get('aws_appname'), self.aws_results)
  File "snip/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 644, in aws_results
    aws_results = self._get_aws_account_info(self.okta_org_url, self.config.api_key,
  File "snip/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 227, in _get_aws_account_info
    users_client = APIClient(okta_org_url, okta_api_key, pathname='/api/v1/users')
TypeError: APIClient.__init__() got an unexpected keyword argument 'pathname'

Possible Solution

Rollback to 2.7.2 is successful.

$ pip uninstall gimme-aws-creds
$ pip install gimme-aws-creds==2.7.2

Installing collected packages: okta, gimme-aws-creds
  Attempting uninstall: okta
    Found existing installation: okta 2.9.6
    Uninstalling okta-2.9.6:
      Successfully uninstalled okta-2.9.6
  DEPRECATION: okta is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for okta ... done
Successfully installed gimme-aws-creds-2.7.2 okta-0.0.4

Steps to Reproduce (for bugs)

  1. Using Okta API Key integration
  2. invoke gimme-aws-creds on 2.8.2
  3. Finish login flow, see python stack trace above

Your Environment

  • App Version used: 2.8.2
  • Operating System and version: macOS
@trailofdad
Copy link

trailofdad commented Jul 10, 2024

+1 also having this issue

2 similar comments
@andrew-hamilton-dev
Copy link

+1 also having this issue

@jose-pablo-camacho
Copy link

+1 also having this issue

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

4 participants