Monday, November 4, 2019

Sitecore Experience Commerce 9.2 how to protect the Solr admin page





Sitecore commerce latest release 9.2 does support the authentication plugin for the Solr, It's very interesting and I'm very excited to see this option there and would thanks to Sitecore for including this option :)

Here is the full context.

If you first-time setup the Solr - Standalone or Solr cloud there wouldn't be any by default security option available, you have to explicitly turn on this feature. and to do that there are a few options -

Available Authentication Plugins within Solr

Solr has the following implementations of authentication plugins:
Available Authorization Plugins within Solr
Solr has one implementation of an authorization plugin:
Now, How we can use this option in Sitecore Commerce 9.2, I have been using and extending Solr.Net for more than 4 years now and happy to see that you can extend this within Sitecore. Basically, we can control how Sitecore communicates with Solr by specifying the implementation of the IHttpWebRequestFactory interface of SolrNet that Sitecore uses.
We can specify the implementation by patching the Sitecore.ContentSearch.DefaultSolrConfiguration.config file. 

The factory class for Solr HTTP requests is in the  node.
for example, If we want to support basic authentication for accessing Solr, We must specify the solrHttpWebRequestFactory value in the following way:


solrHttpWebRequestFactory type="HttpWebAdapters.BasicAuthHttpWebRequestFactory, SolrNet">
  USERNAME
  PASSWORD




That's easy right :)

No comments:

Post a Comment