Certificate fingerprints in Stork 1.15

Prev Next

The 1.15.1 release of Stork introduced changes in the TLS certificates handling. If you upgrade the server first and let old agents connect, they will store an incorrect server certificate fingerprint (all zeros). Once you later upgrade agents to 1.15.1, they will attempt to verify server's certificate against that invalid all-zeros fingerprint and will refuse to connect as a result. The recovery for such a case is to delete server certificates on the agent:

sudo rm /var/lib/stork-agent/certs/ca.pem
sudo rm /var/lib/stork-agent/certs/cert.pem
sudo rm /var/lib/stork-agent/certs/key.pem
sudo rm /var/lib/stork-agent/tokens/server-cert.sha256

Then restart the agent. The agent will then proceed with a registration and will retrieve the server's certificates as part of the registration process. The agents will have to be authorized on the server using the Stork server web interface.
To avoid aforementioned problem, the recommended upgrade procedure is to upgrade both server and agent at the same time, or upgrade agents first.

Manual re-registration

If you followed the manual registration process for the Stork agent(s) as outlined in the Stork Quickstart guide when originally setting them up, then additional steps are required.
Re-register the stork agent as described in the aforementioned Stork Quickstart guide by running this command on the server that contains the stork-agent(s):

sudo su stork-agent -s /bin/sh -c 'stork-agent register --server-url http://stork.example.org:8080'

Be sure and replace the stork.example.org:8080 with the correct URL of your Stork server. Now restart your Stork agent(s). Finally, you should find the Stork agent(s) in "Unauthorized" under Services -> Machines in the Stork server UI. Authorize these machines and they should start working again.