cevoaustralia / aws-google-auth

Provides AWS STS credentials based on Google Apps SAML SSO auth (what a jumble!)
MIT License
537 stars 181 forks source link

Enable getting password from stdin #86

Closed endorama closed 6 years ago

endorama commented 6 years ago

Hello, this PR closes issue #82, providing implementation for getting password from stdin.

I extracted the getpass.getpass call in the Util module, fixed the tests and added two unit test for the new function: test_get_password_when_tty and test_get_password_when_not_tty.
Please have a look at the test because is my first time doing unit testing in python with these libraries.

Thank you!

endorama commented 6 years ago

After Travis, there are some errors:

stevemac007 commented 6 years ago

Would be great if you could update the README with a section on using tty redirection as a way to feed the password into the tool.

I want to release all the recent merge requests, then we can look at the next version including this change.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.7%) to 48.291% when pulling 38bac153058c0b1eb523e9d568f2d1fad88a3293 on endorama:get-pass-from-stdin into 3e3b366ab90bb81154dbf9a31a49b7d6b3489e4f on cevoaustralia:master.

endorama commented 6 years ago

@stevemac007 Readme updated as requested, please let me know if the phrasing is ok. Probably would be good to refer also to release number to make it easier to know since when this feature is available.

mide commented 6 years ago

I like this PR as-is. I think it's a great contribution and I'm coming around to the idea that "it's not our job" to prevent people from shooting themselves in the foot (using echo "s3creT" | aws-google-auth ...).

I have a few colleagues that have shared their desire to use their password manager CLI to interact with this tool, and that's anything but "shoot yourself in the foot" behavior.

endorama commented 6 years ago

Thanks a lot for merging this! :smiley: