Persistent volume encryption
TOC
OverviewAccess configuration for Key Management System (KMS)Configuring access usingvaulttokensConfiguring access using vaulttenantsaConfiguring access using Thales CipherTrust Manager (kmip)Creating a StorageClass for persistent volume encryptionPrerequisitesProcedureVerification stepsOverriding Vault connection details using tenant ConfigMapEnabling and disabling key rotation(Optional)PrerequisitesSetup Environment For Volume Replication(Optional)Enforcing precedence for key rotationEnabling key rotationDisabling key rotationOverview
Persistent volume (PV) encryption helps protect data confidentiality and tenant isolation for stateful workloads. For ACP distributed storage, encryption at rest for CSI-provisioned PVs is implemented with an external Key Management System (KMS) and an encryption-enabled StorageClass.
This chapter describes how to:
- Configure KMS access credentials and connection details
- Create an encryption-enabled StorageClass
- Enable and disable key rotation policies
Persistent volume encryption in this chapter applies to RBD-backed PVs. Object storage buckets are not covered by this workflow.
Access configuration for Key Management System (KMS)
Configure KMS access first. StorageClass-based PV encryption depends on valid KMS credentials and connection metadata.
The authentication and metadata model is different for each provider mode:
⚠️ IMPORTANT: Alpha Feature Disclaimer
Accessing the KMS using
vaulttenantsais in the Alpha stage, provided strictly for early technical validation and evaluation. As the feature provider, we offer no warranties regarding its stability, reliability, or data integrity. By configuring and using this feature, you acknowledge and accept the following technical limitations:
- Not for Production Use: This feature lacks comprehensive system-level validation. Deploying it in production environments carries a high risk of process failure or data corruption.
- No SLA Guarantee: This feature falls outside standard Service Level Agreements (SLAs). We do not guarantee technical support response times or provide emergency hotfixes.
- Breaking Changes & Deprecation: API endpoints, configuration schemas, and core processing logic are subject to backwards-incompatible changes in future releases. The feature may also be deprecated entirely without prior notice.
- No Smooth Upgrade Path: We do not provide upgrade scripts or data migration tools between versions. Upgrading to subsequent versions typically requires completely purging existing resources and performing a fresh deployment. Any resulting loss of state or data is the sole responsibility of the user.
Configuring access using vaulttokens
Prerequisites
- The ACP distributed storage cluster is in
Readystate. - You have
cluster-adminprivileges. - Vault is reachable from cluster nodes.
- You have a valid Vault token with access to the target backend path.
Procedure
-
Create a Secret that stores the Vault token.
-
Create or update the KMS connection
ConfigMapentry.Parameters
Verification steps
-
Verify the token Secret:
-
Verify the
ConfigMapentry and confirmencryptionKMSType: vaulttokens:
Configuring access using vaulttenantsa
Prerequisites
- The ACP distributed storage cluster is in
Readystate. - On the external key management system (KMS),
- Ensure that a policy exists and the key value backend path in Vault is enabled.
- Ensure that you are using signed certificates on your Vault servers.
Procedure
You need to configure the Kubernetes authentication method before ACP distributed storage can authenticate with and start using Vault. The following instructions create and configure serviceAccount, ClusterRole, and ClusterRoleBinding required to allow ACP distributed storage to authenticate with Vault.
-
Create a tenant ServiceAccount in the workload namespace.
-
Apply RBAC resources for Vault token review in the storage namespace.
-
Create a service-account-token Secret for the token reviewer ServiceAccount.
-
Read the reviewer JWT, cluster CA, and API endpoint.
-
Configure Kubernetes authentication in Vault.
-
Create the Vault role for the tenant namespace.
NOTEcsi-kubernetesis the default role name that ACP distributed storage looks for in Vault.- The default service account name in the tenant namespace in the ACP distributed storage cluster is
ceph-csi-vault-sa. - These default values can be overridden by creating a ConfigMap in the tenant namespace.
-
Create or update the KMS connection entry with
encryptionKMSType: vaulttenantsa.Parameters
Verification steps
-
Verify ServiceAccount creation:
-
Verify token review permission:
-
Verify the
ConfigMapentry and confirmencryptionKMSType: vaulttenantsaandtenantSAName. -
Create a test encrypted PVC in
<tenant_namespace>and verify that it binds successfully.
Configuring access using Thales CipherTrust Manager (kmip)
Prerequisites
- You have access to Thales CipherTrust Manager with KMIP enabled.
- You have the KMIP endpoint (
<kmip_address>:5696), client certificate chain, and key unique identifier (UID). - You have permissions to create Secrets and ConfigMaps in
rook-ceph.
Procedure
-
In Thales CipherTrust Manager, create a KMIP client profile and register a client.
-
Download the client certificate, private key, and CA certificate from the profile.
-
Create a Secret for KMIP client credentials.
-
Create or update the KMS connection
ConfigMapentry.
Verification steps
-
Verify KMIP credential Secret:
-
Verify the
ConfigMapentry and confirmencryptionKMSType: kmip. -
Confirm the key UID in the KMS entry matches the key generated in Thales CipherTrust Manager.
For kmip, the critical difference is that encryption keys are resolved using the KMIP key UID and mutual TLS trust chain, not a Vault token.
Creating a StorageClass for persistent volume encryption
After KMS access is configured, create a StorageClass with encryption parameters.
Prerequisites
- You have permission to create StorageClasses.
- You know the target KMS configuration ID (
<kms_config_id>).
Procedure
-
Go to Administrator.
-
In the left navigation bar, click Storage > StorageClasses.
-
Click Create Storage Class.
Note: The following content is an example in form format, you can also choose YAML to complete the operation.
-
Select CephRBD Block Storage, and click Next.
-
Switch to YAML view
-
Enable encryption in parameters:
encrypted: "true"encryptionKMSID: "<kms_config_id>"
-
Click Create.
Verification steps
-
Verify StorageClass parameters:
-
Confirm
encrypted: "true"and the expectedencryptionKMSIDare present. -
Create a test PVC with this StorageClass and confirm it reaches
Boundstate:
Overriding Vault connection details using tenant ConfigMap
The Vault connections details can be reconfigured per tenant by creating a ConfigMap in the ACP namespace with configuration options that differ from the values set in the csi-kms-connection-details ConfigMap in the rook-ceph namespace. The ConfigMap needs to be located in the tenant namespace. The values in the ConfigMap in the tenant namespace will override the values set in the csi-kms-connection-details ConfigMap for the encrypted Persistent Volumes created in that namespace.
Procedure
-
In the ACP console, navigate to Alauda Container Platform -> Configuration -> ConfigMaps.
-
Switch to the target tenant project/namespace.
-
Click Create ConfigMap, and enter
ceph-csi-kms-configas the name. -
Add tenant-specific Vault override values:
-
Click Create.
Verification steps
-
Verify the tenant override ConfigMap:
-
Create a new encrypted PVC in the same namespace and confirm it reaches
Bound. -
If key access fails, check namespace events and CSI provisioner logs for Vault endpoint and auth-path mismatch.
Enabling and disabling key rotation(Optional)
Key rotation supports periodic refresh of encryption keys used by encrypted PVs.
Prerequisites
- Please ensure that the following two images have been uploaded to the platform's private image repository:
quay.io/csiaddons/k8s-controller:v0.14.0-><registry>/csiaddons/k8s-controller:v0.14.0quay.io/csiaddons/k8s-sidecar:v0.14.0-><registry>/csiaddons/k8s-sidecar:v0.14.0
Setup Environment For Volume Replication
-
Setup CsiAddons Controller
Execute the following commands on Control nodes:
Parameters:
<registry>: Registry address of platform.
-
Enable CsiAddons sidecar
Execute the following commands on Control nodes:
Wait for all csi pods to restart successfully
(Optional)Enforcing precedence for key rotation
In key rotation, precedence refers to the order in which the system checks for scheduled annotations. The default precedence is set to storage class (recommended). This means the system reads annotations only from the storage class.
However, if you want the system to check the persistent volume claim (PVC) first and then fall back to the storage class, you can configure this behavior by setting the schedule-precedence to PVC in the CSI-addons ConfigMap.
You can define the ConfigMap for csi-addons as shown below:
Restart the csi-addons operator pod for the changes to take effect:
Enabling key rotation
To enable key rotation, add the annotation keyrotation.csiaddons.openshift.io/schedule: <value> to PersistentVolumeClaims, Namespace, or StorageClass (in the decreasing order of precedence).
<value> can be @hourly, @daily, @weekly, @monthly, or @yearly. If <value> is empty, the default is @weekly. The below examples use @weekly.
Annotating Namespace
Annotating StorageClass
Annotating PersistentVolumeClaims
Disabling key rotation
You can disable key rotation for the following:
- All the persistent volume claims (PVCs) of storage class
- A specific PVC
Disabling key rotation for all PVCs of a storage class
Disabling key rotation for a specific persistent volume claim
-
Identify the
EncryptionKeyRotationCronJobCR for the PVC you want to disable key rotation on:Where
<PVC_NAME>is the name of the PVC that you want to disable. -
Apply the following to the
EncryptionKeyRotationCronJobCR from the previous step to disable the key rotation:-
Update the csiaddons.openshift.io/state annotation from managed to unmanaged:
Where
<encryptionkeyrotationcronjob_name>is the name of theEncryptionKeyRotationCronJobCR. -
Add suspend: true under the spec field:
-
-
Save and exit. The key rotation will be disabled for the PVC.