This is an automated email from the ASF dual-hosted git repository.
exceptionfactory pushed a commit to branch support/nifi-1.x
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/support/nifi-1.x by this push:
new 0e4b33ce4c NIFI-13025 Removed custom validation from
NifiRegistryFlowRegistryClient
0e4b33ce4c is described below
commit 0e4b33ce4c7db001d746fc61b94170752fd67987
Author: Pierre Villard <[email protected]>
AuthorDate: Thu Apr 11 09:26:53 2024 +0200
NIFI-13025 Removed custom validation from NifiRegistryFlowRegistryClient
- NiFi Registry REST API enforces TLS handshake requirements
This closes #8629
Signed-off-by: David Handermann <[email protected]>
(cherry picked from commit cc7af91f97dd1844cc6c8d30bd47d6865cb20aaa)
---
.../flow/NifiRegistryFlowRegistryClient.java | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git
a/nifi-nar-bundles/nifi-flow-registry-client-bundle/nifi-flow-registry-client-services/src/main/java/org/apache/nifi/registry/flow/NifiRegistryFlowRegistryClient.java
b/nifi-nar-bundles/nifi-flow-registry-client-bundle/nifi-flow-registry-client-services/src/main/java/org/apache/nifi/registry/flow/NifiRegistryFlowRegistryClient.java
index 8b7a45c801..03ee9ae3b0 100644
---
a/nifi-nar-bundles/nifi-flow-registry-client-bundle/nifi-flow-registry-client-services/src/main/java/org/apache/nifi/registry/flow/NifiRegistryFlowRegistryClient.java
+++
b/nifi-nar-bundles/nifi-flow-registry-client-bundle/nifi-flow-registry-client-services/src/main/java/org/apache/nifi/registry/flow/NifiRegistryFlowRegistryClient.java
@@ -17,8 +17,6 @@
package org.apache.nifi.registry.flow;
import org.apache.nifi.components.PropertyDescriptor;
-import org.apache.nifi.components.ValidationContext;
-import org.apache.nifi.components.ValidationResult;
import org.apache.nifi.flow.VersionedFlowCoordinates;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.registry.bucket.Bucket;
@@ -40,8 +38,6 @@ import javax.net.ssl.SSLContext;
import java.io.IOException;
import java.net.URI;
import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
@@ -127,23 +123,6 @@ public class NifiRegistryFlowRegistryClient extends
AbstractFlowRegistryClient {
this.registryClient = null;
}
- protected Collection<ValidationResult> customValidate(final
ValidationContext context) {
- final Collection<ValidationResult> result = new HashSet<>();
- if (context.getProperty(SSL_CONTEXT_SERVICE).isSet()) {
- final SSLContextService sslContextService =
context.getProperty(SSL_CONTEXT_SERVICE).asControllerService(SSLContextService.class);
-
-
- if (sslContextService.isTrustStoreConfigured() ^
sslContextService.isKeyStoreConfigured()) {
- result.add(new
ValidationResult.Builder().subject(this.getClass().getSimpleName())
- .valid(false)
- .explanation("It is expected to either set all the
properties for the SSLContext or set none")
- .build());
- }
- }
-
- return result;
- }
-
private String extractIdentity(final
FlowRegistryClientConfigurationContext context) {
return context.getNiFiUserIdentity().orElse(null);
}