You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MB-61292: Fix drop DEKs behavior when force encryption...
... has been used before
This commit fixes the following encr at rest scenario:
1. Create a key
2. Create an encrypted bucket
3. Call POST /controller/forceEncryptionAtRest/bucket/<B>
4. Disable encryption on the bucket
5. Call POST /controller/dropEncryptionAtRestDeks/bucket/<B>
6. Enable encryption on the bucket again
7. Call POST /controller/dropEncryptionAtRestDeks/bucket/<B>
Step #7 should trigger DEK drop and re-encryption of the data,
but the reencryption doesn't happen.
This happens because of two reasons:
- drop_deks (via compaction) is not needed in this case,
because old DEK becomes "not in use" without compaction
(it doesn't really encrypt anything);
- force_encryption_datetime is set to some old value, so it is
ignored when the list of expired keys is checked
In this case we should not really ignore force_encryption_datetime,
because dek_drop_datetime is actually set, so this time should be
used instead.
In other words, currently we only use dek_drop_datetime as
force_encryption_datetime if force_encryption_datetime is not set.
While we should actually take the maximum of these two values.
Change-Id: I7328b721aa82d64026561b4448813158417bc9b8
Reviewed-on: https://review.couchbase.org/c/ns_server/+/232670
Reviewed-by: Navdeep S Boparai <[email protected]>
Well-Formed: Build Bot <[email protected]>
Tested-by: Timofey Barmin <[email protected]>
0 commit comments