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

0.1.10: onelogin-aws-login always fail without -d $duration_seconds #83

Closed
mumoshu opened this issue Apr 18, 2018 · 0 comments
Closed

Comments

@mumoshu
Copy link
Contributor

mumoshu commented Apr 18, 2018

The latest release of onelogin-aws-cli fails without -d $duration_seconds, emitting an error like this:

$ onelogin-aws-login -C default
Google Authenticator Token: *snip*
*snip*
Role Number: 2
Traceback (most recent call last):
  File "/Users/kuoka-yusuke/.pyenv/versions/3.6.5/bin/onelogin-aws-login", line 11, in <module>
    load_entry_point('onelogin-aws-cli==0.1.10', 'console_scripts', 'onelogin-aws-login')()
  File "/Users/kuoka-yusuke/.pyenv/versions/3.6.5/lib/python3.6/site-packages/onelogin_aws_cli/cli.py", line 55, in login
    api.save_credentials()
  File "/Users/kuoka-yusuke/.pyenv/versions/3.6.5/lib/python3.6/site-packages/onelogin_aws_cli/__init__.py", line 131, in save_credentials
    self.assume_role()
  File "/Users/kuoka-yusuke/.pyenv/versions/3.6.5/lib/python3.6/site-packages/onelogin_aws_cli/__init__.py", line 122, in assume_role
    DurationSeconds=self.duration_seconds
  File "/Users/kuoka-yusuke/.pyenv/versions/3.6.5/lib/python3.6/site-packages/botocore/client.py", line 314, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/Users/kuoka-yusuke/.pyenv/versions/3.6.5/lib/python3.6/site-packages/botocore/client.py", line 586, in _make_api_call
    api_params, operation_model, context=request_context)
  File "/Users/kuoka-yusuke/.pyenv/versions/3.6.5/lib/python3.6/site-packages/botocore/client.py", line 621, in _convert_to_request_dict
    api_params, operation_model)
  File "/Users/kuoka-yusuke/.pyenv/versions/3.6.5/lib/python3.6/site-packages/botocore/validate.py", line 291, in serialize_to_request
    raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid type for parameter DurationSeconds, value: None, type: <class 'NoneType'>, valid types: <class 'int'>

This obviously work:

$ onelogin-aws-login -C default -d 3600

But it took some time until I finally notice that it is now an implicitly required flag 😃
Is it an expected behavior? Would you mind if I brought back the default value of 3600 seconds?

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

2 participants