-
Notifications
You must be signed in to change notification settings - Fork 255
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
Pankajjoshi/KEK URL rotation for CVM #1854
base: ade-singlepass-dev
Are you sure you want to change the base?
Conversation
VMEncryption/main/DiskUtil.py
Outdated
#remove backup token id | ||
self.remove_token(device_name=device_name,token_id=ade_token_id_backup) | ||
return | ||
self.logger.log("resotre luks2 token for device {0} is started.".format(device_name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace all: resotre -> restore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
VMEncryption/main/DiskUtil.py
Outdated
self.import_token_data(device_path=device_path,token_data=data,token_id=CommonVariables.AzureDiskEncryptionToken) | ||
#remove backup | ||
self.remove_token(device_name=device_name,token_id=ade_token_id_backup) | ||
self.logger.log("resotre luks2 token for device {0} is successful.".format(device_name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... from toke id x to token id y.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
VMEncryption/main/handle.py
Outdated
#removing backup token | ||
disk_util.remove_token(device_name=device_item.name,token_id=CommonVariables.cvm_ade_vm_encryption_backup_token_id) | ||
extension_parameter.commit() | ||
bek_util.umount_azure_passhprase(encryption_config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this bek_util ...
@@ -270,6 +272,196 @@ def get_protected_settings(): | |||
else: | |||
return protected_settings_str | |||
|
|||
def create_temp_file(file_content): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move these new functions to a new file called something like cvmLuksUtil?
|
||
def import_token(self,device_path,passphrase_file,public_settings): | ||
'''this function reads passphrase from passphrase file, wrap it and update in token field of LUKS2 header.''' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this new functions to a new file for CVM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have done it.
This commit is capturing KEK URL rotation for CVM.
Passphrase is re-wrapped with new KEK URL and stamped to LUKS2 header with new settings.