when i execute gimme-aws-creds it crashes with StopIteration exception when trying to login to aws from CLI.
`Traceback (most recent call last):
File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 787, in iter_selected_aws_credentials
for role in self.aws_selected_roles:
File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 670, in aws_selected_roles
selected_roles = self._get_selected_roles(self.requested_roles, self.aws_roles)
File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 660, in aws_roles
self._cache['aws_roles'] = roles = self.resolver._enumerate_saml_roles(
File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/aws.py", line 94, in _enumerate_saml_roles
role = next(iter(table))
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/homebrew/bin/gimme-aws-creds", line 17, in
GimmeAWSCreds().run()
File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 467, in run
self._run()
File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 816, in _run
for data in self.iter_selected_aws_credentials():
RuntimeError: generator raised StopIteration`
Selection: 0
Okta Verify push sent... to mobile phone
accept on okta verify app on mobile phone
`Traceback (most recent call last):
File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 787, in iter_selected_aws_credentials
for role in self.aws_selected_roles:
File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 670, in aws_selected_roles
selected_roles = self._get_selected_roles(self.requested_roles, self.aws_roles)
File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 660, in aws_roles
self._cache['aws_roles'] = roles = self.resolver._enumerate_saml_roles(
File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/aws.py", line 94, in _enumerate_saml_roles
role = next(iter(table))
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/homebrew/bin/gimme-aws-creds", line 17, in
GimmeAWSCreds().run()
File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 467, in run
self._run()
File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 816, in _run
for data in self.iter_selected_aws_credentials():
RuntimeError: generator raised StopIteration`
Expected Behavior
Current Behavior
when i execute gimme-aws-creds it crashes with StopIteration exception when trying to login to aws from CLI.
`Traceback (most recent call last): File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 787, in iter_selected_aws_credentials for role in self.aws_selected_roles: File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 670, in aws_selected_roles selected_roles = self._get_selected_roles(self.requested_roles, self.aws_roles) File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 660, in aws_roles self._cache['aws_roles'] = roles = self.resolver._enumerate_saml_roles( File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/aws.py", line 94, in _enumerate_saml_roles role = next(iter(table)) StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/opt/homebrew/bin/gimme-aws-creds", line 17, in
GimmeAWSCreds().run()
File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 467, in run
self._run()
File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 816, in _run
for data in self.iter_selected_aws_credentials():
RuntimeError: generator raised StopIteration`
Steps to Reproduce (for bugs)
brew install gimme-aws-creds
run gimme-aws-creds --action-configuration. >> .okta_aws_login_config file
[DEFAULT] okta_org_url = https://some-org.okta.com okta_auth_server = client_id = gimme_creds_server = appurl aws_appname = aws_rolename = write_aws_creds = True cred_profile = default okta_username = user@example.com app_url = https://some-org.okta.com/home/amazon_aws_sso/... resolve_aws_alias = True preferred_mfa_type = token:software:totp remember_device = aws_default_duration = 28800 device_token = output_format = json
execute gimme-aws-creds
Using password from keyring for abcd@blah.com
Pick a factor: [0] Okta Verify App: SmartPhone_Android: SM-S123U4 [1] token:software:totp( OKTA ) : abcd@blah.com
Selection: 0 Okta Verify push sent... to mobile phone
accept on okta verify app on mobile phone
`Traceback (most recent call last): File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 787, in iter_selected_aws_credentials for role in self.aws_selected_roles: File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 670, in aws_selected_roles selected_roles = self._get_selected_roles(self.requested_roles, self.aws_roles) File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 660, in aws_roles self._cache['aws_roles'] = roles = self.resolver._enumerate_saml_roles( File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/aws.py", line 94, in _enumerate_saml_roles role = next(iter(table)) StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/opt/homebrew/bin/gimme-aws-creds", line 17, in
GimmeAWSCreds().run()
File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 467, in run
self._run()
File "/opt/homebrew/Cellar/gimme-aws-creds/2.4.4/libexec/lib/python3.10/site-packages/gimme_aws_creds/main.py", line 816, in _run
for data in self.iter_selected_aws_credentials():
RuntimeError: generator raised StopIteration`
Your Environment