Skip to content

Commit a591598

Browse files
committed
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-pr into rolyon-rbac-elevate-access-fixes
2 parents 0b0aa4e + 7ff6af6 commit a591598

File tree

4 files changed

+78
-82
lines changed

4 files changed

+78
-82
lines changed

articles/active-directory/app-provisioning/customize-application-attributes.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ The SCIM RFC defines a core user and group schema, while also allowing for exten
139139
4. Select **Edit attribute list for AppName**.
140140
5. At the bottom of the attribute list, enter information about the custom attribute in the fields provided. Then select **Add Attribute**.
141141

142-
For SCIM applications, the attribute name must follow the pattern shown in the example below. The "CustomExtensionName" and "CustomAttribute" can be customized per your application's requirements, for example: urn:ietf:params:scim:schemas:extension:2.0:CustomExtensionName:CustomAttribute or urn:ietf:params:scim:schemas:extension:CustomExtensionName:2.0:User.CustomAttributeName:value
142+
For SCIM applications, the attribute name must follow the pattern shown in the example below. The "CustomExtensionName" and "CustomAttribute" can be customized per your application's requirements, for example:
143+
* urn:ietf:params:scim:schemas:extension:CustomExtensionName:2.0:User:CustomAttribute
144+
* urn:ietf:params:scim:schemas:extension:2.0:CustomExtensionName:CustomAttribute
145+
* urn:ietf:params:scim:schemas:extension:CustomExtensionName:2.0:User.CustomAttributeName:value
143146

144147
These instructions are only applicable to SCIM-enabled applications. Applications such as ServiceNow and Salesforce are not integrated with Azure AD using SCIM, and therefore they don't require this specific namespace when adding a custom attribute.
145148

articles/cognitive-services/Custom-Vision-Service/toc.yml

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,41 +9,33 @@
99
href: whats-new.md
1010
- name: Quickstarts
1111
items:
12-
- name: Using the web portal
12+
- name: Build a classifier
1313
items:
14-
- name: Build a classifier
14+
- name: Using the web portal
1515
href: getting-started-build-a-classifier.md
16-
- name: Build an object detector
17-
href: get-started-build-detector.md
18-
- name: Using the .NET SDK
19-
items:
20-
- name: Image classification
16+
- name: Using the .NET SDK
2117
href: csharp-tutorial.md
22-
- name: Object detection
23-
href: csharp-tutorial-od.md
24-
- name: Using the Python SDK
25-
items:
26-
- name: Image classification
18+
- name: Using the Python SDK
2719
href: python-tutorial.md
28-
- name: Object detection
29-
href: python-tutorial-od.md
30-
- name: Using the Java SDK
31-
items:
32-
- name: Image classification
20+
- name: Using the Java SDK
3321
href: java-tutorial.md
34-
- name: Object detection
35-
href: java-tutorial-od.md
36-
- name: Using the Node.js SDK
37-
items:
38-
- name: Image classification
22+
- name: Using the Node.js SDK
3923
href: node-tutorial.md
40-
- name: Object detection
41-
href: node-tutorial-object-detection.md
42-
- name: Using the Go SDK
43-
items:
44-
- name: Image classification
24+
- name: Using the Go SDK
4525
href: go-tutorial.md
46-
- name: Object detection
26+
- name: Build an object detector
27+
items:
28+
- name: Using the web portal
29+
href: get-started-build-detector.md
30+
- name: Using the .NET SDK
31+
href: csharp-tutorial-od.md
32+
- name: Using the Python SDK
33+
href: python-tutorial-od.md
34+
- name: Using the Java SDK
35+
href: java-tutorial-od.md
36+
- name: Using the Node.js SDK
37+
href: node-tutorial-object-detection.md
38+
- name: Using the Go SDK
4739
href: go-tutorial-object-detection.md
4840
- name: Tutorials
4941
items:

articles/cosmos-db/managed-identity-based-authentication.md

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: How to use a system-assigned managed identity to access Azure Cosmos DB data
3-
description: Learn how to configure an Azure AD system-assigned managed identity to access keys from Azure Cosmos DB. msi, managed service identity, aad, azure active directory, identity
3+
description: Learn how to configure an Azure Active Directory (Azure AD) system-assigned managed identity (managed service identity) to access keys from Azure Cosmos DB.
44
author: j-patrick
55
ms.service: cosmos-db
66
ms.topic: conceptual
@@ -10,71 +10,71 @@ ms.reviewer: sngun
1010

1111
---
1212

13-
# How to use a system-assigned managed identity to access Azure Cosmos DB data
13+
# Use system-assigned managed identities to access Azure Cosmos DB data
1414

15-
In this article you will set up a **robust, key rotation agnostic,** solution to access 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.
15+
In this article, you'll set up a *robust, key rotation agnostic* solution to access Azure Cosmos DB keys by using [managed identities](../active-directory/managed-identities-azure-resources/services-support-managed-identities.md). The example in this article uses Azure Functions, but you can use any service that supports managed identities.
1616

17-
You'll learn how to create an Azure Function that can access Azure Cosmos DB without needing to copy any Azure Cosmos DB keys. The function will wake up every minute and record the current temperature of an aquarium fish tank. To learn how to set up a timer triggered Azure Function see the [Create a function in Azure that is triggered by a timer](../azure-functions/functions-create-scheduled-function.md) article.
17+
You'll learn how to create a function app that can access Azure Cosmos DB data without needing to copy any Azure Cosmos DB keys. The function app will wake up every minute and record the current temperature of an aquarium fish tank. To learn how to set up a timer-triggered function app, see the [Create a function in Azure that is triggered by a timer](../azure-functions/functions-create-scheduled-function.md) article.
1818

19-
To simplify the scenario, cleanup of older temperature documents is handled by an already configured [Time To Live](./time-to-live.md) setting.
19+
To simplify the scenario, a [Time To Live](./time-to-live.md) setting is already configured to clean up older temperature documents.
2020

21-
## Assign a system-assigned managed identity to an Azure Function
21+
## Assign a system-assigned managed identity to a function app
2222

23-
In this step, you'll assign a system-assigned managed identity to your Azure Function.
23+
In this step, you'll assign a system-assigned managed identity to your function app.
2424

25-
1. In the [Azure portal](https://portal.azure.com/), open the **Azure Function** pane and navigate to your function app.
25+
1. In the [Azure portal](https://portal.azure.com/), open the **Azure Function** pane and go to your function app.
2626

2727
1. Open the **Platform features** > **Identity** tab:
2828

29-
![Identity Tab](./media/managed-identity-based-authentication/identity-tab-selection.png)
29+
![Screenshot showing Platform features and Identity options for the function app.](./media/managed-identity-based-authentication/identity-tab-selection.png)
3030

31-
1. On the **Identity** tab, turn **On** the **System Identity** status. Be sure to select **Save**, and confirm that you want to turn on the system identity. At the end the **System Identity** pane should look as follows:
31+
1. On the **Identity** tab, turn **On** the system identity **Status** and select **Save**. The **Identity** pane should look as follows:
3232

33-
![System Identity turned on](./media/managed-identity-based-authentication/identity-tab-system-managed-on.png)
33+
![Screenshot showing system identity Status set to On.](./media/managed-identity-based-authentication/identity-tab-system-managed-on.png)
3434

35-
## Grant the managed identity access to your Azure Cosmos account
35+
## Grant access to your Azure Cosmos account
3636

37-
In this step, you'll assign a role to the Azure Function's system-assigned managed identity. Azure Cosmos DB has multiple built-in roles that you can assign to the managed identity. For this solution, you will use the following two roles:
37+
In this step, you'll assign a role to the function app's system-assigned managed identity. Azure Cosmos DB has multiple built-in roles that you can assign to the managed identity. For this solution, you'll use the following two roles:
3838

3939
|Built-in role |Description |
4040
|---------|---------|
4141
|[DocumentDB Account Contributor](../role-based-access-control/built-in-roles.md#documentdb-account-contributor)|Can manage Azure Cosmos DB accounts. Allows retrieval of read/write keys. |
4242
|[Cosmos DB Account Reader](../role-based-access-control/built-in-roles.md#cosmos-db-account-reader-role)|Can read Azure Cosmos DB account data. Allows retrieval of read keys. |
4343

4444
> [!IMPORTANT]
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.
45+
> Support for role-based access control in Azure Cosmos DB applies to control plane operations only. Data plane operations are secured through master keys or resource tokens. To learn more, see the [Secure access to data](secure-access-to-data.md) article.
4646
4747
> [!TIP]
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.
48+
> When you assign roles, assign only the needed access. If your service requires only reading data, then assign the **Cosmos DB Account Reader** role to the managed identity. 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.
4949
50-
For your scenario, you will read the temperature, then write back that data to a container in Azure Cosmos DB. Because you have to write the data, you will use the **DocumentDB Account Contributor** role.
50+
In this scenario, the function app will read the temperature of the aquarium, then write back that data to a container in Azure Cosmos DB. Because the function app must write the data, you'll need to assign the **DocumentDB Account Contributor** role.
5151

52-
1. Sign in to the Azure portal and navigate to your Azure Cosmos DB account. Open the **Access Management (IAM) Pane**, and then the **Role Assignments** tab:
52+
1. Sign in to the Azure portal and go to your Azure Cosmos DB account. Open the **Access control (IAM)** pane and then the **Role assignments** tab:
5353

54-
![IAM Pane](./media/managed-identity-based-authentication/cosmos-db-iam-tab.png)
54+
![Screenshot showing the Access control pane and the Role assignments tab.](./media/managed-identity-based-authentication/cosmos-db-iam-tab.png)
5555

56-
1. Select the **+ Add** button, then **add role assignment**.
56+
1. Select **+ Add** > **Add role assignment**.
5757

58-
1. The **Add Role Assignment** panel opens to the right:
58+
1. The **Add role assignment** panel opens to the right:
5959

60-
![Add Role](./media/managed-identity-based-authentication/cosmos-db-iam-tab-add-role-pane.png)
60+
![Screenshot showing the Add role assignment pane.](./media/managed-identity-based-authentication/cosmos-db-iam-tab-add-role-pane.png)
6161

62-
* **Role** - Select **DocumentDB Account Contributor**
63-
* **Assign access to** - Under the Select **System-assigned managed identity** subsection, select **Function App**.
64-
* **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:
62+
* **Role**: Select **DocumentDB Account Contributor**
63+
* **Assign access to**: Under the **Select system-assigned managed identity** subsection, select **Function App**.
64+
* **Select**: The pane will be populated with all the function apps in your subscription that have a **Managed System Identity**. In this case, select the **SummaryService** function app:
6565

66-
![Select Assignment](./media/managed-identity-based-authentication/cosmos-db-iam-tab-add-role-pane-filled.png)
66+
![Screenshot showing the Add role assignment pane populated with examples.](./media/managed-identity-based-authentication/cosmos-db-iam-tab-add-role-pane-filled.png)
6767

68-
1. After the function app's identity is selected click **Save**.
68+
1. After you have selected your function app, select **Save**.
6969

70-
## Programmatically access the Azure Cosmos DB keys from the Azure Function
70+
## Programmatically access the Azure Cosmos DB keys
7171

72-
Now we have a function app that has a system-assigned managed identity. That identity is given the **DocumentDB Account Contributor** role in the Azure Cosmos DB permissions. The following function app code will get the Azure Cosmos DB keys, create a CosmosClient object, get the temperature, then save this to Cosmos DB.
72+
Now we have a function app that has a system-assigned managed identity with the **DocumentDB Account Contributor** role in the Azure Cosmos DB permissions. The following function app code will get the Azure Cosmos DB keys, create a CosmosClient object, get the temperature of the aquarium, and then save this to Azure Cosmos DB.
7373

7474
This sample uses the [List Keys API](https://docs.microsoft.com/rest/api/cosmos-db-resource-provider/DatabaseAccounts/ListKeys) to access your Azure Cosmos DB account keys.
7575

7676
> [!IMPORTANT]
77-
> If you want to [assign the **Cosmos DB Account Reader**](#grant-the-managed-identity-access-to-your-azure-cosmos-account) role, you will need to use the read only [List Keys api](https://docs.microsoft.com/rest/api/cosmos-db-resource-provider/DatabaseAccounts/ListReadOnlyKeys). This will only populate the read only keys.
77+
> If you want to [assign the Cosmos DB Account Reader](#grant-access-to-your-azure-cosmos-account) role, you'll need to use the [List Read Only Keys API](https://docs.microsoft.com/rest/api/cosmos-db-resource-provider/DatabaseAccounts/ListReadOnlyKeys). This will populate just the read-only keys.
7878
7979
The List Keys API returns the `DatabaseAccountListKeysResult` object. This type isn't defined in the C# libraries. The following code shows the implementation of this class:
8080

@@ -91,7 +91,7 @@ namespace SummarizationService
9191
}
9292
```
9393

94-
The example also uses a simple document called "TemperatureRecord", which is defined as follows:
94+
The example also uses a simple document called "TemperatureRecord," which is defined as follows:
9595

9696
```csharp
9797
using System;
@@ -108,7 +108,8 @@ namespace Monitor
108108
}
109109
```
110110

111-
You will use the [Microsoft.Azure.Services.AppAuthentication](https://www.nuget.org/packages/Microsoft.Azure.Services.AppAuthentication) library to get the system-assigned managed identity token. To learn other ways to get the token and more information about the `Microsoft.Azure.Service.AppAuthentication` library, see the [Service To Service Authentication](../key-vault/general/service-to-service-authentication.md) article.
111+
You'll use the [Microsoft.Azure.Services.AppAuthentication](https://www.nuget.org/packages/Microsoft.Azure.Services.AppAuthentication) library to get the system-assigned managed identity token. To learn other ways to get the token and find out more information about the `Microsoft.Azure.Service.AppAuthentication` library, see the [Service-to-service authentication](../key-vault/general/service-to-service-authentication.md) article.
112+
112113

113114
```csharp
114115
using System;
@@ -145,20 +146,20 @@ namespace Monitor
145146
// AzureServiceTokenProvider will help us to get the Service Managed token.
146147
var azureServiceTokenProvider = new AzureServiceTokenProvider();
147148

148-
// In order to get the Service Managed token we need to authenticate to the Azure Resource Manager.
149+
// Authenticate to the Azure Resource Manager to get the Service Managed token.
149150
string accessToken = await azureServiceTokenProvider.GetAccessTokenAsync("https://management.azure.com/");
150151

151-
// To get the Azure Cosmos DB keys setup the List Keys API:
152+
// Setup the List Keys API to get the Azure Cosmos DB keys.
152153
string endpoint = $"https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys?api-version=2019-12-12";
153154

154-
// setup an HTTP Client and add the access token.
155+
// Setup an HTTP Client and add the access token.
155156
HttpClient httpClient = new HttpClient();
156157
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
157158

158159
// Post to the endpoint to get the keys result.
159160
var result = await httpClient.PostAsync(endpoint, new StringContent(""));
160161

161-
// Get the Result back as a DatabaseAccountListKeysResult.
162+
// Get the result back as a DatabaseAccountListKeysResult.
162163
DatabaseAccountListKeysResult keys = await result.Content.ReadAsAsync<DatabaseAccountListKeysResult>();
163164

164165
log.LogInformation("Starting to create the client");
@@ -183,18 +184,18 @@ namespace Monitor
183184

184185
private static int GetTemperature()
185186
{
186-
// fake the temperature sensor for this demo
187+
// Fake the temperature sensor for this demo.
187188
Random r = new Random(DateTime.UtcNow.Second);
188189
return r.Next(0, 120);
189190
}
190191
}
191192
}
192193
```
193194

194-
You are now ready to [deploy your Azure Function](../azure-functions/functions-create-first-function-vs-code.md).
195+
You are now ready to [deploy your function app](../azure-functions/functions-create-first-function-vs-code.md).
195196

196197
## Next steps
197198

198-
* [Certificate-based authentication with Azure Cosmos DB and Active Directory](certificate-based-authentication.md)
199-
* [Secure Azure Cosmos keys using Azure Key Vault](access-secrets-from-keyvault.md)
199+
* [Certificate-based authentication with Azure Cosmos DB and Azure Active Directory](certificate-based-authentication.md)
200+
* [Secure Azure Cosmos DB keys using Azure Key Vault](access-secrets-from-keyvault.md)
200201
* [Security baseline for Azure Cosmos DB](security-baseline.md)

0 commit comments

Comments
 (0)