Upgrade Identity Server
Encrypted Communication with SQL Server
Applicable only to upgrades from Identity Server versions prior to 8.x.
Starting from version 8.0, Sitecore Identity Server requires encrypted communication with SQL Server by default. This change is due to the adoption of a newer version of Microsoft.Data.SqlClient that enforces stricter security measures, as described in Microsoft’s Breaking changes in EF Core 7.0 article.
Before installing Sitecore Identity Server or upgrading to the newest version, ensure the following steps are completed:
-
Configure an encryption certificate for the SQL Server: A valid encryption certificate must be installed and configured on SQL Server to support encrypted communication. For more information, refer to Microsoft’s Configure SQL Server Database Engine for encrypting connections article.
-
Ensure the certificate is trusted on the server hosting Sitecore Identity Server
-
[Optional] Enforce Sitecore Identity Server to use an encrypted connection to SQL Server. Update the connection string of the security database for Sitecore Identity Server to add the following parameters:
For example:
This configuration ensures encrypted communication with SQL Server while enforcing strict certificate validation.
Alternative Configuration: SQL Server-Generated Self-Signed Certificates
To simplify the installation process for a non-production deployment, you can skip configuring an encryption certificate for SQL Server. If the certificate is not explicitly configured, SQL Server automatically generates a self-signed certificate (fallback certificate) at startup and uses it for encryption. This approach is not recommended for production environments.
To accommodate this configuration in Sitecore Identity Server, choose one of the following approaches:
-
To disable encryption, update the connection string of the security database to include:
-
Enable encryption but disable certificate trust validation. Update the connection string of the security database to include:
Upgrade the database
Upgrade the security database before you install the latest version of Sitecore Identity Server.
To upgrade the security database:
- Unpack the
Sitecore.IdentityServer.UpgradeScripts.9.0.zipfile. - Run the
CMS_security_IdentityServer.sqlscript on the security database.
The database upgrade script contains the changes applied to the security database. It modifies tables to support new versions of dependent software.
This step applies when you are upgrading Identity Server in an existing Sitecore XP deployment. It may also apply in a new installation of Sitecore XP and Identity Server. For example, a new installation of Sitecore XP 10.3.0 or 10.5.0 includes (bundles) the installation of an older Identity Server version by default, requiring you to upgrade the security database for Identity Server 9.0.
Starting with Sitecore XP 10.3.3 and 10.4.1, Identity Server 9.0 will be installed by default with the Sitecore XP installation.
Install Sitecore Identity Server
To install Sitecore Identity Server:
-
Create a folder, for example
c:\resourcefiles. -
Unpack the
IdentityServer Deployment Configuration 9.0.zipfile and copy the extracted files to thec:\resourcefilesfolder. -
Copy the
Sitecore.IdentityServer.9.0.X.scwdp.zipfile to thec:\resourcefilesfolder.The folder should now contain the following items:
createcert.jsonIdentityServer.jsonInstall-IdentityServer.ps1Sitecore.IdentityServer.9.0.X.scwdp.zip
-
Save a copy of your Sitecore license file in the
c:\resourcefilesfolder aslicense.xml. -
Edit the
Install-IdentityServer.ps1file, and update the following parameters:$prefix- Optional. Use the name of the CM instance, it is used for the URL of the Identity Server.$CMurl- Optional. Update or leave the default value.$IdentityServer- Update or leave the default value, the URL of the Identity Server.$ClientSecret- Must be the same as thesitecoreidentity.secretkey that you use in the…\App_Config\ConnectionStrings.configfile on the CM instance.$SqlServer- The name of the SQL server.$SqlAdminUser- The name of the SQL server admin.$SqlAdminPassword- The SQL server admin password.$PSScriptRoot- Optional. Update this parameter if you use a folder with another name. Default value =c:\resourcefiles$SitePhysicalRoot- Optional. Update this parameter if you use a folder with another name. Default value =C:\inetpub\wwwroot$wdpFileName- Optional. Use the default value. Default value =Sitecore.IdentityServer.*.scwdp.zip
-
Open PowerShell as an administrator, go to the
c:\resourcefilesfolder, and run the following cmdlet: