You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cosmos-db/managed-identity-based-authentication.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: How to use system assigned managed identities (MSI) to access to Azure Cosmos DB data.
2
+
title: How to use a system-assigned managed identity to access Azure Cosmos DB data.
3
3
description: Learn how to configure an Azure AD system-assigned managed identity to access keys from Azure Cosmos DB.
4
4
author: j-patrick
5
5
ms.service: cosmos-db
@@ -10,21 +10,21 @@ ms.reviewer: sngun
10
10
11
11
---
12
12
13
-
# How to use system-assigned Managed Service Identities (MSI) to access Azure Cosmos DB data
13
+
# How to use a system-assigned managed identity to access Azure Cosmos DB data.
14
14
15
-
In this article you will set up a **robust, key rotation agnostic,** solution to manage Azure Cosmos DB keys by leveraging [Managed Service Identities](../active-directory/managed-identities-azure-resources/services-support-managed-identities.md). The example in this article uses an Azure Function. However, you can achieve this solution by using any service that supports managed service identities.
15
+
In this article you will set up a **robust, key rotation agnostic,** solution to manage Azure Cosmos DB keys by leveraging [Managed Identities](../active-directory/managed-identities-azure-resources/services-support-managed-identities.md). The example in this article uses an Azure Function. However, you can achieve this solution by using any service that supports managed identities.
16
16
17
17
You'll learn how to create an Azure Function that can access Azure Cosmos DB without copying a key.
18
18
19
-
You will build an Azure Function that handles summarizing the last hour of sales information. The function runs every hour, it reads a set of sale receipts from Azure Cosmos DB. Then the function will create an hourly summary of sales and store it back in the Azure Cosmos container. To simplify the scenario, the processed receipts are deleted by a configured [Time To Live](./time-to-live.md) setting.
19
+
You will build an Azure Function that handles summarizing the last hour of sales information. The Azure Function runs every hour, it reads a set of sale receipts from Azure Cosmos DB. Then the function will create an hourly summary of sales and store it back in the Azure Cosmos container. To simplify the scenario, the processed receipts are deleted by a configured [Time To Live](./time-to-live.md) setting.
20
+
21
+
Setting up a timer triggered Azure Function is outlined in [Create a function in Azure that is triggered by a timer](../azure-functions/functions-create-scheduled-function.md) article.
20
22
21
23
## Assign a system-assigned Managed Identity to an Azure Function
22
24
23
25
In this step, you'll assign a system-assigned managed identity to your Azure Function.
24
26
25
-
1. Sign into the [Azure portal](https://portal.azure.com/)
26
-
27
-
1. Open the **Azure Function** pane and navigate to your function app.
27
+
1. In the [Azure portal](https://portal.azure.com/), open the **Azure Function** pane and navigate to your function app.
28
28
29
29
1. Open the **Platform features** > **Identity** tab:
@@ -45,7 +45,7 @@ In this step, you'll assign a role to the Azure Function's system-assigned manag
45
45
> RBAC support in Azure Cosmos DB is applicable to control plane operations only. Data plane operations are secured using master keys or resource tokens. To learn more, see the [Secure access to data](secure-access-to-data.md) article.
46
46
47
47
> [!TIP]
48
-
> When assigning roles, only assign the needed access. If your service only requires reading data, then assign the Managed Service Identity to **Cosmos DB Account Reader** role. For more information about the importance of least privilege access, see the [lower exposure of privileged accounts](../security/fundamentals/identity-management-best-practices.md#lower-exposure-of-privileged-accounts) article.
48
+
> When assigning roles, only assign the needed access. If your service only requires reading data, then assign the Managed Identity to **Cosmos DB Account Reader** role. For more information about the importance of least privilege access, see the [lower exposure of privileged accounts](../security/fundamentals/identity-management-best-practices.md#lower-exposure-of-privileged-accounts) article.
49
49
50
50
For your scenario, you will read the sale receipt documents, summarize them, and then write back that summary to a container in Azure Cosmos DB. Because you have to write the data, you will use the **DocumentDB Account Contributor** role.
51
51
@@ -61,7 +61,7 @@ For your scenario, you will read the sale receipt documents, summarize them, and
***Assign access to** - Under the Select **System-assigned managed identity** subsection, select **Function App**.
63
63
***Select** - The pane will be populated with all the function apps, in your subscription, that have a **Managed System Identity**. In our case I select the **SummaryService** function app:
0 commit comments