Skip to content

Commit af7ac79

Browse files
authored
Merge pull request #179213 from ThomasWeiss/thweiss-cosmosdb-msi-backup
Added clarifications related to MSI usage
2 parents 0d611cd + fe3ba2b commit af7ac79

File tree

2 files changed

+30
-5
lines changed

2 files changed

+30
-5
lines changed

articles/cosmos-db/continuous-backup-restore-introduction.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,19 @@ For example, if you have 1-TB of data in two regions then:
9595

9696
* Restore cost is calculated as (1000 * 0.15) = $150 per restore
9797

98+
## Customer-managed keys
99+
100+
See [How do customer-managed keys affect continuous backups?](./how-to-setup-cmk.md#how-do-customer-managed-keys-affect-continuous-backups) to learn:
101+
102+
- How to configure your Azure Cosmos DB account when using customer-managed keys in conjunction with continous backups.
103+
- How do customer-managed keys affect restores.
104+
98105
## Current limitations
99106

100107
Currently the point in time restore functionality has the following limitations:
101108

102109
* Only Azure Cosmos DB APIs for SQL and MongoDB are supported for continuous backup. Cassandra, Table, and Gremlin APIs are not yet supported.
103110

104-
* Accounts with customer-managed keys are not supported to use continuous backup.
105-
106111
* Multi-regions write accounts are not supported.
107112

108113
* Azure Synapse Link and periodic backup mode can coexist in the same database account. However, analytical store data isn't included in backups and restores. When Synapse Link is enabled, Azure Cosmos DB will continue to automatically take backups of your data in the transactional store at a scheduled backup interval.

articles/cosmos-db/how-to-setup-cmk.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ Because a system-assigned managed identity can only be retrieved after the creat
269269

270270
### To use a user-assigned managed identity
271271

272+
> [!IMPORTANT]
273+
> When using a user-assigned managed identity, firewall rules on the Azure Key Vault account aren't currently supported. You must keep your Azure Key Vault account accessible from all networks.
274+
272275
1. When creating the new access policy in your Azure Key Vault account as described [above](#add-access-policy), use the `Object ID` of the managed identity you wish to use instead of Azure Cosmos DB's first-party identity.
273276

274277
1. When creating your Azure Cosmos DB account, you must enable the user-assigned managed identity and specify that you want to use this identity when accessing your encryption keys in Azure Key Vault. You can do this:
@@ -393,11 +396,28 @@ From the Azure portal, go to your Azure Cosmos account and watch for the **Data
393396
394397
You can also programmatically fetch the details of your Azure Cosmos account and look for the presence of the `keyVaultKeyUri` property. See above for ways to do that [in PowerShell](#using-powershell) and [using the Azure CLI](#using-azure-cli).
395398
396-
### How do customer-managed keys affect a backup?
399+
### How do customer-managed keys affect periodic backups?
400+
401+
Azure Cosmos DB takes [regular and automatic backups](./online-backup-and-restore.md) of the data stored in your account. This operation backs up the encrypted data.
397402
398-
Azure Cosmos DB takes [regular and automatic backups](./online-backup-and-restore.md) of the data stored in your account. This operation backs up the encrypted data. The following conditions are necessary to successfully restore a backup:
403+
The following conditions are necessary to successfully restore a periodic backup:
399404
- The encryption key that you used at the time of the backup is required and must be available in Azure Key Vault. This means that no revocation was made and the version of the key that was used at the time of the backup is still enabled.
400-
- If you [used managed identities in the Azure Key Vault access policy](#using-managed-identity), the identity configured on the source account must not have been deleted and must still be declared in the access policy of the Azure Key Vault instance.
405+
- If you [used managed identities in the Azure Key Vault access policy](#using-managed-identity) of the source account, you must ensure that the target account will be allowed to access Key Vault as well.
406+
- If you used a system-assigned managed identity on the source account, the same identity can't be assigned to the target account. You should enable a system-assigned or user-assigned managed identity on the destination account, set this identity as the destination account's default identity, and declare this identity in the Azure Key Vault access policy.
407+
- If you used a user-assigned managed identity on the source account, assign the same identity to the destination account and set this identity as the destination account's default identity.
408+
409+
### How do customer-managed keys affect continuous backups?
410+
411+
Azure Cosmos DB gives you the option to configure [continuous backups](./continuous-backup-restore-introduction.md) on your account. With continuous backups, you can restore your data to any point in time within the past 30 days. To use continuous backups on an account where customer-managed keys are enabled, you must [use a user-assigned managed identity](#to-use-a-user-assigned-managed-identity) in the Key Vault access policy; the Azure Cosmos DB first-party identity or a system-assigned managed identity aren't currently supported.
412+
413+
The following conditions are necessary to successfully perform a point-in-time restore:
414+
- The encryption key that you used at the time of the backup is required and must be available in Azure Key Vault. This means that no revocation was made and the version of the key that was used at the time of the backup is still enabled.
415+
- You must ensure that the target account will be allowed to access Key Vault as well.
416+
- If you used a system-assigned managed identity on the source account, the same identity can't be assigned to the target account. You should enable a system-assigned or user-assigned managed identity on the destination account, set this identity as the destination account's default identity, and declare this identity in the Azure Key Vault access policy.
417+
- If you used a user-assigned managed identity on the source account, assign the same identity to the destination account and set this identity as the destination account's default identity.
418+
419+
> [!IMPORTANT]
420+
> If you revoke the encryption key before deleting your account, your account's backup may miss the data written after the revocation has been made.
401421
402422
### How do I revoke an encryption key?
403423

0 commit comments

Comments
 (0)