Appliscale / perun

A command-line validation tool for AWS Cloud Formation that allows to conquer the cloud faster!
https://perun-for-aws.appliscale.io
Apache License 2.0
92 stars 8 forks source link

MFA Session Token expiration bug #120

Closed maxiwoj closed 6 years ago

maxiwoj commented 6 years ago

Bug report

Current Behaviour

When creating mfa credentials with perun and using only Perun everything works fine, but when trying to use aws tool for updating session token - an error occurs

To reproduce the bug:

  1. Use Perun with option --mfa to update aws credentials
  2. Try to update mfa session token with $ aws-mfa --duration 3600
  3. An error occurs:
    INFO - Validating credentials for profile: appliscale
    Traceback (most recent call last):
    File "/Users/maksymilian/Documents/AppliScale/aws/venv/bin/aws-mfa", line 276, in <module>
    main()
    File "/Users/maksymilian/Documents/AppliScale/aws/venv/bin/aws-mfa", line 67, in main
    validate(args, config)
    File "/Users/maksymilian/Documents/AppliScale/aws/venv/bin/aws-mfa", line 184, in validate
    config.get(short_term_name, 'expiration'), '%Y-%m-%d %H:%M:%S')
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_strptime.py", line 328, in _strptime
    data_string[found.end():])
    ValueError: unconverted data remains:  UTC

Expected behaviour

Perun should update token expiration time without appending the 'UTC' suffix

Environment

go version go1.10.3 darwin/amd64 on OSX High Sierra 10.13.5 Noticed this issue just now, cannot tell if worked previously