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

Read key password from CLI #765

Merged
merged 3 commits into from
May 29, 2019
Merged

Read key password from CLI #765

merged 3 commits into from
May 29, 2019

Conversation

prd-fox
Copy link
Contributor

@prd-fox prd-fox commented May 29, 2019

If a locked key is used but the provided password is either missing or incorrect, prompt the user for the password on the CLI.

Currently allows for 2 attempts before moving on to the next key.
If any keys could not be unlocked, this is then picked up during validation later; the user will only know one failed after entering passwords for each of the keys.

Fixes #729

@prd-fox prd-fox marked this pull request as ready for review May 29, 2019 13:32
@codecov-io
Copy link

codecov-io commented May 29, 2019

Codecov Report

Merging #765 into master will decrease coverage by 0.01%.
The diff coverage is 96.61%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #765      +/-   ##
============================================
- Coverage     99.45%   99.43%   -0.02%     
- Complexity     1901     1915      +14     
============================================
  Files           287      288       +1     
  Lines          5655     5688      +33     
  Branches        281      288       +7     
============================================
+ Hits           5624     5656      +32     
  Misses            5        5              
- Partials         26       27       +1
Impacted Files Coverage Δ Complexity Δ
...quorum/tessera/config/adapters/KeyDataAdapter.java 97.33% <ø> (ø) 18 <0> (ø) ⬇️
...rum/tessera/config/keypairs/FilesystemKeyPair.java 100% <ø> (ø) 15 <0> (ø) ⬇️
...m/quorum/tessera/config/cli/DefaultCliAdapter.java 99.34% <100%> (-0.06%) 20 <1> (-5)
...um/tessera/config/constraints/Base64Validator.java 100% <100%> (ø) 4 <0> (-1) ⬇️
...orum/tessera/enclave/server/EnclaveCliAdapter.java 100% <100%> (ø) 6 <2> (ø) ⬇️
.../quorum/tessera/config/keypairs/InlineKeypair.java 95% <66.66%> (ø) 9 <0> (+1) ⬆️
...ra/cli/keypassresolver/CliKeyPasswordResolver.java 97.72% <97.72%> (ø) 19 <19> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7e61c1e...02bebd9. Read the comment docs.

@prd-fox prd-fox added 0.10.0 feature User features labels May 29, 2019
@Krish1979 Krish1979 merged commit d186ddb into Consensys:master May 29, 2019
@prd-fox prd-fox deleted the key-password-cli-read branch May 29, 2019 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.10.0 feature User features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tessera and passphrase protected keys
4 participants