Skip to content

Releases: plumber-sc/plumber-sc

Small enhancements

18 Aug 19:14
4f74b18
Compare
Choose a tag to compare

This release adds:

  • A welcome screen and help screens;
  • A different way to filter pipelines and blocks in an effort to make the more discoverable;

Hosted Plumber

20 Jul 10:09
cfb13ff
Compare
Choose a tag to compare

Now you don't have to install Plumber anymore: you can use hosted Plumber: read more about it here: https://commerceservertips.com/dont-install-plumber-use-the-free-hosted-version/

You do need to configure Sitecore Identity Server and configure your Commerce Engines that you want Plumber to have access to.

You can use the Settings dialog in Plumber to change:

  • the url of the engine you are connecting to;
  • the url of the Sitecore Identity Server you are connecting to;
  • the client id you are using when connecting with Identity Server;

Settings dialog in Plumber

Configuring Identity Server for Sitecore Commerce 9 for hosted Plumber

Plumber-sc uses Sitecore Identity Server to get an authentication token, used to authenticate against the commerce engine. You need to add plumber-sc as a client in the configuration of Identity Server.

You can find Identity Server's configuration in the appsettings.json file in the wwwroot folder of Sitecore Identity Server.

Open the file and add the following to the Clients section:

  {
    "ClientId": "Plumber",
    "ClientName": "Plumber",
    "AccessTokenType": 0,
    "AccessTokenLifetimeInSeconds": 3600,
    "IdentityTokenLifetimeInSeconds": 3600,
    "AllowAccessTokensViaBrowser": true,
    "RequireConsent": false,
    "RequireClientSecret": false,
    "AllowedGrantTypes": [
      "implicit"
    ],
    "RedirectUris": [
      "https://vwr.plumber-sc.com/"
    ],
    "PostLogoutRedirectUris": [
      "https://vwr.plumber-sc.com/"
    ],
    "AllowedCorsOrigins": [
      "https://vwr.plumber-sc.com/"
    ],
    "AllowedScopes": [
      "openid",
      "dataEventRecords",
      "dataeventrecordsscope",
      "securedFiles",
      "securedfilesscope",
      "role",
      "EngineAPI"
    ]
  },

This configuration sets up Identity Server to allow authentication from clients authenticating with client id Plumber coming from https://vwr.plumber-sc.com/.

Configuring Identity Server for Sitecore Commerce 9.1 for hosted Plumber

In Sitecore 9.1, Identity Server is used for the whole platform. This brought about a change in the configuration file going from JSON to XML.

You can find Identity Server's configuration in the \Config\production\ folder where Sitecore Identity Server was installed.

Create a new file in this folder called Plumber.IdentityServer.Host.xml and paste the the following xml:

<?xml version="1.0" encoding="utf-8"?>
<Settings>
  <Sitecore>
    <IdentityServer>
      <Clients>
        <PlumberClient>
          <ClientId>Plumber</ClientId>
          <ClientName>Plumber</ClientName>
          <AccessTokenType>0</AccessTokenType>
          <AllowOfflineAccess>true</AllowOfflineAccess>
          <AlwaysIncludeUserClaimsInIdToken>false</AlwaysIncludeUserClaimsInIdToken>
          <AccessTokenLifetimeInSeconds>3600</AccessTokenLifetimeInSeconds>
          <IdentityTokenLifetimeInSeconds>3600</IdentityTokenLifetimeInSeconds>
          <AllowAccessTokensViaBrowser>true</AllowAccessTokensViaBrowser>
          <RequireConsent>false</RequireConsent>
          <RequireClientSecret>false</RequireClientSecret>
          <AllowedGrantTypes>
            <AllowedGrantType1>implicit</AllowedGrantType1>
          </AllowedGrantTypes>
          <RedirectUris>
            <RedirectUri1>{AllowedCorsOrigin}/auth/callback</RedirectUri1>
          </RedirectUris>
          <PostLogoutRedirectUris>
            <PostLogoutRedirectUri1>{AllowedCorsOrigin}</PostLogoutRedirectUri1>
          </PostLogoutRedirectUris>
          <AllowedCorsOrigins>
            <AllowedCorsOrigins1>https://vwr.plumber-sc.com</AllowedCorsOrigins1>
          </AllowedCorsOrigins>
          <AllowedScopes>
            <AllowedScope1>openid</AllowedScope1>
            <AllowedScope2>EngineAPI</AllowedScope2>
            <AllowedScope3>postman_api</AllowedScope3>
          </AllowedScopes>
          <UpdateAccessTokenClaimsOnRefresh>true</UpdateAccessTokenClaimsOnRefresh>
        </PlumberClient>
      </Clients>
    </IdentityServer>
  </Sitecore>
</Settings>

This configuration sets up Identity Server to allow authentication from clients authenticating with client id Plumber coming from https://vwr.plumber-sc.com. If you're running plumber-sc on a different port you need to adjust these settings.

Configuring your commerce engine for hosted Plumber

To configure your engine to allow Plumber, you add plumber-sc as an allowed origin. Open config.json in the wwwroot folder of your commerce engine and add the url of hosted Plumber (https://vwr.plumber-sc.com) to the AllowedOrigins section. It should look something like this:

  "AllowedOrigins": [
      "https://localhost:4200",
      "http://localhost:4200",
      "https://vwr.plumber-sc.com"
  ],

1.1.1: Refactoring and bug fixes (#36)

23 Jun 09:20
dad8acb
Compare
Choose a tag to compare
* Production build was done with incorrect configuration

* Fixed a bug where the block was not shown when you clicked it.

* Refactoring error messages

Pipeline Block code generator

12 May 14:07
Compare
Choose a tag to compare
  • You can now create a code template for adding a block to an existing pipeline:
  • Better error messaging
  • UI Improvements

Pretty types

14 Mar 08:56
Compare
Choose a tag to compare

This release adds pretty types: the type information you get in the OData JSON can be a little difficult to read. This updated prettifies the type information.

Huge thanks to @richardszalay for adding this!

Issue solved:
#11 Cleanup formatting of known types

Policysets

12 Mar 10:23
Compare
Choose a tag to compare

This release adds the ability to view policy sets in the Policies tab.

Searching Pipelines and Blocks

04 Mar 16:27
Compare
Choose a tag to compare

This release improves searching for pipelines and blocks. In previous versions you didn't get to see all the hits on the keyword you entered. I changed the component that provides the typeahead functionality and now this problem is solved.

Fixing an issue with SC9

02 Mar 22:22
Compare
Choose a tag to compare

The last beta introduced an error when you were using SC9. This version fixes that issue.

Support for Sitecore Commerce 8.2.1

28 Feb 11:13
Compare
Choose a tag to compare

This version supports Sitecore Commerce 8.2.1.

Using Plumber with Sitecore Commerce 8.2.1

If you're using SC 8.2.1 there are a couple of things you need to change:

Configuration

  • As 8.2.1 doesn't use Sitecore Identity Server you can leave the IdentityServerUri blank;
  • Because the commerce engine is probably not using https, change the EngineUri to http://localhost:5000

A default config.json will look like this:

{
  "EngineUri": "http://localhost:5000",
  "IdentityServerUri": "",
  "ClientId": "Plumber",
  "PlumberUri": "http://localhost:8080"
}

Adding CORS support to your engine

As Plumber is doing a cross-site request you need to enable CORS support in your commerce engine, which means you will need to rebuild and deploy it.

To add CORS support do the following:

In the Sitecore.Commerce.Engine project change the following in startup.cs:

  • In the ConfigureServices method add the following line:
    services.AddCors();

  • In the Configure method add the following line:
    app.UseCors(builder => builder.WithOrigins("http://localhost:8080").AllowCredentials().AllowAnyHeader().AllowAnyMethod());

1.0-beta

21 Feb 15:00
Compare
Choose a tag to compare
v1.0 beta