[jira] [Commented] (SOLR-13328) HostnameVerifier in HttpClientBuilder is ignored when HttpClientUtil creates connection

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SOLR-13328) HostnameVerifier in HttpClientBuilder is ignored when HttpClientUtil creates connection

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/SOLR-13328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16793981#comment-16793981 ]

jefferyyuan commented on SOLR-13328:
------------------------------------

Seems Solr 8 removes HostnameVerifier from SolrHttpClientBuilder, so this Jira doesn't apply any more.

> HostnameVerifier in HttpClientBuilder is ignored when HttpClientUtil creates connection
> ---------------------------------------------------------------------------------------
>
>                 Key: SOLR-13328
>                 URL: https://issues.apache.org/jira/browse/SOLR-13328
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public)
>          Components: clients - java
>    Affects Versions: 8.0
>            Reporter: jefferyyuan
>            Priority: Minor
>             Fix For: 8.0.1, 8.1
>
>
> In SolrHttpClientBuilder, we can configure a lot of things including HostnameVerifier.
> We have code like below:
> HttpClientUtil.setHttpClientBuilder(new CommonNameVerifierClientConfigurer());
> CommonNameVerifierClientConfigurer will set our own HostnameVerifier which checks subject dn name.
> But this doesn't work as when we create SSLConnectionSocketFactory at HttpClientUtil.DefaultSchemaRegistryProvider.getSchemaRegistry() we don't check and use HostnameVerifier in SolrHttpClientBuilder at all.
> The fix would be very simple, at HttpClientUtil.DefaultSchemaRegistryProvider.getSchemaRegistry, if HostnameVerifier in SolrHttpClientBuilder is not null, use it, otherwise same logic as before.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]