Upgrade Identity Server
The upgrade of Sitecore Identity Server refers to the Sitecore XP Container Deployment Package corresponding to your current Sitecore XP version. For example, upgrading Identity Server in a Sitecore XP 10.5 deployment applies to the Sitecore XP 10.5 Container Deployment Package, or a more recent deployment package version if applicable.
Similarly, the Identity Server upgrade instructions follow the same general deployment steps that are documented in the Sitecore XP Production Environment Deployment with Kubernetes guide. The instructions below provide the additional steps specific to Identity Server. For example, a Sitecore XP 10.5 deployment uses this Production Environment Deployment with Kubernetes guide as a reference.
Prepare the Kubernetes specification files
This step corresponds to Sitecore XP Production Environment Deployment with Kubernetes guide section 1.3.3 - Prepare the Kubernetes specification files for deployment.
For the SXP 10.5 guide apply this step after section 1.3.4 - Run script to prepare for k8s deployment.
Update the specification files to use Sitecore Identity Server 9.0.X.
Starting with Identity Server 8.0, the name of container image has been changed from sitecore-idX to sitecore-identity. Its tag is now aligned with the version of the Sitecore Identity Server itself, for example: sxp/sitecore-identity:8.0-ltsc2022
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.
Follow these steps to configure and implement an encryption certificate:
You may use the latest Sitecore XP Container Deployment Package as an example.
-
Obtain certificates for the encryption. Prepare three certificate files:
tls.crt- contains the public certificate that will be used by SQL Server for encryption.tls.key- contains the private key that will be used by SQL Server for encryption.root.crt- public certificate of the certification authority (CA) that issued the encryption certificates.
These must meet specific requirements to be used with SQL Server. For more information, refer to the Certificate requirements for SQL Server article.
-
Configure an encryption certificate for the SQL Server deployment. For more information on how this can be achieved for the default SQL Server image, refer to Microsoft’s Secure SQL Server Linux containers article.
-
Ensure the certificate is trusted in the Identity Server deployment. Mount the CA certificate that was used to issue the encryption certificate as a
C:\certs\RootCA.crtfile into the Identity Server container.For example, if the root.crt file is created as a secret with name global-authority, then the configuration should be updated in the
k8s/<version>/<topology>/id.yamlfile: -
[Optional] Enforce Sitecore Identity Server to use an encrypted connection to SQL Server. In the
k8s/<version>/<topology>/id.yamlfile, update the value of theSitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionStringenvironment variable by appending the parameters:
Alternatively, it is possible to use default self-signed encryption certificates which SQL Server generates at startup if custom certificates are not provided. This may simplify the installation process for non-production deployments, but this approach is not recommended for production environments.
To accommodate this configuration in Sitecore Identity Server, it is sufficient to apply one of the following configuration changes to Kubernetes configuration:
-
To disable encryption: Update the value of the
Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionStringenvironment variable by appending the parameter: -
Enable encryption but disable certificate trust validation. Update the value of the
Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionStringenvironment variable by appending the parameter:
For Sitecore XP 10.0 only, if the non-production SQL Server image is used during deployment, the only available option is to use the default self-signed encryption certificates generated by SQL Server.
Run upgrade script on security database
Apply this step after the Sitecore XP Production Environment Deployment with Kubernetes guide section 2.8 - Deploy the data initialization jobs (or section 2.7 in older Sitecore XP versions).
To run the upgrade script on security database:
-
Unpack the
Sitecore.IdentityServer.UpgradeScripts.9.0.zipfile. The package contains a database upgrade scriptCMS_security_IdentityServer.sql. The script applies changes to the Core database that are required for Sitecore Identity Server 9.0. -
Execute the upgrade scripts against the Core database used in the deployment. For example, it can be done in the following way:
For Sitecore XP 10.0, you should execute the upgrade scripts using a slightly different format, as follows:
You should now be able to log in to the CM server and log out without any errors displayed.