> For the complete documentation index, see [llms.txt](https://docs.soraco.co/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.soraco.co/docs/faq/how-to-update-the-communicationencryptionkey-and-adminencryptionkey.md).

# How to update the CommunicationEncryptionKey and AdminEncryptionKey

The QLM API uses an encryption mechanism for communicating with the License Server to prevent unauthorized access to the License Server API.

This encryption mechanism relies on 2 encryption keys: the CommunicationEncryptionKey (CEK) and AdminEncryptionKey (AEK).

When you install the QLM License Server on your system, the CEK and AEK values are set to some default values. Before you go live, it is highly recommended that you change the default values to prevent unauthorized access to your License Server.

{% hint style="info" %}
You should also change the default password of the DB user. To do so, change the password in SQL Server Management Studio and then update the ConnectionStrings/DefaultConnection in the appsettings.json of each service. For more details, [click here](/docs/faq/how-to-update-the-password-of-the-db-user.md).
{% endhint %}

To change these values, follow the steps below.

### QLM v20

**A. Generate new values for CEK and AEK**

* Go to Manage Keys / Sites and select your site
* Go to the Encryption Keys tab
* Click Unmask for both fields
* Click New for both fields to generate 2 new keys
* Click Ok

**B. Change the appsettings.json files**

* On the server where you installed the QLM License Server
* Edit the appsettings.json file of the QlmLicenseServerNetCore
* Replace all occurences of the communicationEncryptionKey and adminEncryptionKey with the values created above.
* Repeat the same steps for the appsettings.json file of QlmCustomerSiteNetCore, QlmPortalNetCore, and QlmCustomerPortalNetCore/qlm-portal-api

**C. Update your protected application**

* In the Protect Your App wizard, step through the wizard again.
* On the "Customize the look and feel page", locate the QlmCommunicationEncryptionKey property and update it based on the new value.
* Complete the wizard to regenerate the files required by your application and update your app with the new files.
* Review your code and update any occurrence of QlmLicense.CommunicationEncryptionKey and QlmLicense.AdminEncryptionKey to match the new values.

### QLM v19 and earlier

**A. Generate new values for CEK and AEK**

* Go to Manage Keys / Sites and select your site
* Go to the Encryption Keys tab
* Click Unmask for both fields
* Click New for both fields to generate 2 new keys
* Click Ok

**B. Change the web.config files**

* On the server where you installed the QLM License Server
* Edit the web.config file of the QlmLicenseServer
* Replace all occurences of the communicationEncryptionKey and adminEncryptionKey with the values created above.
* Repeat the same steps for the web.config file of QlmCustomerSite and QlmPortal if needed.

**C. Update your protected application**

* In the Protect Your App wizard, step through the wizard again.
* On the "Customize the look and feel page", locate the QlmCommunicationEncryptionKey property and update it based on the new value.
* Complete the wizard to regenerate the files required by your application and update your app with the new files.
* Review your code and update any occurrence of QlmLicense.CommunicationEncryptionKey and QlmLicense.AdminEncryptionKey to match the new values.
