Skip to content

Commit 9b94bc8

Browse files
Centralize license configuration
1 parent 155cc38 commit 9b94bc8

File tree

21 files changed

+310
-1903
lines changed

21 files changed

+310
-1903
lines changed

10/umbraco-commerce/installation/licensing-model.md

Lines changed: 5 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -43,127 +43,18 @@ If you have multiple backoffice domains pointing at the same installation, you h
4343
This is an add-on domain for existing licenses. Refunds will not be given for this product.
4444
{% endhint %}
4545

46-
## Configuring your license
46+
## Purchasing your license
4747

4848
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.
4949

5050
### Add additional domains
5151

5252
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.
5353

54-
## Installing your license
55-
56-
Once you have received your license code it needs to be installed on your site.
57-
58-
1. Open the root directory for your project files.
59-
2. Locate and open the `appSettings.json` file.
60-
3. Add your Umbraco Commerce license key to `Umbraco:Licenses:Umbraco.Commerce`:
61-
62-
```json
63-
"Umbraco": {
64-
"Licenses": {
65-
"Umbraco.Commerce": "YOUR_LICENSE_KEY"
66-
}
67-
}
68-
```
69-
70-
{% hint style="info" %}
71-
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.
72-
73-
```json
74-
"Umbraco_Commerce": "YOUR_LICENSE_KEY"
75-
```
76-
{% endhint %}
77-
78-
### Verify the license installation
79-
80-
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.
81-
82-
![Umbraco Commerce License Dashboard](../media/license-dashboard.png)
83-
84-
### When and how to configure an `UmbracoApplicationUrl`
85-
86-
If you are running on a single domain for both your frontend and backend environments, it's not necessary to configure a `UmbracoApplicationUrl`.
87-
88-
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.
89-
90-
91-
An `UmbracoApplicationUrl` can be configured in your `appSettings.json` file like so:
92-
93-
```json
94-
{
95-
"Umbraco": {
96-
"CMS": {
97-
"WebRouting": {
98-
"UmbracoApplicationUrl": "https://admin.my-custom-domain.com/"
99-
}
100-
}
101-
}
102-
}
103-
```
104-
105-
See the [Fixed Application URL](https://docs.umbraco.com/umbraco-cms/extending/health-check/guides/fixedapplicationurl) documentation for more details about this setting.
106-
107-
#### Configuring `UmbracoApplicationUrl` on Umbraco Cloud
108-
109-
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.
110-
111-
There are two options in this case:
112-
- Either the domains for each of your Cloud environments can be added to your license.
113-
- Or, for more control and to ensure this value is set correctly for other reasons, you can apply the configuration via code.
114-
115-
For example, in your `Startup.cs` file, you can add the following to the `ConfigureServices` method:
116-
117-
```csharp
118-
services.Configure<WebRoutingSettings>(o => o.UmbracoApplicationUrl = "<your application URL>");
119-
```
120-
121-
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.
122-
123-
### Validating a license without an outgoing Internet connection
124-
125-
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.
126-
127-
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`.
128-
129-
If it's possible to do so, the firewall rules should be adjusted to allow this request.
130-
131-
If such a change is not feasible, there is another approach you can use.
132-
133-
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.
134-
135-
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`.
136-
137-
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:
138-
139-
```json
140-
"Umbraco": {
141-
"Licenses": {
142-
"Umbraco.Commerce": "<your license key>"
143-
},
144-
"LicensesOptions": {
145-
"EnableScheduledValidation": false,
146-
"ValidatedLicenseRelayAuthKey": "<your authorization key>"
147-
}
148-
```
149-
150-
Your Internet enabled server should make a request of the following form to the online license validation service:
151-
152-
```
153-
POST https://license-validation.umbraco.com/api/ValidateLicense
154-
{
155-
"ProductId": "Umbraco.Commerce",
156-
"LicenseKey": "<your license key>",
157-
"Domain": "<your licensed domain>"
158-
}
159-
```
160-
161-
The response should be relayed exactly via an HTTP request to your restricted Umbraco environment:
54+
## Configuring your license
16255

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

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

169-
This will trigger the same processes that occur when the normal scheduled validation completes ensuring your product is considered licensed.
60+
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.

10/umbraco-ui-builder/installation/licensing-model.md

Lines changed: 5 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -43,86 +43,18 @@ If you have multiple backoffice domains pointing at the same installation, you c
4343
This is an add-on domain for existing licenses. Refunds will not be given for this product.
4444
{% endhint %}
4545

46-
## Configuring your license
46+
## Purchasing your license
4747

4848
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.
4949

5050
### Add additional domains
5151

5252
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.
5353

54-
## Installing your license
55-
56-
Once you have received your license code it needs to be installed on your site.
57-
58-
1. Open the root directory for your project files.
59-
2. Locate and open the `appSettings.json` file.
60-
3. Add your Umbraco Commerce license key to `Umbraco:Licenses:Umbraco.UIBuilder`:
61-
62-
```json
63-
"Umbraco": {
64-
"Licenses": {
65-
"Umbraco.UIBuilder": "YOUR_LICENSE_KEY"
66-
}
67-
}
68-
```
69-
70-
{% hint style="info" %}
71-
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.
72-
73-
```json
74-
"Umbraco_UIBuilder": "YOUR_LICENSE_KEY"
75-
```
76-
{% endhint %}
77-
78-
### Verify the license installation
79-
80-
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.
81-
82-
### Validating a license without an outgoing Internet connection
83-
84-
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.
85-
86-
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`.
87-
88-
If it's possible to do so, the firewall rules should be adjusted to allow this request.
89-
90-
If such a change is not feasible, there is another approach you can use.
91-
92-
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.
93-
94-
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`.
95-
96-
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:
97-
98-
```json
99-
"Umbraco": {
100-
"Licenses": {
101-
"Umbraco.UIBulder": "<your license key>"
102-
},
103-
"LicensesOptions": {
104-
"EnableScheduledValidation": false,
105-
"ValidatedLicenseRelayAuthKey": "<your authorization key>"
106-
}
107-
```
108-
109-
Your Internet enabled server should make a request of the following form to the online license validation service:
110-
111-
```
112-
POST https://license-validation.umbraco.com/api/ValidateLicense
113-
{
114-
"ProductId": "Umbraco.UIBulder",
115-
"LicenseKey": "<your license key>",
116-
"Domain": "<your licensed domain>"
117-
}
118-
```
119-
120-
The response should be relayed exactly via an HTTP request to your restricted Umbraco environment:
54+
## Configuring your license
12155

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

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

128-
This will trigger the same processes that occur when the normal scheduled validation completes ensuring your product is considered licensed.
60+
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.

10/umbraco-workflow/installation/licensing.md

Lines changed: 4 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -24,73 +24,13 @@ In the free version, the following features are disabled:
2424

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

27-
## Installing your license
27+
## Configuring your license
2828

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

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

35-
```json
36-
"Umbraco": {
37-
"Licenses": {
38-
"Umbraco.Workflow": "YOUR_LICENSE_KEY"
39-
}
40-
}
41-
```
42-
43-
{% hint style="info" %}
44-
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.
45-
46-
```json
47-
"Umbraco_Workflow": "YOUR_LICENSE_KEY"
48-
```
49-
{% endhint %}
50-
51-
### Verify the license installation
52-
53-
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.
54-
55-
### When and how to configure an `UmbracoApplicationUrl`
56-
57-
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`.
58-
59-
If you are running on a single domain for both your frontend and backend environments, it's not necessary to configure a `UmbracoApplicationUrl`.
60-
61-
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.
62-
63-
An `UmbracoApplicationUrl` can be configured in your `appSettings.json` file like so:
64-
65-
```json
66-
{
67-
"Umbraco": {
68-
"CMS": {
69-
"WebRouting": {
70-
"UmbracoApplicationUrl": "https://admin.my-custom-domain.com/"
71-
}
72-
}
73-
}
74-
}
75-
```
76-
77-
See the [Fixed Application URL](https://docs.umbraco.com/umbraco-cms/extending/health-check/guides/fixedapplicationurl) documentation for more details about this setting.
78-
79-
#### Configuring `UmbracoApplicationUrl` on Umbraco Cloud
80-
81-
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.
82-
83-
There are two options in this case:
84-
- Either the domains for each of your Cloud environments can be added to your license.
85-
- Or, for more control and to ensure this value is set correctly for other reasons, you can apply the configuration via code.
86-
87-
For example, in your `Startup.cs` file, you can add the following to the `ConfigureServices` method:
88-
89-
```csharp
90-
services.Configure<WebRoutingSettings>(o => o.UmbracoApplicationUrl = "<your application URL>");
91-
```
92-
93-
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.
33+
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.
9434

9535
### Using a Trial License
9636

@@ -111,51 +51,3 @@ To impersonate the full license on a local site, set `EnableTestLicense` to `tru
11151
{% hint style="info" %}
11252
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.
11353
{% endhint %}
114-
115-
### Validating a license without an outgoing Internet connection
116-
117-
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.
118-
119-
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`.
120-
121-
If it's possible to do so, the firewall rules should be adjusted to allow this request.
122-
123-
If such a change is not feasible, there is another approach you can use.
124-
125-
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.
126-
127-
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`.
128-
129-
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:
130-
131-
```json
132-
"Umbraco": {
133-
"Licenses": {
134-
"Umbraco.Workflow": "<your license key>"
135-
},
136-
"LicensesOptions": {
137-
"EnableScheduledValidation": false,
138-
"ValidatedLicenseRelayAuthKey": "<your authorization key>"
139-
}
140-
```
141-
142-
Your Internet enabled server should make a request of the following form to the online license validation service:
143-
144-
```
145-
POST https://license-validation.umbraco.com/api/ValidateLicense
146-
{
147-
"ProductId": "Umbraco.Workflow",
148-
"LicenseKey": "<your license key>",
149-
"Domain": "<your licensed domain>"
150-
}
151-
```
152-
153-
The response should be relayed exactly via an HTTP request to your restricted Umbraco environment:
154-
155-
```
156-
POST http://<your umbraco environment>/umbraco/licenses/validatedLicense/relay?productId=<product id>&licenseKey=<license key>
157-
```
158-
159-
A header with a key of `X-AUTH-KEY` and value of the authorization key you have configured should be provided.
160-
161-
This will trigger the same processes that occur when the normal scheduled validation completes ensuring your product is considered licensed.

0 commit comments

Comments
 (0)