Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for BasicAuthentication with jks certificate enabled #327

Open
Kund08 opened this issue Jul 28, 2021 · 1 comment
Open

Support for BasicAuthentication with jks certificate enabled #327

Kund08 opened this issue Jul 28, 2021 · 1 comment

Comments

@Kund08
Copy link

Kund08 commented Jul 28, 2021

I can see we have support for basic authentication in spark-solr with -Dbasicauth=solr:SolrRocks option set in executor and driver java args.
our solr has got basic authentication enabled with certificate.
The process we follow to connect to this solr instance using solrJ client is by setting:
spark.executor.extraJavaOptions=-Djavax.net.ssl.trustStoreType=jks -Djavax.net.ssl.trustStore=clientTrustStore.jks -Djavax.net.ssl.trustStorePassword=password

and

spark.driver.extraJavaOptions=-Djavax.net.ssl.trustStoreType=jks -Djavax.net.ssl.trustStore=clientTrustStore.jks -Djavax.net.ssl.trustStorePassword=password

and setting userName and password while creating solrClient Object in code.
This way we are able to connect via solrJ.

Now while connecting to this solr instance using spark-solr, we do not have option to add userName and password via code, so we pass one extra argument -Dbasicauth=solr:SolrRocks in spark.driver.extraJavaOptions and spark.executor.extraJavaOptions. But doing this is not working and we are getting Error 403 Unauthorized request, Response code: 403 while doing dateFrame.write.format("solr").

Can we get some help on this.

@eswara-prasad-tm
Copy link

Can you give little more detail about the Spark Version, Solr Version?. You are connecting to Zookeeper/Solr Endpoint?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants