Skip to main content

Enrollment and Secrets

When you enroll a cluster in Zen Mesh, zen-lock protects every piece of sensitive material automatically — you never manage these secrets by hand. (This page covers the Zen Mesh platform flow; for managing your own secrets with zen-lock, see Using Secrets.)

The Enrollment Bundle

When you click Get install command in the dashboard, the control plane generates an enrollment bundle. The bundle contains:

FieldPurposeProtection
Tenant IDIdentifies your Zen Mesh accountNot secret — embedded in bundle
Cluster IDIdentifies your specific clusterNot secret — embedded in bundle
Enrollment credentialsProves cluster identity to control planeage-encrypted
HMAC keySigns events delivered to your clusterage-encrypted
mTLS CA certificateRoot of trust for internal TLSage-encrypted

The control plane encrypts the sensitive fields with your cluster's age public key. Only the corresponding private key — held by zen-lock inside your cluster — can decrypt them.

Step-by-Step Flow

What Gets Stored Where

SecretStoragePlaintext Exists?
Enrollment bundleCiphertext applied to the clusterOnly during agent startup
mTLS private keyzen-lock CRD (age ciphertext)Only in egress pod memory
HMAC signing keyzen-lock CRD (age ciphertext)Only in egress pod memory
SPIFFE/SPIRE certsShort-lived, in-memoryNever persisted

Bundle Expiration

Enrollment bundles expire after 30 minutes. If the bundle expires before you run the install command:

  1. The old bundle is cryptographically invalid
  2. Click Regenerate in the dashboard
  3. A fresh bundle is created with new credentials
  4. The old bundle is invalidated

This prevents stale enrollment bundles from being reused.

After Enrollment

Once the cluster is enrolled, zen-lock continues managing secrets automatically:

  • Certificate rotation: mTLS certs are rotated before expiry
  • Key rotation: HMAC keys are rotated on a schedule (see Key Rotation for the mechanism)
  • Orphan cleanup: Ephemeral K8s Secrets are cleaned up when pods terminate

You never need to manually manage these secrets. To protect your own application secrets the same way, follow Using Secrets.