I have more progress since my last mail. I figured out that in the
StreamContext object there is a way to set the SolrClientCache object which
keep reference to all the CloudSolrClient where I can set a reference to
HttpClient which sets the Basic Auth header. However the problem is, inside the
SolrClientCache there is no way to set your own version of CloudSolrClient with
BasicAuth enabled. Unfortunately, SolrClientCache has no set method which takes
a CloudSolrClient object.
So long story short we need an API in SolrClientCache to accept CloudSolrClient
object from user.
Please let me know if there is a better way to enable Basic Auth when using
StreamFactory as mentioned in my previous email.
Thanks much,Sandeep
On Wednesday, November 9, 2016 11:44 AM, sandeep mukherjee
<[email protected]> wrote:
Hello everyone,
I trying to find the documentation for Basic Auth plugin for Solr Streaming
expressions. But I'm not able to find it in the documentation anywhere. Could
you please point me in right direction of how to enable Basic auth for Solr
Streams?
I'm creating StreamFactory as follows: I wonder how and where can I specify
Basic Auth username and password
@Bean
public StreamFactory streamFactory() {
SolrConfig solrConfig = ConfigManager.getNamedConfig("solr",
SolrConfig.class);
return new StreamFactory().withDefaultZkHost(solrConfig.getConnectString())
.withFunctionName("gatherNodes", GatherNodesStream.class);
}