TLS certificate management via CLI
Table of Contents
HTTPS deployment implies (and requires) that each AIS node has a valid TLS (a.k.a. X.509) certificate.
The latter has a number of interesting properties ultimately intended to authenticate clients (users) to servers (AIS nodes). And vice versa.
In addition, TLS certificates tend to expire from time to time. In fact, each TLS certificate has expiration date with the standard-defined maximum being 13 months (397 days).
Some sources claim 398 days but the (much) larger point remains: TLS certificates do expire. Which means, they must be periodically updated and timely reloaded.
Starting v3.24, AIStore:
- tracks certificate expiration times;
- automatically - upon update - reloads updated certificates;
- raises associated alerts.
A node may have more than one certificate configured. Each is tracked, reloaded, and alerted on independently; the commands below operate on all of them.
ais tls command
Cert alerts
Associated alerts are listed below but first - an example:
Overall, there are currently 3 (three) related alerts:
The alerts above are node-level: when a node has multiple certificates, an alert is raised if any of them is in the corresponding state, and is cleared only when none of them is. Use ais show tls (below) to tell which certificate is at fault.
Show TLS certificate
The command has an optional NODE argument - press <TAB-TAB> to select.
Otherwise, simply run:
When a node has more than one certificate configured, the additional certificate’s properties are shown under a corresponding prefix (e.g., pub.valid); unprefixed properties always refer to the node’s default certificate.
Load TLS certificate
By default, all nodes in the cluster will (unconditionally) reload X.509 certificates from the respective configured locations:
Each targeted node reloads all of its configured certificates; if any of them fails to load, the command reports the failure and the remaining certificates are still reloaded.
But you can also choose any specific node, and ask it to reload. See ais tls load-certificate --help for details.
If aistore is deployed with authentication (enabled), reloading certificates will require administrative permissions.
See
ais config clustercommand and relatedauth.client_auth_requiredknob.