Make derive_ses_smtp_password.py more naturally scriptable#6877
Open
dannyroberts wants to merge 1 commit intomasterfrom
Open
Make derive_ses_smtp_password.py more naturally scriptable#6877dannyroberts wants to merge 1 commit intomasterfrom
dannyroberts wants to merge 1 commit intomasterfrom
Conversation
Take the secret as a positional file (or "-" for stdin) instead of passing it as a command-line argument, and add a --csv flag for feeding the script the access-keys CSV that AWS provides for download directly. SAAS-19728
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://dimagi.atlassian.net/browse/SAAS-19728
Replaces the
--secret <secret>argument (an anti-pattern: secrets on the command line leak into shell history andps) with a positional file argument that accepts a path or-for stdin. Adds a--csvflag that interprets the input as the access-keys CSV that AWS provides for download, so you can pipe / pass that file directly without preprocessing.Before
After
Test plan
Tested the following manually against a real (now-expired) access key before and after the change to make sure the output was in all cases the same as it was previously:
-)--csvwith a file--csvvia stdinI also checked that our internal documentation pointing to this command references the comment in this file and does not provide its own instructions, so it does not need to be updated.