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

Duration ignored in YAML config #80

Closed
wulftone opened this issue Oct 7, 2020 · 4 comments
Closed

Duration ignored in YAML config #80

wulftone opened this issue Oct 7, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@wulftone
Copy link

wulftone commented Oct 7, 2020

In ~/.config/aws_okta_keyman.yml I have specified duration: 43200. This value is ignored in aws_okta_keyman v0.8.5. It works if I specify it on the CLI with --duration 43200.

$ cat ~/.config/aws_okta_keyman.yml | grep duration
duration: 43200

$ aws_okta_keyman --appid xxx
12:53:32 (INFO) AWS Okta Keyman 🔐 v0.8.5
12:53:37 (INFO) Successfully authed xxx
12:53:38 (INFO) Getting SAML Assertion from xxx
12:53:39 (INFO) Starting AWS session for us-east-1
12:53:39 (INFO) Assuming role: arn:aws:iam::123:role/xxx
12:53:39 (INFO) Wrote profile "default" to /home/xxx/.aws/credentials 💾
12:53:39 (INFO) Current time is 2020-10-07 19:53:39.483773
12:53:39 (INFO) Session expires at 2020-10-07 20:53:39+00:00 ⏳
12:53:39 (INFO) All done! 👍

$ aws_okta_keyman --appid xxx --duration 43200
12:53:49 (INFO) AWS Okta Keyman 🔐 v0.8.5
12:53:53 (INFO) Successfully authed xxx
12:53:53 (INFO) Getting SAML Assertion from xxx
12:53:54 (INFO) Starting AWS session for us-east-1
12:53:54 (INFO) Assuming role: arn:aws:iam::123:role/xxx
12:53:54 (INFO) Wrote profile "default" to /home/xxx/.aws/credentials 💾
12:53:54 (INFO) Current time is 2020-10-07 19:53:54.977365
12:53:54 (INFO) Session expires at 2020-10-08 07:53:54+00:00 ⏳
12:53:54 (INFO) All done! 👍
@wulftone wulftone added the bug Something isn't working label Oct 7, 2020
@nathan-v
Copy link
Owner

@wulftone Sorry for the delay here; I've been meaning to look into this but changed jobs and the new one has been keeping me extremely busy.

@IsaacPham
Copy link

IsaacPham commented Feb 23, 2021

The issue is that parse_config will "Only overwrite None not args" and duration arg has a default value of 3600 so it won't be overwritten. I've been working around this by removing the default from that arg in config.py, but not sure how you want to handle this.

@nathan-v
Copy link
Owner

nathan-v commented Feb 9, 2022

This will be fixed in the next update.

nathan-v added a commit that referenced this issue Feb 9, 2022
… duration bug (#80), and add okta full URL support (#65 and #82)
nathan-v added a commit that referenced this issue Feb 11, 2022
…dd Okta URL support (#98)

* Update CI configuration

* Fix spelling errors (including #96)

* Session duration bug (#80)

* Add Okta full URL support (#65 and #82)

* Fix line length, remove old setup step

* Move pip upgrade to inside the venv

* Version bump

* Update readme

* Fix link in readme
@nathan-v
Copy link
Owner

Done in #98.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants