Pankajjoshi/KEK URL rotation for CVM - #1854
Open
pankajosh wants to merge 16 commits into
Open
Conversation
pankajosh
commented
Dec 9, 2023
pankajosh
commented
Dec 9, 2023
pankajosh
commented
Dec 10, 2023
pankajosh
requested review from
Shridhar Parameshwar Bhat (ShridharParameshwarBhat) and
Fikret Can (canfikret)
January 8, 2024 11:25
Fikret Can (canfikret)
requested changes
Jan 8, 2024
| #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.
Replace all: resotre -> restore
| 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.
... from toke id x to token id y.
| #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.
Remove this bek_util ...
pankajosh
commented
Jan 10, 2024
pankajosh
commented
Jan 10, 2024
| else: | ||
| return protected_settings_str | ||
|
|
||
| def create_temp_file(file_content): |
Collaborator
There was a problem hiding this comment.
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.''' | ||
|
|
Collaborator
There was a problem hiding this comment.
Please move this new functions to a new file for CVM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.