Configure Solr basic authentication for Commerce Engine indexes

Version: 10.3

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:

  1. Go to the c:\inetpub\<CommerceEngine-service>\wwwroot\data\environments folder and open the PlugIn.Search.Solr.PolicySet-1.0.0.json file.

  2. In the SolrSearchPolicySet block, set values for the following properties:

    Property

    Value

    SolrUrl

    The Sorl URL and the Solr user name and password, in the format shown in the following examples:

    • https://<username>:<password>@<solrUrl>

    Note

    Starting 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).

    Note

    If you are using SolrCloud as a search provider, set this property to "true".

    Important

    In Sitecore XC 10.2, the UseSolrAuthentication, SolrUserName and SolrPassword properties are obsolete, and will be removed in a future release. Use the SorlUrl property instead.

  3. Save your changes to the file.

  4. Bootstrap the Commerce Engine to propagate the new policy information to the global database.

  5. Open IIS Manager and stop and restart all sites to ensure that the new policies take effect.

  6. 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 Items request in the Sitecore Commerce_ DevOps > Minions collection in Postman.

Do you have some feedback for us?

If you have suggestions for improving this article,