mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rbd: implement pv key rotation
This patch implements the EncryptionKeyRotation spec for ceph-csi Signed-off-by: Niraj Yadav <niryadav@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
64c5be5242
commit
ebc56887cd
@ -237,6 +237,11 @@ func (ve *VolumeEncryption) GetCryptoPassphrase(ctx context.Context, volumeID st
|
||||
return ve.KMS.DecryptDEK(ctx, volumeID, passphrase)
|
||||
}
|
||||
|
||||
// GetNewCryptoPassphrase returns a random passphrase of given length.
|
||||
func (ve *VolumeEncryption) GetNewCryptoPassphrase(length int) (string, error) {
|
||||
return generateNewEncryptionPassphrase(length)
|
||||
}
|
||||
|
||||
// generateNewEncryptionPassphrase generates a random passphrase for encryption.
|
||||
func generateNewEncryptionPassphrase(length int) (string, error) {
|
||||
bytesPassphrase := make([]byte, length)
|
||||
|
Reference in New Issue
Block a user