Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(CSI-316): support encryption with custom settings per filesystem #444

Draft
wants to merge 10 commits into
base: graphite-base/444
Choose a base branch
from

Conversation

sergeyberezansky
Copy link
Collaborator

@sergeyberezansky sergeyberezansky commented Feb 6, 2025

TL;DR

Added support for encrypted filesystem-backed volumes in WEKA CSI using pre-existing KMS keys. This is an interim step between encryption using only a single cluster-wide key and a full-fledged automated key management per filesystem.

What changed?

  • Added new example demonstrating filesystem-backed volume with encryption enabled, using a custom key defined in CSI secret / StorageClass
  • Introduced encryption parameters in storage class configuration
  • Added KMS credentials support in API secrets for filesystem encryption
  • Enhanced volume creation logic to handle encryption parameters
  • Added validation checks for encryption support and KMS configuration

How to test?

  1. Configure a WEKA cluster with a valid KMS server
  2. Create a storage class using storageclass-wekafs-fs-encryption-key-in-secret.yaml
  3. Create a CSI secret with KMS credentials using csi-wekafs-api-secret-kms-encryption-key-in-secret.yaml
  4. Create a PVC using pvc-wekafs-fs-encryption-key-in-secret.yaml
  5. Deploy a pod using the encrypted volume with csi-app-on-fs-encryption-key-in-secret.yaml

Why make this change?

To enable secure data storage by supporting filesystem-level encryption in WEKA CSI, allowing users to protect their data using pre-existing KMS keys. This feature allows tenant separation by having different encryption keys and not only a cluster-wide key.

Copy link
Collaborator Author

sergeyberezansky commented Feb 6, 2025

@sergeyberezansky sergeyberezansky force-pushed the sergey/per-filesystem-encryption branch from fbf1b36 to 2134746 Compare February 6, 2025 10:33
@sergeyberezansky sergeyberezansky force-pushed the 02-04-fix_csi-320_print_raw_entry_in_log_when_endpoint_address_fails_to_be_parsed branch from b5c9448 to 5d29834 Compare February 6, 2025 10:38
@sergeyberezansky sergeyberezansky force-pushed the sergey/per-filesystem-encryption branch from 2134746 to 0f361eb Compare February 6, 2025 10:38
@sergeyberezansky sergeyberezansky force-pushed the sergey/per-filesystem-encryption branch from 0f361eb to 4dbe7d8 Compare February 9, 2025 09:47
@sergeyberezansky sergeyberezansky force-pushed the 02-04-fix_csi-320_print_raw_entry_in_log_when_endpoint_address_fails_to_be_parsed branch from 5d29834 to 637598a Compare February 9, 2025 09:47
@sergeyberezansky sergeyberezansky force-pushed the sergey/per-filesystem-encryption branch from dac3d09 to d833576 Compare February 11, 2025 10:03
@sergeyberezansky sergeyberezansky changed the base branch from 02-04-fix_csi-320_print_raw_entry_in_log_when_endpoint_address_fails_to_be_parsed to graphite-base/444 February 12, 2025 08:31
@sergeyberezansky sergeyberezansky force-pushed the sergey/per-filesystem-encryption branch from d833576 to 9b2a66e Compare February 12, 2025 08:55
@sergeyberezansky sergeyberezansky changed the base branch from graphite-base/444 to 02-10-fix_csi-323_when_snapshot_of_directory_backed_volumes_is_prohibited_incorrect_error_message_is_shown_stating_volume_is_legacy February 12, 2025 08:55
@sergeyberezansky sergeyberezansky force-pushed the 02-10-fix_csi-323_when_snapshot_of_directory_backed_volumes_is_prohibited_incorrect_error_message_is_shown_stating_volume_is_legacy branch from da199a3 to 837a80a Compare February 12, 2025 09:03
@sergeyberezansky sergeyberezansky force-pushed the sergey/per-filesystem-encryption branch from 9b2a66e to 4836fbb Compare February 12, 2025 09:03
@sergeyberezansky sergeyberezansky force-pushed the 02-10-fix_csi-323_when_snapshot_of_directory_backed_volumes_is_prohibited_incorrect_error_message_is_shown_stating_volume_is_legacy branch from 837a80a to 194d682 Compare February 12, 2025 09:11
@sergeyberezansky sergeyberezansky force-pushed the sergey/per-filesystem-encryption branch 2 times, most recently from 9dc3dee to abbd5b9 Compare February 12, 2025 09:51
@sergeyberezansky sergeyberezansky force-pushed the 02-10-fix_csi-323_when_snapshot_of_directory_backed_volumes_is_prohibited_incorrect_error_message_is_shown_stating_volume_is_legacy branch from 194d682 to 8f31fce Compare February 12, 2025 09:51
@sergeyberezansky sergeyberezansky force-pushed the 02-10-fix_csi-323_when_snapshot_of_directory_backed_volumes_is_prohibited_incorrect_error_message_is_shown_stating_volume_is_legacy branch from 8f31fce to e07aba9 Compare February 12, 2025 10:27
@sergeyberezansky sergeyberezansky force-pushed the sergey/per-filesystem-encryption branch from abbd5b9 to 706ce3c Compare February 12, 2025 10:27
@sergeyberezansky sergeyberezansky force-pushed the 02-10-fix_csi-323_when_snapshot_of_directory_backed_volumes_is_prohibited_incorrect_error_message_is_shown_stating_volume_is_legacy branch from e07aba9 to 6c4ad0f Compare February 12, 2025 11:25
@sergeyberezansky sergeyberezansky force-pushed the sergey/per-filesystem-encryption branch from 706ce3c to 34ab757 Compare February 12, 2025 11:25
@sergeyberezansky sergeyberezansky changed the base branch from 02-10-fix_csi-323_when_snapshot_of_directory_backed_volumes_is_prohibited_incorrect_error_message_is_shown_stating_volume_is_legacy to graphite-base/444 February 12, 2025 13:18
@sergeyberezansky sergeyberezansky force-pushed the sergey/per-filesystem-encryption branch from 34ab757 to 9d1553e Compare February 12, 2025 13:19
@sergeyberezansky sergeyberezansky changed the base branch from graphite-base/444 to sergey/support-basic-fs-encryption February 12, 2025 13:19
@sergeyberezansky sergeyberezansky force-pushed the sergey/support-basic-fs-encryption branch 2 times, most recently from 9d2189f to d01cddb Compare February 12, 2025 13:32
@sergeyberezansky sergeyberezansky force-pushed the sergey/per-filesystem-encryption branch from 9d1553e to 699956f Compare February 12, 2025 13:32
@sergeyberezansky sergeyberezansky force-pushed the sergey/support-basic-fs-encryption branch 2 times, most recently from 9e35330 to aa5bd68 Compare February 12, 2025 13:50
@sergeyberezansky sergeyberezansky force-pushed the sergey/per-filesystem-encryption branch from 699956f to cea4942 Compare February 12, 2025 13:50
@sergeyberezansky sergeyberezansky changed the base branch from sergey/support-basic-fs-encryption to graphite-base/444 February 12, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant