Artica Wiki

Renew the SSL inspection certificate (man-in-the-middle)

How to replace the certificate authority the proxy uses to decrypt HTTPS before it expires, without certificate errors for users.

When SSL inspection is on, the proxy signs a certificate for every HTTPS site on the fly.
It signs them with its own certificate authority.
Your workstations trust the decrypted sites only because this authority sits in their trusted root store.

This authority has an expiry date.
On that day, every decrypted HTTPS site shows a certificate error to every user at the same time.
Renewing it takes planning.
The new authority must reach every workstation before the proxy uses it.

How the renewal works

You cannot extend the date of an existing certificate.
A renewal means a new certificate authority, with a new key.
For a while, workstations trust both the old and the new one.
The overlap keeps users from seeing any error.

  1. Check the authority in service and its expiry date.
  2. Create the new certificate authority in the Certificates Center.
  3. Deploy the new authority to the workstations.
  4. Switch the SSL listening ports to the new authority.
  5. Apply the configuration and check the result.
  6. Remove the old authority later.

Start at least a few weeks before the expiry date.
A GPO can take days to reach laptops that rarely connect to the corporate network.

Expiry warnings

Artica checks the certificate the proxy actually loaded every hour.
It sends a notification 60, 30, 14, 7 and 1 day(s) before the expiry date.
Once the certificate has expired, it sends one every day.
The notification names the certificate, the ports that use it and its SHA-256 fingerprint.
It also links to this page.

Step 1: Check the authority in service

The card shows the name of the authority, its expiry date and the number of days left.
The counter turns red under 30 days.
The Renew link opens the settings of the SSL port that uses it.

SSL Protocol status with the signing authority expiring in 20 days

The authority in service expires in 20 days.

Step 2: Create the new certificate authority

Fill in the form.

Self-signed root certificate form

The new authority, Contoso Proxy CA G2, valid for 3650 days.

Click on Create.
The new authority appears in the list next to the old one.

Certificates Center with the old and the new authority

The old authority expires in 21 days.
The new one is valid for 10 years.

Step 3: Deploy the new authority to the workstations

Do this before you touch the proxy ports.
Meanwhile the proxy keeps signing with the old authority.
Users see no change.

The list shows the authority of each SSL port.
It also shows the authorities of the Certificates Center that no port uses yet, marked Not used.
Your new authority is one of them.

Certificates list with the new authority marked Not used

The new authority can be downloaded before any port uses it.

Both files hold the public certificate only.
They never contain the private key of the authority.

Deploy the certificate the way you deployed the old one.

Keep the old certificate in the GPO.
Both authorities must stay trusted until the end of the procedure.

On a workstation, check that the new authority is there.

certutil -store Root "Contoso Proxy CA G2"

Remember applications that use their own trust store.
Java, Python, Node.js, Git and some update agents do not read the Windows store.
They need the new certificate too.

Step 4: Switch the SSL ports to the new authority

Listen ports with the SSL port 3129

Port 3129 decrypts SSL with the old authority.

SSL port settings with the new certificate selected

The port now points to contoso-proxy-ca-g2.

This button saves the port only.
The proxy keeps using the old authority until the next step.
Repeat for every port that decrypts SSL, including the transparent SSL ports.

Step 5: Apply the configuration

Apply listen ports configuration confirmation

The proxy restarts and current connections are cut.

The proxy service restarts.
Do it at a quiet time of day.

The proxy keeps a cache of the certificates it already generated.
It does not check which authority signed them.
Artica empties this cache by itself during the restart when the signing certificate has changed.
Without that, sites already visited would keep the old signature until the old authority expires.

On an Artica version without this automatic step, empty the cache by hand.
Go to Your proxy > SSL Protocol.
In the Certificate database and queue card, click on Purge.

Step 6: Check the result

Go back to Your proxy > SSL Protocol.
The Signing authority card now shows the new authority.

SSL Protocol status with the new signing authority

Contoso Proxy CA G2 signs the decrypted sites, 3649 days left.

From a workstation, open a site you visited before the switch.
Click on the padlock to display the certificate.
The issuer must be the new authority.

You can also check from a command line.
Replace the address and the port with those of your proxy.

curl -sv -o /dev/null -x http://192.168.90.66:3129 https://www.wikipedia.org/ 2>&1 | grep issuer

The answer must name the new authority.

*  issuer: C=US; ST=Washington; L=Redmond; O=Contoso Ltd; OU=IT security; CN=Contoso Proxy CA G2

Step 7: Remove the old authority

Wait until no user reports a certificate error.
Then remove the old certificate from the GPO and from the workstations.
Finally, delete it from the Certificates Center.
Make sure no listening port still uses it first.

Troubleshooting

Symptom Cause and fix
Users get a certificate error after the switch. Their workstation did not receive the new authority.
Check it with certutil -store Root and run gpupdate /force.
Only Firefox shows an error. Firefox uses its own store.
Deploy the certificate with the Firefox GPO, or turn on security.enterprise_roots.enabled.
Some sites still show the old authority. The cache of generated certificates was not emptied.
Click on Purge in the Certificate database and queue card.
The Signing authority card still shows the old authority. The configuration was not applied, or one SSL port still points to the old certificate.
Check every port marked Decrypt SSL, then click on Reconfigure ports and restart service.
The Signing authority card shows Incompatible certificate. The port uses a server certificate.
Choose a certificate created with Self-signed root certificate, or one imported with its CA flag.