Github user alopresto commented on the issue:
https://github.com/apache/nifi/pull/2919
This PR removes the locally-defined inner class `NiFiHostnameVerifier` from
`NiFiClientFactory` and adds unit tests but does not cover the class
[`org.apache.nifi.web.util.NiFiHostnameVerifier`](https://github.com/apache/nifi/blob/master/nifi-commons/nifi-web-utils/src/main/java/org/apache/nifi/web/util/NiFiHostnameVerifier.java#L18)
which is used in
[`org.apache.nifi.web.util.WebUtils#createClientHelper()`](https://github.com/apache/nifi/blob/master/nifi-commons/nifi-web-utils/src/main/java/org/apache/nifi/web/util/WebUtils.java#L98).
Please remove that class entirely and instantiate a
`org.apache.http.conn.ssl.DefaultHostnameVerifier` in
`WebUtils#createClientHelper()` and verify that the calling references (uses of
`WebUtils#createClient(ClientConfig)` and `WebUtils#createClient(ClientConfig,
SSLContext)` listed below) continue to work properly (i.e. add unit tests &
regression tests for edge case hostnames).
```
Method
createClient(ClientConfig, SSLContext)
Found usages (5 usages found)
Unclassified usage (5 usages found)
nifi-confluent-schema-registry-service (1 usage found)
org.apache.nifi.confluent.schemaregistry.client (1 usage found)
RestSchemaRegistryClient (1 usage found)
RestSchemaRegistryClient(List<String>, int, SSLContext,
ComponentLog) (1 usage found)
77 client = WebUtils.createClient(clientConfig,
sslContext);
nifi-framework-core (1 usage found)
org.apache.nifi.remote (1 usage found)
RemoteNiFiUtils (1 usage found)
getClient(SSLContext) (1 usage found)
50 client = WebUtils.createClient(clientConfig,
sslContext);
nifi-web-api (2 usages found)
org.apache.nifi.integration.accesscontrol (1 usage found)
ITAccessTokenEndpoint (1 usage found)
setup() (1 usage found)
88 final Client client =
WebUtils.createClient(null, createTrustContext(props));
org.apache.nifi.integration.util (1 usage found)
NiFiTestServer (1 usage found)
getClient() (1 usage found)
170 return WebUtils.createClient(null,
SslContextFactory.createSslContext(properties));
nifi-web-security (1 usage found)
org.apache.nifi.web.security.x509.ocsp (1 usage found)
OcspCertificateValidator (1 usage found)
OcspCertificateValidator(NiFiProperties) (1 usage
found)
110 client = WebUtils.createClient(clientConfig,
SslContextFactory.createSslContext(properties));
```
```
Method
createClient(ClientConfig)
Found usages (3 usages found)
Unclassified usage (3 usages found)
nifi-framework-core (1 usage found)
org.apache.nifi.remote (1 usage found)
RemoteNiFiUtils (1 usage found)
getClient(SSLContext) (1 usage found)
48 client = WebUtils.createClient(clientConfig);
nifi-web-security (1 usage found)
org.apache.nifi.web.security.x509.ocsp (1 usage found)
OcspCertificateValidator (1 usage found)
OcspCertificateValidator(NiFiProperties) (1 usage
found)
112 client = WebUtils.createClient(clientConfig);
nifi-yandex-processors (1 usage found)
org.apache.nifi.processors.yandex (1 usage found)
YandexTranslate (1 usage found)
onScheduled(ProcessContext) (1 usage found)
201 client = WebUtils.createClient(null);
```
---