Skip to content

Commit

Permalink
[dataprotection] Add support for MUA for CMK operations (#7732)
Browse files Browse the repository at this point in the history
* CMK Done

* Remove erronous print statement

* Update version

* Rerunning all tests

* Fixed blob test

---------

Co-authored-by: Zubair Abid <[email protected]>
  • Loading branch information
zubairabid and Zubair Abid committed Jun 27, 2024
1 parent dad73d8 commit 692bee5
Show file tree
Hide file tree
Showing 23 changed files with 4,549 additions and 3,386 deletions.
4 changes: 4 additions & 0 deletions src/dataprotection/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Release History
===============
1.5.1
+++++
* Added support for multi-user authentication for CMK encryption changes

1.5.0
+++++
* Support for vaulted backup for AKS
Expand Down
4 changes: 3 additions & 1 deletion src/dataprotection/azext_dataprotection/manual/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@
"disableSoftDelete": "/backupconfig/write",
"RecoveryServicesDisableImmutability": "/write#reduceImmutabilityState",
"RecoveryServicesStopProtection": "/backupFabrics/protectionContainers/protectedItems/write#stopProtectionWithRetainData",
"RecoveryServicesModifyEncryptionSettings": "/write#modifyEncryptionSettings",
"DisableMUA": "/backupResourceGuardProxies/delete",
"DeleteBackupInstance": "/backupInstances/delete",
"DataProtectionDisableImmutability": "/write#reduceImmutabilityState",
"DataProtectionSoftDelete": "/write#reduceSoftDeleteSecurity",
"DataProtectionStopProtection": "/backupInstances/stopProtection/action",
"DataProtectionSuspendBackup": "/backupInstances/suspendBackups/action",
"DataProtectionRestore": "/backupInstances/restore/action"}
"DataProtectionRestore": "/backupInstances/restore/action",
"DataProtectionModifyEncryptionSettings": "/write#modifyEncryptionSettings"}


datasource_map = {
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ interactions:
ParameterSetName:
- --datasource-type --datasource-id
User-Agent:
- AZURECLI/2.60.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0)
- AZURECLI/2.61.0 azsdk-python-core/1.28.0 Python/3.11.4 (Windows-10-10.0.22631-SP0)
method: POST
uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2021-03-01
response:
body:
string: '{"totalRecords":1,"count":1,"data":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest-dpp-rg/providers/Microsoft.DataProtection/backupVaults/clitest-bkp-vault-persistent-bi-donotdelete/backupInstances/clitest-disk-persistent-bi-donotdelete-clitest-disk-persistent-bi-donotdelete-e33c80ba-0bf8-11ee-aaa6-002b670b472e","name":"clitest-disk-persistent-bi-donotdelete-clitest-disk-persistent-bi-donotdelete-e33c80ba-0bf8-11ee-aaa6-002b670b472e","type":"microsoft.dataprotection/backupvaults/backupinstances","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","kind":"","location":"centraluseuap","resourceGroup":"clitest-dpp-rg","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","managedBy":"","sku":null,"plan":null,"properties":{"resourceGuardOperationRequests":null,"protectionStatus":{"errorDetails":null,"status":"ProtectionConfigured"},"friendlyName":"clitest-disk-persistent-bi-donotdelete","currentProtectionState":"ProtectionConfigured","objectType":"BackupInstance","dataSourceSetInfo":{"resourceLocation":"centraluseuap","datasourceType":"Microsoft.Compute/disks","objectType":"DatasourceSet","resourceID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest-dpp-rg/providers/Microsoft.Compute/disks/clitest-disk-persistent-bi-donotdelete","resourceProperties":null,"resourceType":"Microsoft.Compute/disks","resourceName":"clitest-disk-persistent-bi-donotdelete","resourceUri":"","baseUri":null},"dataSourceInfo":{"resourceLocation":"centraluseuap","datasourceType":"Microsoft.Compute/disks","objectType":"Datasource","resourceID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest-dpp-rg/providers/Microsoft.Compute/disks/clitest-disk-persistent-bi-donotdelete","resourceProperties":null,"resourceType":"Microsoft.Compute/disks","resourceName":"clitest-disk-persistent-bi-donotdelete","resourceUri":"","baseUri":null},"policyInfo":{"policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest-dpp-rg/providers/Microsoft.DataProtection/backupVaults/clitest-bkp-vault-persistent-bi-donotdelete/backupPolicies/diskpolicy","policyParameters":{"backupDatasourceParametersList":null,"dataStoreParametersList":[{"objectType":"AzureOperationalStoreParameters","dataStoreType":"OperationalStore","resourceGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest-dpp-rg"}],"tags":null},"policyVersion":null},"backupInstanceExtendedProperties":{"allowedOperations":["BackupNow","Restore","ChangePolicy","StopBackup","Delete"],"protectionStateInSecondaryRegion":"NotProtected","protectedPrimaryRegion":"centraluseuap","vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest-dpp-rg/providers/Microsoft.DataProtection/backupVaults/clitest-bkp-vault-persistent-bi-donotdelete","protectedSecondaryRegion":"","dataSourceExtendedInfo":{"dataSourceId":"clitest-disk-persistent-bi-donotdelete"},"policyExtendedInfo":{"configuredRPGenerationFrequencyInSecondaryRegion":"-10675199.02:48:05.4775808","configuredMaximumRetentionInSecondaryRegion":"-10675199.02:48:05.4775808","rpoWarningThresholdInSecondaryRegion":"-10675199.02:48:05.4775808","rpoWarningThresholdInPrimaryRegion":"1.12:00:00","configuredRPGenerationFrequency":"1.00:00:00","configuredMaximumRetention":"7.00:00:00"},"recoveryPointInfo":{"oldestRecoveryPointInSecondaryRegion":"0001-01-01T00:00:00.0000000Z","latestRecoveryPointInSecondaryRegion":"0001-01-01T00:00:00.0000000Z","latestRecoveryPointInPrimaryRegion":"0001-01-01T00:00:00.0000000Z","oldestRecoveryPointInPrimaryRegion":"0001-01-01T00:00:00.0000000Z"}},"datasourceAuthCredentials":null,"protectionErrorDetails":null,"dataSourceProperties":null,"provisioningState":"Succeeded","identityDetails":null,"validationType":null},"tags":null,"identity":null,"zones":null,"extendedLocation":null,"vaultName":"clitest-bkp-vault-persistent-bi-donotdelete","protectionState":"ProtectionConfigured","datasourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest-dpp-rg/providers/Microsoft.Compute/disks/clitest-disk-persistent-bi-donotdelete"}],"facets":[],"resultTruncated":"false"}'
string: '{"totalRecords":1,"count":1,"data":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest-dpp-rg/providers/Microsoft.DataProtection/backupVaults/clitest-bkp-vault-persistent-bi-donotdelete/backupInstances/clitest-disk-persistent-bi-donotdelete-clitest-disk-persistent-bi-donotdelete-e33c80ba-0bf8-11ee-aaa6-002b670b472e","name":"clitest-disk-persistent-bi-donotdelete-clitest-disk-persistent-bi-donotdelete-e33c80ba-0bf8-11ee-aaa6-002b670b472e","type":"microsoft.dataprotection/backupvaults/backupinstances","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","kind":"","location":"centraluseuap","resourceGroup":"clitest-dpp-rg","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","managedBy":"","sku":null,"plan":null,"properties":{"protectionStatus":{"errorDetails":null,"status":"ProtectionConfigured"},"resourceGuardOperationRequests":null,"friendlyName":"clitest-disk-persistent-bi-donotdelete","currentProtectionState":"ProtectionConfigured","objectType":"BackupInstance","dataSourceSetInfo":{"resourceLocation":"centraluseuap","datasourceType":"Microsoft.Compute/disks","objectType":"DatasourceSet","resourceID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest-dpp-rg/providers/Microsoft.Compute/disks/clitest-disk-persistent-bi-donotdelete","resourceType":"Microsoft.Compute/disks","resourceProperties":null,"resourceName":"clitest-disk-persistent-bi-donotdelete","resourceUri":"","baseUri":null},"dataSourceInfo":{"resourceLocation":"centraluseuap","datasourceType":"Microsoft.Compute/disks","objectType":"Datasource","resourceID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest-dpp-rg/providers/Microsoft.Compute/disks/clitest-disk-persistent-bi-donotdelete","resourceType":"Microsoft.Compute/disks","resourceProperties":null,"resourceName":"clitest-disk-persistent-bi-donotdelete","resourceUri":"","baseUri":null},"policyInfo":{"policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest-dpp-rg/providers/Microsoft.DataProtection/backupVaults/clitest-bkp-vault-persistent-bi-donotdelete/backupPolicies/diskpolicy","policyParameters":{"backupDatasourceParametersList":null,"dataStoreParametersList":[{"objectType":"AzureOperationalStoreParameters","dataStoreType":"OperationalStore","resourceGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest-dpp-rg"}],"tags":null},"policyVersion":null},"backupInstanceExtendedProperties":{"allowedOperations":["BackupNow","Restore","ChangePolicy","StopBackup","Delete"],"protectionStateInSecondaryRegion":"NotProtected","protectedPrimaryRegion":"centraluseuap","vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest-dpp-rg/providers/Microsoft.DataProtection/backupVaults/clitest-bkp-vault-persistent-bi-donotdelete","protectedSecondaryRegion":"","dataSourceExtendedInfo":{"dataSourceId":"clitest-disk-persistent-bi-donotdelete"},"policyExtendedInfo":{"configuredRPGenerationFrequencyInSecondaryRegion":"-10675199.02:48:05.4775808","configuredMaximumRetentionInSecondaryRegion":"-10675199.02:48:05.4775808","rpoWarningThresholdInSecondaryRegion":"-10675199.02:48:05.4775808","rpoWarningThresholdInPrimaryRegion":"1.12:00:00","configuredRPGenerationFrequency":"1.00:00:00","configuredMaximumRetention":"7.00:00:00"},"recoveryPointInfo":{"oldestRecoveryPointInSecondaryRegion":"0001-01-01T00:00:00.0000000Z","latestRecoveryPointInSecondaryRegion":"0001-01-01T00:00:00.0000000Z","latestRecoveryPointInPrimaryRegion":"0001-01-01T00:00:00.0000000Z","oldestRecoveryPointInPrimaryRegion":"0001-01-01T00:00:00.0000000Z"}},"datasourceAuthCredentials":null,"protectionErrorDetails":null,"dataSourceProperties":null,"provisioningState":"Succeeded","identityDetails":null,"validationType":null},"tags":null,"identity":null,"zones":null,"extendedLocation":null,"vaultName":"clitest-bkp-vault-persistent-bi-donotdelete","protectionState":"ProtectionConfigured","datasourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest-dpp-rg/providers/Microsoft.Compute/disks/clitest-disk-persistent-bi-donotdelete"}],"facets":[],"resultTruncated":"false"}'
headers:
cache-control:
- no-cache
Expand All @@ -38,7 +38,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Wed, 08 May 2024 10:31:37 GMT
- Wed, 26 Jun 2024 07:49:39 GMT
expires:
- '-1'
pragma:
Expand All @@ -50,15 +50,15 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-tenant-resource-requests:
- '13'
- '14'
x-ms-resource-graph-request-duration:
- '0:00:00:00.2389359'
- '0:00:00:00.6578580'
x-ms-user-quota-remaining:
- '13'
- '14'
x-ms-user-quota-resets-after:
- 00:00:04
- 00:00:05
x-msedge-ref:
- 'Ref A: 9473A98423A3408FA94F33F7E0760E96 Ref B: AMS231032607009 Ref C: 2024-05-08T10:31:37Z'
- 'Ref A: 45DCB150895445789166C6358C4EF817 Ref B: MAA201060516009 Ref C: 2024-06-26T07:49:38Z'
status:
code: 200
message: OK
Expand Down
Loading

0 comments on commit 692bee5

Please sign in to comment.