Configure Solr basic authentication for Commerce Engine indexes
Commerce Engine indexes support basic Solr authentication for search within the Sitecore XC Business Tools.
Because Commerce Engine indexes typically use the same Solr instance as the Platfom indexes, you must ensure you have configured Sitecore XP to use basic authentication when making a Solr request.
The following steps assume that you have a user set up in Solr. For more information, refer to the Solr documentation.
To enable Solr basic authentication for Commerce Engine indexes:
-
Go to the
c:\inetpub\<CommerceEngine-service>\wwwroot\data\environmentsfolder and open thePlugIn.Search.Solr.PolicySet-1.0.0.jsonfile. -
In the
SolrSearchPolicySetblock, set values for the following properties:Property
Value
SolrUrlThe Sorl URL and the Solr user name and password, in the format shown in the following examples:
-
https://<username>:<password>@<solrUrl>
NoteStarting with Sitecore XC 10.2, Solr authentication configuration is similar to the way it is configured in Sitecore XP, where the connection string includes the credentials for Solr authentication.
IsSolrCloud"false"(default).NoteIf you are using SolrCloud as a search provider, set this property to
"true".ImportantIn Sitecore XC 10.2, the
UseSolrAuthentication,SolrUserNameandSolrPasswordproperties are obsolete, and will be removed in a future release. Use theSorlUrlproperty instead. -
-
Save your changes to the file.
-
Bootstrap the Commerce Engine to propagate the new policy information to the global database.
-
Open IIS Manager and stop and restart all sites to ensure that the new policies take effect.
-
Launch the Business tools application in a browser, and confirm that you can search for a product successfully. If you do not have indexed products available, run the full index minion for catalog items, using the
Run FullIndex Minion - Catalog Itemsrequest in the Sitecore Commerce_ DevOps > Minions collection in Postman.