Skip to main content

Enrollment and Secrets

When you enroll a cluster in Zen Mesh, zen-lock protects every piece of sensitive material. Here's how the enrollment flow uses zen-lock step by step.

The Enrollment Bundle

When you click Get install command in the dashboard, the control plane generates an enrollment bundle. This 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 bundle is encrypted with an age public key. Only the corresponding private key (held by the control plane) can decrypt it.

Step-by-Step Flow

What Gets Stored Where

SecretStoragePlaintext Exists?
Enrollment bundleK8s Secret (base64 of age ciphertext)Only 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
  • Orphan cleanup: Ephemeral K8s Secrets are cleaned up when pods terminate

You never need to manually manage these secrets.