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

Allow wallet passphrases to be environment variables #5879

Merged
merged 12 commits into from May 18, 2020
Merged

Allow wallet passphrases to be environment variables #5879

merged 12 commits into from May 18, 2020

Conversation

mcdee
Copy link
Contributor

@mcdee mcdee commented May 16, 2020

What type of PR is this?

Feature

What does this PR do? Why is it needed?

The wallet keymanager allows passphrases to be stored in a JSON file, however some configurations do better with sensitive data injected through environment variables. This PR attempts to interpolate passphrases starting with the '$' character as environment variables, allowing for this configuration without losing the use of the JSON file.

@mcdee mcdee requested a review from a team as a code owner May 16, 2020 15:32
@codecov
Copy link

codecov bot commented May 16, 2020

Codecov Report

Merging #5879 into master will increase coverage by 0.22%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #5879      +/-   ##
==========================================
+ Coverage   59.97%   60.20%   +0.22%     
==========================================
  Files         314      313       -1     
  Lines       26712    26493     -219     
==========================================
- Hits        16021    15950      -71     
+ Misses       8510     8380     -130     
+ Partials     2181     2163      -18     

}
}()

if err := os.Setenv("NEITHER", "neither"); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you unset the environment variables after the test is done ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, added. Also altered the names to use a test-specific prefix to avoid any chance of clash.

Copy link
Member

@nisdas nisdas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@prylabs-bulldozer prylabs-bulldozer bot merged commit fe7a123 into prysmaticlabs:master May 18, 2020
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.

None yet

4 participants