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

Decouple Azure key vault module #538

Merged
merged 24 commits into from Nov 27, 2018
Merged

Decouple Azure key vault module #538

merged 24 commits into from Nov 27, 2018

Conversation

chris-j-h
Copy link
Collaborator

This PR aims to reduce the coupling of the Azure key vault module to the core application code and make it easier to add new key vault implementations. The following changes have been made:

  • KeyVault: Add KeyVaultServiceFactory to centralise creation of vault objects and use Java ServiceLoader to load implementations
  • KeyVault: Move Azure code to separate package
  • KeyPairConverter: Move to new module to prevent circular dependency
  • Config: Introduce KeyVaultConfig interface
  • Key generation: Require additional -keygenvaulttype CLI option if storing in a vault

This is a pre-emptive change to prevent a cyclical dependency when trying to use the key-vault-api module in the keypairconverter as part of the upcoming refactor
# Conflicts:
#	config-cli/src/test/java/com/quorum/tessera/config/cli/OverrideUtilTest.java
#	config/src/main/java/com/quorum/tessera/config/KeyConfiguration.java
#	config/src/main/java/com/quorum/tessera/config/KeyVaultConfig.java
Change to AzureKeyVaultConfig and remove type property
@codecov-io
Copy link

Codecov Report

Merging #538 into master will decrease coverage by 0.4%.
The diff coverage is 98.9%.

Impacted file tree graph

@@            Coverage Diff             @@
##             master   #538      +/-   ##
==========================================
- Coverage     99.41%    99%   -0.41%     
- Complexity     1462   1476      +14     
==========================================
  Files           233    241       +8     
  Lines          4459   4533      +74     
  Branches        224    226       +2     
==========================================
+ Hits           4433   4488      +55     
- Misses            5     23      +18     
- Partials         21     22       +1
Impacted Files Coverage Δ Complexity Δ
...ey/vault/azure/AzureCredentialNotSetException.java 100% <ø> (ø) 1 <0> (?)
...a/key/vault/azure/AzureKeyVaultClientDelegate.java 60% <ø> (ø) 1 <0> (?)
...ey/vault/azure/AzureKeyVaultClientCredentials.java 100% <ø> (ø) 8 <0> (?)
...ra/key/vault/azure/AzureKeyVaultClientFactory.java 100% <ø> (ø) 2 <0> (?)
...um/tessera/key/generation/KeyGeneratorFactory.java 100% <ø> (ø) 1 <0> (ø) ⬇️
...a/key/vault/NoKeyVaultServiceFactoryException.java 100% <100%> (ø) 1 <1> (?)
...n/java/com/quorum/tessera/config/KeyVaultType.java 100% <100%> (ø) 1 <1> (?)
...m/quorum/tessera/config/cli/DefaultCliAdapter.java 99.13% <100%> (+0.05%) 18 <0> (ø) ⬇️
...orum/tessera/key/vault/KeyVaultServiceFactory.java 100% <100%> (ø) 4 <4> (?)
...essera/config/cli/parsers/KeyGenerationParser.java 97.5% <100%> (+1.2%) 12 <4> (+2) ⬆️
... and 18 more

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 8c0bad8...e3db4d9. Read the comment docs.

@Krish1979 Krish1979 merged commit ec6df85 into Consensys:master Nov 27, 2018
@Krish1979 Krish1979 deleted the improvement/decouple-key-vault branch November 27, 2018 17:31
@prd-fox prd-fox added enhancement Non-user code enhancements cleanup 0.8 labels Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.8 cleanup enhancement Non-user code enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants