For the complete documentation index, see llms.txt. This page is also available as Markdown.

Volume Encryption with an External Key Manager

Overview

Private Cloud Director supports encrypting Persistent Storage Service volumes, including boot volumes. By default, encryption keys are created and managed by the platform's built-in key manager, which runs in the management plane.

Starting with this release, you can configure the Persistent Storage Service and the Compute Service to use HashiCorp Vault as an external key manager backend instead. With an external key manager, encryption keys are created directly on the dataplane and retrieved from your Vault instance, rather than from the platform's built-in key manager. This is useful for environments that require encryption keys, including those used for boot volumes, to stay outside the platform's management plane.

In this guide, you will configure PCD hosts to use HashiCorp Vault as the key manager backend for volume encryption.

Prerequisites

  • Root privileges on each host you configure.

  • A running HashiCorp Vault instance, reachable from every host with the Persistent Storage Node role and every hypervisor host that will run VMs using encrypted volumes.

  • A Vault token that's restricted to only the storage location used for these encryption keys, not a token with full access to your Vault instance.

The Vault token and its associated configuration details come from your organization's Vault administrator. Before starting Step 1, request the following from them:

  • A token restricted to a single storage location, created using a policy like this one (they'll adjust the path to match their own Vault layout):

  • The following details, which you'll enter in Step 1:

    • The mount name used for the path above (Vault's default is secret).

    • The path assigned above, if any.

    • Whether their Vault instance uses KV version 2 (the current default) or the older KV version 1.

    • If a token isn't practical under your organization's security policy, whether they can set you up with AppRole, JWT, or Kubernetes-based authentication instead.

How It Works

When you configure an external key manager backend:

  • The Persistent Storage Service dataplane component, running on each host with the Persistent Storage Node role, creates and stores encryption keys directly in the configured Vault instance during volume creation, instead of requesting them from the platform's built-in key manager.

  • The Compute Service retrieves the same keys directly from Vault when attaching an encrypted volume to a VM, or booting a VM from an encrypted boot volume.

  • Because both services must resolve the same keys, the Persistent Storage Service and the Compute Service on every host must point at the same Vault instance.

Configure Vault as the Key Manager Backend

Step 1 - Configure the Persistent Storage Service

On each host with the Persistent Storage Node role, open the block storage override configuration file:

Add the following configuration:

If root-token authentication doesn't fit your environment, the Vault backend also supports AppRole, JWT, and Kubernetes-based authentication using the auth_method, approle_role_id, approle_secret_id, token_role, token_file, and auth_path options.

Save the file, then restart the block storage service for the change to take effect:

Step 2 - Configure the Compute Service

The Compute Service needs the same key manager configuration to retrieve encryption keys when it attaches an encrypted volume, or boots a VM from an encrypted boot volume. Follow Configure an External Key Manager for Volume Encryption on every hypervisor host that will run VMs using encrypted volumes.

Notes

  • vault_url must be reachable from the host you're configuring.

  • The configured Vault token must have access to the secrets path used to store encryption keys, matching the policy described in Prerequisites.

  • root_token_id doesn't renew automatically. If it expires or is revoked, update it with a new token from your Vault administrator and restart the affected service.

  • Configure both the Persistent Storage Service and the Compute Service to point at the same Vault instance: a key created during volume creation must be resolvable during instance boot or volume attach.

  • Restart both the block storage service and the Compute Service after applying these changes.

  • Only HashiCorp Vault is supported as an external key manager backend at this time.

Next Steps

See Compute Service Advanced Configuration and Advance Service Configuration for other host-level configuration options.

Last updated

Was this helpful?