How To Change The Insights Certificate 21.10+ ?

How to change the Insights Certificate 21.10+ ?

Issue Description: How to Change the Insights Certificate 21.10+

This article only applies for MSI versions. For automation suite, see: Managing The Certificates



Changing the Certificate 21.10

  1. One the Windows machine, install the certificate in the Local Computer\Personal.
    • When importing the cert, make sure the private keys are set to exportable.
  2. For the IIS components, following the instructions Modifying Insights Configurations- Updating The Portal Certificate In IIS
  3. For the docker portion, run the following commands (Make sure to update the first command with the thumbprint:
    1. Command:
      • $thumbrint = "<thumprint>"
      • $Certificate = Get-ChildItem -Path cert:\LocalMachine\My\$thumbrint
      • $PFXDir = docker inspect -f '{{ (index .Mounts 0).Source }}' looker-container
      • $PFXFilePath = "$PFXDir\cert.pfx"
      • $PFXData = $Certificate.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::pfx, "")
      • [System.IO.File]::WriteAllBytes($PFXFilePath, $PFXData)
        docker exec looker-container bash /app/looker-init-job/scripts/install-certificate.sh
    2. Example:
      • $thumbrint = "0af2c2e60cc9b4c8facaf8271aa47aae2c26d1e5"
      • $Certificate = Get-ChildItem -Path cert:\LocalMachine\My\$thumbrint
      • $PFXDir = docker inspect -f '{{ (index .Mounts 0).Source }}' looker-container
      • $PFXFilePath = "$PFXDir\cert.pfx"
      • $PFXData = $Certificate.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::pfx, "")
      • [System.IO.File]::WriteAllBytes($PFXFilePath, $PFXData)
        docker exec looker-container bash /app/looker-init-job/scripts/install-certificate.sh

Changing the certificate 22.4+

  1. See Modifying Insights Configurations - Updating The Looker Settings On The Insights Linux Machine
  2. On step 4 of the 22.4 documentation, run this command instead: sudo docker exec looker-container bash /app/looker-init-job/install-certificate.sh