Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-13328

HostnameVerifier in HttpClientBuilder is ignored when HttpClientUtil creates connection

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • 8.0
    • None
    • clients - java
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            yuanyun.cn jefferyyuan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: