NIFI-9401: HashiCorpVaultParameterProvider#6304
NIFI-9401: HashiCorpVaultParameterProvider#6304gresockj wants to merge 10 commits intoapache:mainfrom
Conversation
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for putting forward this pull request for review @gresockj!
I reviewed the HashiCorp Vault Controller Service and noted several suggestions related to the property configuration, as well as a few other minor adjustments.
...t-service-api/src/main/java/org/apache/nifi/vault/hashicorp/HashiCorpVaultClientService.java
Outdated
Show resolved
Hide resolved
...t-service-api/src/main/java/org/apache/nifi/vault/hashicorp/HashiCorpVaultClientService.java
Outdated
Show resolved
Hide resolved
...t-service-api/src/main/java/org/apache/nifi/vault/hashicorp/HashiCorpVaultClientService.java
Show resolved
Hide resolved
nifi-nar-bundles/nifi-hashicorp-vault-bundle/nifi-hashicorp-vault-client-service/pom.xml
Outdated
Show resolved
Hide resolved
nifi-nar-bundles/nifi-hashicorp-vault-bundle/nifi-hashicorp-vault-client-service/pom.xml
Show resolved
Hide resolved
...-provider/src/main/java/org/apache/nifi/vault/hashicorp/HashiCorpVaultParameterProvider.java
Outdated
Show resolved
Hide resolved
...-provider/src/main/java/org/apache/nifi/vault/hashicorp/HashiCorpVaultParameterProvider.java
Outdated
Show resolved
Hide resolved
...-provider/src/main/java/org/apache/nifi/vault/hashicorp/HashiCorpVaultParameterProvider.java
Show resolved
Hide resolved
...vider/src/test/java/org/apache/nifi/vault/hashicorp/TestHashiCorpVaultParameterProvider.java
Outdated
Show resolved
Hide resolved
...vider/src/test/java/org/apache/nifi/vault/hashicorp/TestHashiCorpVaultParameterProvider.java
Show resolved
Hide resolved
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for the updates @gresockj, briefly noted where Resource References can be used to handle properties files.
| "Environment Configuration documentation (https://docs.spring.io/spring-vault/docs/2.3.x/reference/html/#vault.core.environment-vault-configuration). " + | ||
| "All of the Spring property keys and authentication-specific property keys are supported.") | ||
| .required(true) | ||
| .addValidator(MultiFileExistsValidator.INSTANCE) |
There was a problem hiding this comment.
This should be changed to use the identifiesExternalResource(ResourceCardinality.MULTIPLE, ResourceType.FILE) description to support framework-based resource handling.
...rvice/src/main/java/org/apache/nifi/vault/hashicorp/StandardHashiCorpVaultClientService.java
Outdated
Show resolved
Hide resolved
...-utils/src/main/java/org/apache/nifi/vault/hashicorp/HashiCorpVaultCommunicationService.java
Outdated
Show resolved
Hide resolved
…ng framework Property Resources for Vault Properties Files
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for the updates @gresockj, this looks close to completion. Two additional minor recommendations related to property naming and the unnecessary custom validator.
| */ | ||
| public interface HashiCorpVaultClientService extends ControllerService, VerifiableControllerService { | ||
|
|
||
| AllowableValue DIRECT_PROPERTIES = new AllowableValue("direct-properties", "Direct Properties", |
There was a problem hiding this comment.
What do you think about naming this strategy Service Properties?
...t-service-api/src/main/java/org/apache/nifi/vault/hashicorp/HashiCorpVaultClientService.java
Outdated
Show resolved
Hide resolved
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for the updates @gresockj!
The Controller Service appears to function as designed at runtime, but in the process of building and verifying the NAR bundles, I noticed duplication of nifi-vault-utils and all transitive dependencies in nifi-hashicorp-vault-nar. This highlighted the need to mark nifi-vault-utils as provided in the Controller Service implementation JAR Maven configuration, as well as the in the nifi-hashicorp-vault-parameter-value-provider Maven configuration.
This raised another question, given the fact the nifi-vault-utils contains both the HashiCorpVaultCommunicationService interface and implementation. Providing that as part of a public Controller Service interface makes sense for this design, but it also highlights a need to change the module structure. Moving the Communication Service interface to a separate nifi-hashicorp-vault-api module would provide a clean separation for the purpose of making the interface public. I can help with the implementation if needed.
| <dependency> | ||
| <groupId>org.apache.nifi</groupId> | ||
| <artifactId>nifi-vault-utils</artifactId> | ||
| <version>1.18.0-SNAPSHOT</version> |
There was a problem hiding this comment.
This should be marked with the provided scope since it is included in the vault-client-service-api.
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for working through the feedback @gresockj, the latest version looks good! +1 merging
- Refactored nifi-vault-utils to nifi-hashicorp-vault-api and nifi-hashcorp-vault modules - Added HashiCorpVaultClientService and Standard implementation This closes apache#6304 Signed-off-by: David Handermann <exceptionfactory@apache.org>
|
@gresockj How to configure the truststore and keystore if you have a valid public certificate. The certificate chain should already be known to the JVM via |
Summary
NIFI-9401
This adds a new HashiCorpVaultParameterProvider to fetch parameters from HashiCorpVault.
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000Pull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-checkLicensing
LICENSEandNOTICEfilesDocumentation