Disk encryption
Disk Encryption Overview
Why Disk Encryption Is Needed
Disk encryption protects citizens’ data if someone gains physical access to a server or storage device.
OpenCRVS disk encryption is required only for data centres that do not already provide hardware-backed, platform-level, or equivalent disk encryption. If the hosting environment already encrypts disks securely, this OpenCRVS-level encryption may not be needed.
LUKS In Brief
OpenCRVS uses LUKS, the standard Linux disk encryption mechanism.
LUKS encrypts a block device or disk image and only makes its contents readable after it is unlocked with the correct passphrase. After unlock, the encrypted storage is mounted like a normal filesystem.
Why The Encryption Key Must Be Protected
The encryption key unlocks the citizens’ data partition.
If the encrypted disk is stolen without the key, the data remains protected. If both the disk and the key are stored together, encryption provides little protection. For this reason, the key should be stored in a safe location separate from the encrypted data whenever possible.
OpenCRVS Encrypted Partition
OpenCRVS stores encrypted data in:
/cryptfs_file_sparse.imgAt runtime, this encrypted storage is mounted to:
/dataOpenCRVS data services use /data after it has been mounted.
Encryption Key Location
For environments without a backup server, the disk encryption key is stored locally on the Kubernetes master node:
For staging and production environments with a backup server, the disk encryption key is stored on the backup server in encrypted form and retrieved during boot:
Host Boot Order
When disk encryption is enabled, the host must start services in this order:
Networking starts.
The encrypted partition is unlocked and mounted to
/data.Kubernetes services start.
This prevents Kubernetes workloads from starting before citizens’ data storage is available.
Troubleshooting
Check that /data is mounted:
Check decrypt-on-boot logs:
Check that the LUKS header accepts the expected passphrase before rebooting or changing keys.
Last updated