IMPORTANT NOTE: The following steps are applicable for Qlik Sense deployments originally installed with versions prior to the June 2019 release. For Qlik Sense deployments originally installed with the June 2019 or later releases, follow standard steps for patching Qlik Sense and do not perform steps below. If you are not certain about the initially installed version of Qlik Sense, please refer to Validating Qlik Sense root CA certificate for presence of CA:TRUE attribute to check the current certificate for the CA:TRUE attribute.
In February 2020, versions of Qlik Sense were released to fix critical vulnerabilities within NodeJS. Unfortunately this requires recreating the root CA for certificates generated with versions of Qlik Sense prior to the June 2019 release. More information under Node.js Vulnerability - FAQ
Note: In these steps we will occasionally ask you to run Powershell code. Executing PowerShell code: i. Copy the code and save it in a ps1 file, in example: certificates_backup.ps1 ii. Open elevated command line and navigate to the location where the script was saved. iii. Start PowerShell by executing following command: Powershell iv. Run the script by executing following command: .\<name_of_the_script>.ps1 in example: .\certificates_backup.ps1 |
New NodeJS requirements.
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass function ExportCertificatesFromStore( [string] $name, [string] $location) { $success = 1 $oid = "1.3.6.1.5.5.7.13.3" $localStore = new-object System.Security.Cryptography.X509Certificates.X509Store $name, $location $localStore.Open("MaxAllowed") $mypwd = ConvertTo-SecureString -String "MyPassword" -Force -AsPlainText try { $certs = $localStore.Certificates foreach ($cert in $certs) { $extensions = $cert.Extensions foreach($extension in $extensions) { if ($extension.Oid.Value.Equals($oid)) { Get-ChildItem -Path cert:\$($localStore.Location)\$($localStore.Name) | Where-Object { $_.PrivateKey.CspKeyContainerInfo.Exportable } | Export-PfxCertificate -FilePath "$($localStore.Name)_$($localStore.Location).pfx" -Password $mypwd break; } } } } catch { write-host "An error occurred while removing certificates" -ForegroundColor Red write-host $_.Exception.GetType().FullName -ForegroundColor Red write-host $_.Exception.Message -ForegroundColor Red $success = 0 } finally { $localStore.Close() } if ($success -ne 1) { exit 20 } } function ExportCertificates() { ExportCertificatesFromStore "Root" "LocalMachine" ExportCertificatesFromStore "My" "LocalMachine" ExportCertificatesFromStore "My" "CurrentUser" } ExportCertificates write-host "Done." exit 0
NOTE: For information on how to execute above code please refer to “Executing PowerShell code” section at the top. Modify $mypwd variable to define custom password. Make sure certificates were backed up after running the script:
NOTE: If you happen to have more certificates with the same values in Issued To, Issued By and Friendly Name columns and you are unable to identify the correct certificate, please refer to Identifying Qlik Sense root CA and server certificates in certificate store.
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass function RemoveCertificatesFromStore( [string] $name, [string] $location) { $success = 1 $oid = "1.3.6.1.5.5.7.13.3" $localStore = new-object System.Security.Cryptography.X509Certificates.X509Store $name, $location $localStore.Open("MaxAllowed") try { $certs = $localStore.Certificates foreach ($cert in $certs) { $extensions = $cert.Extensions foreach($extension in $extensions) { if ($extension.Oid.Value.Equals($oid)) { write-host "Deleting certificate from" $localStore.Name $localStore.Location write-host " Subject:"$cert.Subject write-host " Issuer:"$cert.Issuer write-host " Serial:"$cert.SerialNumber $localStore.Remove($cert) break; } } } } catch { write-host "An error occurred while removing certificates" -ForegroundColor Red write-host $_.Exception.GetType().FullName -ForegroundColor Red write-host $_.Exception.Message -ForegroundColor Red $success = 0 } finally { $localStore.Close() } if ($success -ne 1) { exit 20 } } function CleanCertificates() { RemoveCertificatesFromStore "Root" "LocalMachine" } CleanCertificates write-host "Done." exit 0
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass function RemoveCertificatesFromStore( [string] $name, [string] $location) { $success = 1 $oid = "1.3.6.1.5.5.7.13.3" $localStore = new-object System.Security.Cryptography.X509Certificates.X509Store $name, $location $localStore.Open("MaxAllowed") try { $certs = $localStore.Certificates foreach ($cert in $certs) { $extensions = $cert.Extensions foreach($extension in $extensions) { if ($extension.Oid.Value.Equals($oid)) { write-host "Deleting certificate from" $localStore.Name $localStore.Location write-host " Subject:"$cert.Subject write-host " Issuer:"$cert.Issuer write-host " Serial:"$cert.SerialNumber $localStore.Remove($cert) break; } } } } catch { write-host "An error occurred while removing certificates" -ForegroundColor Red write-host $_.Exception.GetType().FullName -ForegroundColor Red write-host $_.Exception.Message -ForegroundColor Red $success = 0 } finally { $localStore.Close() } if ($success -ne 1) { exit 20 } } function CleanCertificates() { RemoveCertificatesFromStore "Root" "LocalMachine" RemoveCertificatesFromStore "My" "LocalMachine" RemoveCertificatesFromStore "My" "CurrentUser" } CleanCertificates write-host "Done." exit 0
C:\ProgramData\Qlik\Sense\Repository\Exported Certificates\.Local Certificates
<add key="Certificates.SelfSignedRoot.BasicConstraintsCA" value="true" />
If the above key is not present, add it within <appSettings> section, in example:
(…) <add key="BackgroundWork.CountLimit" value="3" /> <add key="Certificates.SelfSignedRoot.BasicConstraintsCA" value="true" /> <add key="DatabaseCommandTimeout" value="00:01:30" /> (…)
NOTE: If you are installing a patch on November 2018 track, name of the key is: <add key="CertificatesSelfSignedRootBasicConstraintsCA" value="true" />
repository.exe -bootstrap -iscentral
Note: If this message is not shown, open Windows Task Manager, find Qlik Sense Repository Service in the Processes tab and end it by right-clicking on it and selecting End task.
can you confirm some of the issues that this certificate problem are known to cause?
what are some of the symptoms that the system will exhibit when this issue is present?
thanks - Ken