Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 5 additions & 114 deletions 10/umbraco-commerce/installation/licensing-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,127 +43,18 @@ If you have multiple backoffice domains pointing at the same installation, you h
This is an add-on domain for existing licenses. Refunds will not be given for this product.
{% endhint %}

## Configuring your license
## Purchasing your license

You can look at the pricing, features, and purchase a license on the [Umbraco Commerce](https://umbraco.com/products/add-ons/commerce/) page. A member of the sales team will manage this process. You will need to provide all domains you wish to have covered by the license such as primary and development/staging/QA domains. You should then receive a license code to be installed in your solution.

### Add additional domains

If you require to add addition domains to the license, [reach out the sales team](https://umbraco.com/products/add-ons/commerce/) with your request and they will manage this process.

## Installing your license

Once you have received your license code it needs to be installed on your site.

1. Open the root directory for your project files.
2. Locate and open the `appSettings.json` file.
3. Add your Umbraco Commerce license key to `Umbraco:Licenses:Umbraco.Commerce`:

```json
"Umbraco": {
"Licenses": {
"Umbraco.Commerce": "YOUR_LICENSE_KEY"
}
}
```

{% hint style="info" %}
You might run into issues when using a period in the product name when using environment variables. Use an underscore in the product name instead, to avoid problems.

```json
"Umbraco_Commerce": "YOUR_LICENSE_KEY"
```
{% endhint %}

### Verify the license installation

You can verify that your license is successfully installed by logging into your project's backoffice and navigating to the settings section. Here you will see a licenses dashboard which should display the status of your license.

![Umbraco Commerce License Dashboard](../media/license-dashboard.png)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This screenshot should be removed if not used elsewhere.


### When and how to configure an `UmbracoApplicationUrl`

If you are running on a single domain for both your frontend and backend environments, it's not necessary to configure a `UmbracoApplicationUrl`.

If you have different domains for your frontend and backend, then it's advised that you configure an `UmbracoApplicationUrl` set to your backoffice URL. This helps the licensing engine know which URL should be used for validation checks. Without this configuration setting, the licensing engine will try and work out the domain to validate from the HTTP request object. This can lead to errors when switching between domains.


An `UmbracoApplicationUrl` can be configured in your `appSettings.json` file like so:

```json
{
"Umbraco": {
"CMS": {
"WebRouting": {
"UmbracoApplicationUrl": "https://admin.my-custom-domain.com/"
}
}
}
}
```

See the [Fixed Application URL](https://docs.umbraco.com/umbraco-cms/extending/health-check/guides/fixedapplicationurl) documentation for more details about this setting.

#### Configuring `UmbracoApplicationUrl` on Umbraco Cloud

If you are hosting on Umbraco Cloud you will find the configuration described above won't be reflected in your environment. The reason for this is that Umbraco Cloud sets this value as an environment variable set to the Cloud project domain (`<your project>.umbraco.io`). This overrides what is set via the `appSettings.json` file.

There are two options in this case:
- Either the domains for each of your Cloud environments can be added to your license.
- Or, for more control and to ensure this value is set correctly for other reasons, you can apply the configuration via code.

For example, in your `Startup.cs` file, you can add the following to the `ConfigureServices` method:

```csharp
services.Configure<WebRoutingSettings>(o => o.UmbracoApplicationUrl = "<your application URL>");
```

In practice, you will probably want to make this a bit more sophisticated. You can read the value from another configuration key, removing the need to hard-code it and have it set as appropriate in different environments. You can also move this code into a composer or an extension method if you prefer not to clutter up the `Startup.ConfigureServices` method.

### Validating a license without an outgoing Internet connection

Some Umbraco installations will have a highly locked down production environment, with firewall rules that prevent outgoing HTTP requests. This will interfere with the normal process of license validation.

On start-up, and periodically whilst Umbraco is running, the license component used by Umbraco Commerce will make an HTTP POST request to `https://license-validation.umbraco.com/api/ValidateLicense`.

If it's possible to do so, the firewall rules should be adjusted to allow this request.

If such a change is not feasible, there is another approach you can use.

You will need to have a server, or serverless function, that is running and can make a request to the online license validation service. That needs to run on a daily schedule, making a request and relaying it onto the restricted Umbraco environment.

To set this up, firstly ensure you have a reference to `Umbraco.Licenses` version 10.1 or higher. If the version of Commerce you are using depends on an earlier version, you can add a direct package reference for `Umbraco.Licenses`.

Then configure a random string as an authorization key in configuration. This is used as protection to ensure only valid requests are handled. You can also disable the normal regular license checks - as there is no point in these running if they will be blocked:

```json
"Umbraco": {
"Licenses": {
"Umbraco.Commerce": "<your license key>"
},
"LicensesOptions": {
"EnableScheduledValidation": false,
"ValidatedLicenseRelayAuthKey": "<your authorization key>"
}
```

Your Internet enabled server should make a request of the following form to the online license validation service:

```
POST https://license-validation.umbraco.com/api/ValidateLicense
{
"ProductId": "Umbraco.Commerce",
"LicenseKey": "<your license key>",
"Domain": "<your licensed domain>"
}
```

The response should be relayed exactly via an HTTP request to your restricted Umbraco environment:
## Configuring your license

```
POST http://<your umbraco environment>/umbraco/licenses/validatedLicense/relay?productId=<product id>&licenseKey=<license key>
```
Once you've purchased your license with the correct domains, you are ready to configure the license key on your Umbraco installation.

A header with a key of `X-AUTH-KEY` and value of the authorization key you have configured should be provided.
The license key should be added to your configuration using product ID: `Umbraco.Commerce`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of only specifying the product ID, should we use the configuration key to use instead? So for Commerce on v10 and v13, this would be Umbraco:Licenses:Umbraco.Commerce and on v14+ Umbraco:Licenses:Products:Umbraco.Commerce.


This will trigger the same processes that occur when the normal scheduled validation completes ensuring your product is considered licensed.
For detailed instructions on how to install and configure your license, including version-specific examples and additional configuration options, see the [Configure Licenses](https://docs.umbraco.com/umbraco-dxp/commercial-products/configure-licenses) article.
78 changes: 5 additions & 73 deletions 10/umbraco-ui-builder/installation/licensing-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,86 +43,18 @@ If you have multiple backoffice domains pointing at the same installation, you c
This is an add-on domain for existing licenses. Refunds will not be given for this product.
{% endhint %}

## Configuring your license
## Purchasing your license

You can look at the pricing, features, and purchase a license on the [Umbraco UI Builder](https://umbraco.com/products/add-ons/ui-builder/) page. On this page, you can fill out the form with your project details and requirements. A member of the Sales team will manage this process. In the process, you will need to provide all domains you wish to have covered by the license such as primary and staging/QA domains. You should then receive a license code to be installed in your solution.

### Add additional domains

If you require to add additional domains to the license, [reach out to the sales team](https://umbraco.com/products/add-ons/ui-builder/). They will manage your request and take care of the process.

## Installing your license

Once you have received your license code it needs to be installed on your site.

1. Open the root directory for your project files.
2. Locate and open the `appSettings.json` file.
3. Add your Umbraco Commerce license key to `Umbraco:Licenses:Umbraco.UIBuilder`:

```json
"Umbraco": {
"Licenses": {
"Umbraco.UIBuilder": "YOUR_LICENSE_KEY"
}
}
```

{% hint style="info" %}
You might run into issues when using a period in the product name when using environment variables. Use an underscore in the product name instead, to avoid problems.

```json
"Umbraco_UIBuilder": "YOUR_LICENSE_KEY"
```
{% endhint %}

### Verify the license installation

You can verify that your license is successfully installed by logging into your project's backoffice and navigating to the settings section. Here you will see a license dashboard which should display the status of your license.

### Validating a license without an outgoing Internet connection

Some Umbraco installations will have a highly locked down production environment, with firewall rules that prevent outgoing HTTP requests. This will interfere with the normal process of license validation.

On start-up, and periodically whilst Umbraco is running, the license component used by Umbraco UIBuilder will make an HTTP POST request to `https://license-validation.umbraco.com/api/ValidateLicense`.

If it's possible to do so, the firewall rules should be adjusted to allow this request.

If such a change is not feasible, there is another approach you can use.

You will need to have a server, or serverless function, that is running and can make a request to the online license validation service. That needs to run on a daily schedule, making a request and relaying it onto the restricted Umbraco environment.

To set this up, firstly ensure you have a reference to `Umbraco.Licenses` version 10.1 or higher. If the version of UIBuilder you are using depends on an earlier version, you can add a direct package reference for `Umbraco.Licenses`.

Then configure a random string as an authorization key in configuration. This is used as protection to ensure only valid requests are handled. You can also disable the normal regular license checks - as there is no point in these running if they will be blocked:

```json
"Umbraco": {
"Licenses": {
"Umbraco.UIBulder": "<your license key>"
},
"LicensesOptions": {
"EnableScheduledValidation": false,
"ValidatedLicenseRelayAuthKey": "<your authorization key>"
}
```

Your Internet enabled server should make a request of the following form to the online license validation service:

```
POST https://license-validation.umbraco.com/api/ValidateLicense
{
"ProductId": "Umbraco.UIBulder",
"LicenseKey": "<your license key>",
"Domain": "<your licensed domain>"
}
```

The response should be relayed exactly via an HTTP request to your restricted Umbraco environment:
## Configuring your license

```
POST http://<your umbraco environment>/umbraco/licenses/validatedLicense/relay?productId=<product id>&licenseKey=<license key>
```
Once you've purchased your license with the correct domains, you are ready to configure the license key on your Umbraco installation.

A header with a key of `X-AUTH-KEY` and value of the authorization key you have configured should be provided.
The license key should be added to your configuration using product ID: `Umbraco.UIBuilder`.

This will trigger the same processes that occur when the normal scheduled validation completes ensuring your product is considered licensed.
For detailed instructions on how to install and configure your license, including version-specific examples and additional configuration options, see the [Configure Licenses](https://docs.umbraco.com/umbraco-dxp/commercial-products/configure-licenses) article.
116 changes: 4 additions & 112 deletions 10/umbraco-workflow/installation/licensing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,73 +24,13 @@ In the free version, the following features are disabled:

In the free version, a maximum of five approval groups can be created.

## Installing your license
## Configuring your license

Once you have received your license code it needs to be installed on your site.
Once you've purchased your license, you are ready to configure the license key on your Umbraco installation.

1. Open the root directory for your project files.
2. Locate and open the `appSettings.json` file.
3. Add your Umbraco Workflow license key to `Umbraco:Licenses:Umbraco.Workflow`:
The license key should be added to your configuration using product ID: `Umbraco.Workflow`.

```json
"Umbraco": {
"Licenses": {
"Umbraco.Workflow": "YOUR_LICENSE_KEY"
}
}
```

{% hint style="info" %}
You might run into issues when using a period in the product name when using environment variables. Use an underscore in the product name instead, to avoid problems.

```json
"Umbraco_Workflow": "YOUR_LICENSE_KEY"
```
{% endhint %}

### Verify the license installation

You can verify that your license is successfully installed by logging into your project's backoffice and navigating to the settings section. Here you will see a licenses dashboard which should display the status of your license.

### When and how to configure an `UmbracoApplicationUrl`

The website domain used for validating the license is determined from your Umbraco instance. To ensure the correct one is used, you can configure the `UmbracoApplicationUrl`.

If you are running on a single domain for both your frontend and backend environments, it's not necessary to configure a `UmbracoApplicationUrl`.

If you have different domains for your frontend and backend, then it's advised that you configure an `UmbracoApplicationUrl` set to your backoffice URL. This helps the licensing engine know which URL should be used for validation checks. Without this configuration setting, the licensing engine will try and work out the domain to validate from the HTTP request object. This can lead to errors when switching between domains.

An `UmbracoApplicationUrl` can be configured in your `appSettings.json` file like so:

```json
{
"Umbraco": {
"CMS": {
"WebRouting": {
"UmbracoApplicationUrl": "https://admin.my-custom-domain.com/"
}
}
}
}
```

See the [Fixed Application URL](https://docs.umbraco.com/umbraco-cms/extending/health-check/guides/fixedapplicationurl) documentation for more details about this setting.

#### Configuring `UmbracoApplicationUrl` on Umbraco Cloud

If you are hosting on Umbraco Cloud you will find the configuration described above won't be reflected in your environment. The reason for this is that Umbraco Cloud sets this value as an environment variable set to the Cloud project domain (`<your project>.umbraco.io`). This overrides what is set via the `appSettings.json` file.

There are two options in this case:
- Either the domains for each of your Cloud environments can be added to your license.
- Or, for more control and to ensure this value is set correctly for other reasons, you can apply the configuration via code.

For example, in your `Startup.cs` file, you can add the following to the `ConfigureServices` method:

```csharp
services.Configure<WebRoutingSettings>(o => o.UmbracoApplicationUrl = "<your application URL>");
```

In practice, you will probably want to make this a bit more sophisticated. You can read the value from another configuration key, removing the need to hard-code it and have it set as appropriate in different environments. You can also move this code into a composer or an extension method if you prefer not to clutter up the `Startup.ConfigureServices` method.
For detailed instructions on how to install and configure your license, including version-specific examples and additional configuration options, see the [Configure Licenses](https://docs.umbraco.com/umbraco-dxp/commercial-products/configure-licenses) article.

### Using a Trial License

Expand All @@ -111,51 +51,3 @@ To impersonate the full license on a local site, set `EnableTestLicense` to `tru
{% hint style="info" %}
The test license is restricted to sites running in a development environment with a debugger attached. Hit F5 in Visual Studio, in Debug mode to enable the test license.
{% endhint %}

### Validating a license without an outgoing Internet connection

Some Umbraco installations will have a highly locked down production environment, with firewall rules that prevent outgoing HTTP requests. This will interfere with the normal process of license validation.

On start-up, and periodically whilst Umbraco is running, the license component used by Umbraco Workflow will make an HTTP POST request to `https://license-validation.umbraco.com/api/ValidateLicense`.

If it's possible to do so, the firewall rules should be adjusted to allow this request.

If such a change is not feasible, there is another approach you can use.

You will need to have a server, or serverless function, that is running and can make a request to the online license validation service. That needs to run on a daily schedule, making a request and relaying it onto the restricted Umbraco environment.

To set this up, firstly ensure you have a reference to `Umbraco.Licenses` version 10.1 or higher. If the version of Workflow you are using depends on an earlier version, you can add a direct package reference for `Umbraco.Licenses`.

Then configure a random string as an authorization key in configuration. This is used as protection to ensure only valid requests are handled. You can also disable the normal regular license checks - as there is no point in these running if they will be blocked:

```json
"Umbraco": {
"Licenses": {
"Umbraco.Workflow": "<your license key>"
},
"LicensesOptions": {
"EnableScheduledValidation": false,
"ValidatedLicenseRelayAuthKey": "<your authorization key>"
}
```

Your Internet enabled server should make a request of the following form to the online license validation service:

```
POST https://license-validation.umbraco.com/api/ValidateLicense
{
"ProductId": "Umbraco.Workflow",
"LicenseKey": "<your license key>",
"Domain": "<your licensed domain>"
}
```

The response should be relayed exactly via an HTTP request to your restricted Umbraco environment:

```
POST http://<your umbraco environment>/umbraco/licenses/validatedLicense/relay?productId=<product id>&licenseKey=<license key>
```

A header with a key of `X-AUTH-KEY` and value of the authorization key you have configured should be provided.

This will trigger the same processes that occur when the normal scheduled validation completes ensuring your product is considered licensed.
Loading