5

I try to setup Sitecore commerce 8.2.1 using the steps in the documentation by sitecore (http://commercesdn.sitecore.net/SitecoreCommerce/DevOpsGuide/en-us/index.html).

If the Commerce Authoring Service, wants to connect to Sitecore, a connection is always set up via SSL.

Connection, observed with fiddler

Connection, observed with fiddler

The Connector use always SSL

The Connector (Sitecore.Commerce.Plugin.Management.SitecoreConnectionManager) use static https.

public static HttpResponseMessage ProcessRequest(SitecoreConnectionPolicy connectionPolicy, string action, string method, ItemModel itemModel)
{
    Uri baseAddress = new Uri(string.Format("https://{0}", connectionPolicy.Host));
    using (HttpClient httpClient = new HttpClient{BaseAddress = baseAddress})
    {
        ...
    }
    ...
}

So, the Commerce Authoring Service, will only work, if Sitecore runs with SSL.

For PROD environments, this is this fine. But, for DEV environment, we would like run Sitecore without SSL.

Is it possible to change this connector from https to http?

1 Answer 1

2

My suggestion would be to generate a self-signed certificate for DEV environment.

As you've mentioned in question description Sitecore.Commerce.Plugin.Management.SitecoreConnectionManager uses https in its source code. This class is widely used to access Sitecore items from Commerce Engine. SitecoreConnectionManager uses Sitecore.Services.Client (SSC) to get information from Sitecore. To send API requests to SSC SitecoreConnectionManager first sends request for authentication to sitecore/api/ssc/auth/login endpoint that is available only over https:

You must make requests to auth/login over HTTPS.

Note that Commerce Engine uses credentials from SitecoreConnectionPolicy to integrate with SSC. E.g.:

{
    "$type": "Sitecore.Commerce.Plugin.Management.SitecoreConnectionPolicy, Sitecore.Commerce.Plugin.Management",
    "Host": "retail.dev.local",
    "SitecoreDatabase": "master",
    "UserName": "CommerceEngineUser",
    "Domain": "sitecore",
    "Password": "demopass",
    "PolicyId": "a12d609f37124c4fb9007519a8e18b69",
    "Models": {
        "$type": "System.Collections.Generic.List`1[[Sitecore.Commerce.Core.Model, Sitecore.Commerce.Core]], mscorlib",
        "$values": [

        ]
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.