Share via

RSA HSM availability

Momo 21 Reputation points
2020-10-01T13:47:54.297+00:00

Hello!
I have a fast question: 2 years ago I associated a RSA-HSM key to my VM. Now I want switch to a new version, but i can't see any version. I can correctly choose my key vault and key, but no version apparead. Why?

29693-photo-2020-10-01-15-45-43.jpg

Thanks in advance

Azure Key Vault
Azure Key Vault

An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.

Azure Dedicated HSM
Azure Dedicated HSM

An Azure service that provides hardware security module management.


Answer accepted by question author

  1. JamesTran-MSFT 37,251 Reputation points Microsoft Employee Moderator
    2020-10-02T22:26:26.377+00:00

    @Momo
    Thanks for the additional details and screenshots! I wasn't able to reproduce your issue as you can see in my screenshot below.

    29981-keyversion.jpg

    However, if you're trying to rotate your KEK, the recommended way to do so is by calling the ADE encryption script, using the same variables you used initially during encryption. For more info.

    A backup is recommended prior to executing the ADE script.

    For example - This was my initial script:

        $KVRGname = 'KeyVaultRG';  
            $VMRGName = 'VirtualMachineRG';  
            $vmName = 'jatranTestVM';  
            $KeyVaultName = 'KVjt';  
            $keyEncryptionKeyName = 'testADEKey';  
            $KeyVault = Get-AzKeyVault -VaultName $KeyVaultName -ResourceGroupName $KVRGname;  
            $diskEncryptionKeyVaultUrl = $KeyVault.VaultUri;  
            $KeyVaultResourceId = $KeyVault.ResourceId;  
            $keyEncryptionKeyUrl = (Get-AzKeyVaultKey -VaultName $KeyVaultName -Name $keyEncryptionKeyName).Key.kid;  
            $sequenceVersion = [Guid]::NewGuid();  
              
     Set-AzVMDiskEncryptionExtension -ResourceGroupName $VMRGname -VMName $vmName -DiskEncryptionKeyVaultUrl $diskEncryptionKeyVaultUrl -DiskEncryptionKeyVaultId $KeyVaultResourceId -KeyEncryptionKeyUrl $keyEncryptionKeyUrl -KeyEncryptionKeyVaultId $KeyVaultResourceId -VolumeType "All" –SequenceVersion $sequenceVersion;  
    

    If I were to rotate my keys, I would use the same script with the "sequence version" variable, just referencing a different key.

    $KVRGname = 'KeyVaultRG';  
    $VMRGName = 'VirtualMachineRG';  
    $vmName = 'jatranTestVM';  
    $KeyVaultName = 'KVjt';  
    $keyEncryptionKeyName = 'testADEKey002';  
    

    If you have any other questions, please let me know.
    Thank you again for your time and patience throughout this issue.

    ----------

    If any reply/answer helped resolve your question, please remember to "mark as answer" so that others in the community facing similar issues can easily find the solution.

    Was this answer helpful?

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.