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

--storepass won't re-prompt for Password if used again #5

Open
upenn-hughmac opened this issue Aug 29, 2024 · 1 comment
Open

--storepass won't re-prompt for Password if used again #5

upenn-hughmac opened this issue Aug 29, 2024 · 1 comment

Comments

@upenn-hughmac
Copy link
Collaborator

Sometimes we change our PennKey passwords. Right? ;)

I use --storepass in various places to safely store it and reduce password fatigue. After changing my password, instead of having to figure out how to use OS-specific ways to delete my stored PennPass, I'd prefer that simply running aws-federated-auth --storepass will replace the current pass with the new one. OR there's a --removepass option. Or both.

I believe that the first option (re-prompt and store) could be as simple as:

$ git diff
diff --git a/shib/cli.py b/shib/cli.py
index 3c6106f..59d0ea6 100644
--- a/shib/cli.py
+++ b/shib/cli.py
@@ -259,7 +259,7 @@ def main():
     password = None
     password_stored = False

-    if keyring is not None:
+    if keyring is not None and not args.storepass:
         try:
             password = keyring.get_password("aws-federated-auth", "password")
         except Exception:

Happy to push that to a feature for review, if others think it's the right way to go.

@upenn-hughmac
Copy link
Collaborator Author

Created pull #6

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

1 participant