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

Replace getpass with ui.input(hidden=True) #429

Merged
merged 1 commit into from
Sep 24, 2023

Conversation

jbgosselin
Copy link
Contributor

@jbgosselin jbgosselin commented Sep 6, 2023

Description

I'm currently trying to automate gimme-aws-creds in a python script.
I admire the idea of the gimme_aws_creds.ui.UserInterface class that helps a lot in automating user input.
I found that some places in the code was directly calling getpass.getpass() and not using the provided UserInterface. Replacing those calls with the proper UserInterface.input(hidden=True).

Related Issue

Fixes #428

Motivation and Context

Allowing developers subclassing gimme_aws_creds.ui.UserInterface for automation to provide inputs for password themselves.

How Has This Been Tested?

  • Ran pytest -vv tests with no errors
  • Tested it with a script mocking the user input via a subclass of UserInterface.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@epierce epierce merged commit 094a329 into Nike-Inc:master Sep 24, 2023
7 checks passed
@jbgosselin jbgosselin deleted the replace-getpass-ui-input branch September 24, 2023 17:08
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

Successfully merging this pull request may close these issues.

Allow gimme_aws_creds.ui.UserInterface to provide input for passwords
2 participants