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

Retrieve node key pair information using admin API #635

Merged
merged 8 commits into from Feb 21, 2019
Merged

Retrieve node key pair information using admin API #635

merged 8 commits into from Feb 21, 2019

Conversation

chris-j-h
Copy link
Collaborator

@chris-j-h chris-j-h commented Feb 20, 2019

  • Add adminhost:port/config/keypairs endpoint to retrieve all key pairs for a particular node. Example response is:
[
   {
      "publicKey" : "oNspPPgszVUFw0qmGFfWwh1uxVUXgvBxleXORHj07g8="
   },
   {
      "publicKey" : "ABn6zhBth2qpdrJXp98IvjExV212ALl3j4U//nj4FAI="
   }
]
  • Add adminhost:port/config/keypairs/{publickey} endpoint to check if node is registered with a particular key pair. Example response is:
  {
      "publicKey" : "oNspPPgszVUFw0qmGFfWwh1uxVUXgvBxleXORHj07g8="
   }

if the node is registered with the key pair, and:

No key pair found with public key oNspPPgszVUFw0qmGFfWwh1uxVUXgvBxleXORHj07g8=

if node is not registered with the key pair

@codecov-io
Copy link

codecov-io commented Feb 20, 2019

Codecov Report

Merging #635 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #635      +/-   ##
============================================
+ Coverage     99.42%   99.43%   +<.01%     
- Complexity     1863     1869       +6     
============================================
  Files           289      290       +1     
  Lines          5782     5801      +19     
  Branches        273      274       +1     
============================================
+ Hits           5749     5768      +19     
  Misses            5        5              
  Partials         28       28
Impacted Files Coverage Δ Complexity Δ
.../java/com/quorum/tessera/admin/ConfigResource.java 100% <100%> (ø) 10 <3> (+3) ⬆️
.../quorum/tessera/core/config/ConfigServiceImpl.java 100% <100%> (ø) 7 <2> (+1) ⬆️
...va/com/quorum/tessera/admin/PublicKeyResponse.java 100% <100%> (ø) 2 <2> (?)

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 15f3cf3...8c8eae8. Read the comment docs.

New DTO improves formatting of response data
Remove setter and replace with constructor, make default constructor private so it cannot be used but is present for marshalling
@Krish1979 Krish1979 merged commit 873cb01 into Consensys:master Feb 21, 2019
@chris-j-h chris-j-h deleted the feature/admin-api-keys branch February 21, 2019 12:30
@prd-fox prd-fox added this to the 0.9 milestone Feb 21, 2019
@Krish1979 Krish1979 added 0.9 enhancement Non-user code enhancements labels Apr 9, 2019
@Krish1979 Krish1979 removed this from the 0.9 milestone Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.9 enhancement Non-user code enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants