You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Rajiv Bandi <ra...@gmail.com> on 2023/01/04 13:18:51 UTC

Example usage for Kerberos authentication for SolrJ 9.1

Hi All,
         Wish you all a very happy new year.

I am trying to upgrade my SolrJ client from 8.11 to 9.1 .
My usecase is to connect to a Kerberos authenticated SolR cluster.
I see that the current Krb5HttpClientBuilder class has been deprecated in
Solr 9.1

I am unable to find an updated 9.1 example code for this scenario.

SolrJ 8.11.x code

System.setProperty("java.security.krb5.conf", <path_to_krb5_conf>);
System.setProperty("java.security.auth.login.config",
<path_to_jaas-client_conf>);

HttpClientUtil.setHttpClientBuilder(new
Krb5HttpClientBuilder().getBuilder());

secureSolrClient = new LBHttpSolrClient.Builder()
.withBaseSolrUrls(solr_urls_list)
.build();

Thank you

Rajiv Bandi

Re: Example usage for Kerberos authentication for SolrJ 9.1

Posted by Rajiv Bandi <ra...@gmail.com>.
Thanks Kevin.

I intend to move to the new HTTP2 classes but could not find an equivalent
of this code
HttpClientUtil.setHttpClientBuilder(new
Krb5HttpClientBuilder().getBuilder());

I was hoping someone could point me in the right direction.

Thank you

Rajiv Bandi


On Thu, Jan 5, 2023 at 12:22 AM Kevin Risden <kr...@apache.org> wrote:

> The deprecation came in as part of
> https://issues.apache.org/jira/browse/SOLR-15223 (commit
> https://github.com/apache/solr/commit/77921bab52f5)
>
> The idea being to use the newer LBHttp2SolrClient and other classes instead
> of the older HttpClient classes. In the short term using
> Krb5HttpClientBuilder / LBHttpSolrClient is fine, but it would be helpful
> if you figure out how to use the Http2 classes to share what you learn.
>
> Kevin Risden
>
>
> On Wed, Jan 4, 2023 at 8:27 AM Rajiv Bandi <ra...@gmail.com> wrote:
>
> > Hi All,
> >          Wish you all a very happy new year.
> >
> > I am trying to upgrade my SolrJ client from 8.11 to 9.1 .
> > My usecase is to connect to a Kerberos authenticated SolR cluster.
> > I see that the current Krb5HttpClientBuilder class has been deprecated in
> > Solr 9.1
> >
> > I am unable to find an updated 9.1 example code for this scenario.
> >
> > SolrJ 8.11.x code
> >
> > System.setProperty("java.security.krb5.conf", <path_to_krb5_conf>);
> > System.setProperty("java.security.auth.login.config",
> > <path_to_jaas-client_conf>);
> >
> > HttpClientUtil.setHttpClientBuilder(new
> > Krb5HttpClientBuilder().getBuilder());
> >
> > secureSolrClient = new LBHttpSolrClient.Builder()
> > .withBaseSolrUrls(solr_urls_list)
> > .build();
> >
> > Thank you
> >
> > Rajiv Bandi
> >
>

Re: Example usage for Kerberos authentication for SolrJ 9.1

Posted by Kevin Risden <kr...@apache.org>.
The deprecation came in as part of
https://issues.apache.org/jira/browse/SOLR-15223 (commit
https://github.com/apache/solr/commit/77921bab52f5)

The idea being to use the newer LBHttp2SolrClient and other classes instead
of the older HttpClient classes. In the short term using
Krb5HttpClientBuilder / LBHttpSolrClient is fine, but it would be helpful
if you figure out how to use the Http2 classes to share what you learn.

Kevin Risden


On Wed, Jan 4, 2023 at 8:27 AM Rajiv Bandi <ra...@gmail.com> wrote:

> Hi All,
>          Wish you all a very happy new year.
>
> I am trying to upgrade my SolrJ client from 8.11 to 9.1 .
> My usecase is to connect to a Kerberos authenticated SolR cluster.
> I see that the current Krb5HttpClientBuilder class has been deprecated in
> Solr 9.1
>
> I am unable to find an updated 9.1 example code for this scenario.
>
> SolrJ 8.11.x code
>
> System.setProperty("java.security.krb5.conf", <path_to_krb5_conf>);
> System.setProperty("java.security.auth.login.config",
> <path_to_jaas-client_conf>);
>
> HttpClientUtil.setHttpClientBuilder(new
> Krb5HttpClientBuilder().getBuilder());
>
> secureSolrClient = new LBHttpSolrClient.Builder()
> .withBaseSolrUrls(solr_urls_list)
> .build();
>
> Thank you
>
> Rajiv Bandi
>