Enable-ZrStoreTls
Provisions the cluster CA, then writes the TLS policy and trust anchor into every connected manager's instances of a store, optionally rolling-restarting its nodes so enforcement takes effect.
Syntax
Enable-ZrStoreTls
-Store <string>
[-Mode <string>]
[-IssuerNodeId <string>]
[-Restart]
[-CaFile <string>] [-CaPassword <SecureString>]
[-Managers <string[]>] [-Port <int>] [-Token <string>] [-TimeoutSec <int>]
[-WhatIf] [-Confirm]
Description
Enable-ZrStoreTls provisions the cluster CA (sharing one CA across all managers so every node leaf is signed by the same authority), then writes the transport-TLS policy and trust anchor into the named store on every connected manager. Nodes enforce TLS only once restarted: pass -Restart to roll the store's nodes immediately, or apply the change and restart later.
-Mode selects the enforcement mode (for example server-only TLS or MutualTls); when omitted the server policy default is used. MutualTls is enforced node-to-node — external app clients still connect with the CA plus a token and need no client certificate.
-CaFile is a one-shot bring-your-own-CA: it adopts the supplied CA PKCS#12 (cert + key) before enabling, equivalent to running Import-ZrClusterCa first. After enabling, export the client trust file with Get-ZrClusterCaCert. Requires an active workspace or an explicit -Managers list.
See TLS encryption and CA trust modes for the concepts. The web console does the same thing under Security & TLS → Encryption, where an enabled store shows a 🔒 TLS active badge.
TLS encrypts the wire and authenticates the nodes — it does not require a token from callers. A TLS-only store is encrypted but still open to any client. Pair this with Enable-ZrStoreSecurity to require a token too.
When an orchestrator owns the nodes (attach mode), the manager cannot reconfigure them — this cmdlet reports "0 nodes updated." Declare security.tls in each node's configuration and restart; the store registration then records the TLS policy and the console/clients pick it up.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
-Store | string | Yes | Name of the store to enable transport TLS on. Position 0. |
-Mode | string | No | TLS enforcement mode, for example server-only TLS or MutualTls; defaults to the server policy when omitted. |
-IssuerNodeId | string | No | Node id of the CA issuer to use when signing the leaf certificates for the store's nodes. |
-Restart | switch | No | Rolling-restarts the store's nodes so TLS enforcement activates immediately instead of on the next restart. |
-CaFile | string | No | A CA PKCS#12 (cert + key) to adopt as the cluster CA before enabling — node leaves are then signed by your CA (one-shot bring-your-own-CA). |
-CaPassword | SecureString | No | Password protecting -CaFile, if any. |
-Managers | string[] | No | Management Service endpoints to target; when omitted the active workspace's managers are used. |
-Port | int | No | Management Service port for bare-host managers. Default 7801. |
-Token | string | No | Admin bearer token for authenticated control-plane calls. |
-TimeoutSec | int | No | Per-request timeout in seconds. Default 30. |
Supports -WhatIf and -Confirm.
Examples
Provision the CA and enable mutual TLS on the orders store, restarting its nodes to activate enforcement.
Enable-ZrStoreTls -Store orders -Mode MutualTls -Restart
Enable TLS while adopting your own CA in one step, then export the client trust file.
Enable-ZrStoreTls -Store orders -CaFile enterprise-ca.pfx -CaPassword (Read-Host -AsSecureString) -Restart
Get-ZrClusterCaCert -OutFile cluster-ca.crt