Background
The Halo CMMS uses asymmetric cryptography for secure communication and data protection:- X.509 certificates for Transport Layer Security (TLS) and digital signatures
- Hybrid encryption for encrypting sensitive data
Certificate Trust Model
The CMMS uses a private Certificate Authority (CA) model:Root certificates
Each entity operates their own private CA with a self-signed root certificate:
- Very long validity period (e.g., 10 years)
- Exchanged out-of-band between entities
- Private key must be kept extremely secure
Certificate chains
The path from a leaf certificate to a trusted root is called a certificate chain. Validation includes:
- Verifying the chain to a trust anchor
- Checking the validity period (not expired)
- Determining revocation status
Server TLS
For server TLS:
- Server presents its certificate to the client
- Server proves ownership via private key
- Client verifies the certificate is signed by a trusted root
- Client checks hostname matches Subject Alternative Name (SAN)
Asymmetric Encryption
For hybrid encryption:- Sender encrypts data using the recipient’s public key
- Recipient decrypts data using their private key
TLS Certificate Rotation
Rotate the certificate presented by the server (server TLS) or client (client TLS).Kubernetes Secret Update
In Kubernetes deployments, TLS certificates are stored inSecret resources.
Update certificate files
Overwrite the certificate and matching private key files in your Kustomization directory.
See the update guide for more information on managing Kustomization directories.
API Certificate Rotation
Rotating certificates used within the Halo public API requires two steps:Register new Certificate resource
Create a new
Certificate resource by calling the CreateCertificate method:Update PublicKey sub-resource
If the parent resource has a
PublicKey sub-resource, update it to reference the new Certificate:- Sign the
EncryptionPublicKeywith the new certificate’s private key - Call the
UpdatePublicKeymethod with the signed key
You can rotate the encryption public key at the same time. See Encryption Public Key Rotation.
CLI Tools
Use theMeasurementSystem and EncryptionPublicKeys CLI tools to assist with certificate rotation.
Encryption Public Key Rotation
Rotate encryption keys by calling theUpdatePublicKey method.
Generate new encryption key pair
Create a new hybrid encryption key pair using your cryptographic library.
Sign the public key
Generate a signature for the new encryption public key using the private key that matches your
Certificate resource.Use the
MeasurementSystem and EncryptionPublicKeys CLI tools to streamline this process.Handling Compromise
If a certificate or encryption key has been compromised, simple rotation is not sufficient. Additional mitigation steps are required.Certificate Compromise
For example, Measurement results utilizing the compromised certificate can no longer be trusted. New Measurements may need to be created to obtain trustable results.Mitigation Steps
Revoke the certificate
Prevents use of the certificate for anything new:
- Update the
Certificateresource revocation status - Call the
RevokeCertificatemethod
Rotate to new certificate
Follow the API Certificate Rotation steps to deploy a new certificate.
Encryption Key Compromise
Mitigation Steps
Re-encrypt data with new key
For example, if a
MeasurementConsumer key was compromised:- Request that
DataProviders re-encrypt anyEventGroupmetadata - Update all ongoing measurements to use the new key
Rotation Best Practices
Regular Rotation Schedule
- Establish a regular rotation schedule (e.g., every 90 days for certificates, every 30 days for encryption keys)
- Automate rotation where possible
- Maintain an audit trail of all rotations
- Test rotation procedures in non-production environments first