Skip to content

Commit 35bee81

Browse files
committed
Line edits2
1 parent c0c3028 commit 35bee81

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

learn-pr/azure/authenticate-azure-deployment-pipeline-service-principals/includes/5-grant-service-principal-access-azure.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ After Microsoft Entra ID has authenticated a service principal, the next questio
1313
1414
## Select the right role assignment for your pipeline
1515

16-
A role assignment has three key parts: who the role is assigned to (the *assignee*), what they can do (the *role*), and what resource or resources the role assignment applies to (the *scope*).
16+
A role assignment has three key parts: who the role is assigned to (the _assignee_), what they can do (the _role_), and what resource or resources the role assignment applies to (the _scope_).
1717

1818
### Assignee
1919

@@ -23,9 +23,9 @@ When you work with a service principal, you assign roles for that service princi
2323

2424
It can be a little more work to figure out which role to assign. In Azure, there are a few common roles:
2525

26-
- *Reader*, which allows the assignee to read information about resources but not modify or delete them.
27-
- *Contributor*, which allows the assignee to create resources, and to read and modify existing resources. However, contributors can't grant other principals access to resources.
28-
- *Owner*, which allows full control over resources, including granting other principals access.
26+
- _Reader_, which allows the assignee to read information about resources but not modify or delete them.
27+
- _Contributor_, which allows the assignee to create resources and to read and modify existing resources. However, contributors can't grant other principals access to resources.
28+
- _Owner_, which allows full control over resources, including granting other principals access.
2929

3030
> [!CAUTION]
3131
> You should only grant service principals the minimum permissions that they need to do their jobs. Most of the time, the Owner role is too permissive for a deployment pipeline.
@@ -50,12 +50,12 @@ Remember that role assignments are inherited. If you assign a role at a subscrip
5050
Now that you understand the components of a role assignment, you can decide the appropriate values for your scenarios. Here are some general guidelines to consider:
5151

5252
> [!div class="checklist"]
53-
> * Use the least permissive role that you can. If your pipeline is only going to deploy basic Bicep templates and won't manage role assignments, don't use the Owner role.
54-
> * Use the narrowest scope that you can. Most pipelines only need to deploy resources to a resource group, so they shouldn't be given subscription-scoped role assignments.
55-
> * For many pipelines, a good default option for a role assignment is the Contributor role on the resource group scope.
56-
> * Consider everything your pipeline does, and everything it might do in the future. For example, you might consider creating a custom role definition for your website's deployment pipeline and only grant permissions for App Service and Application Insights. Next month, you might need to add an Azure Cosmos DB account to your Bicep file, but the custom role will block Azure Cosmos DB resources from being created.
53+
> - Use the least permissive role that you can. If your pipeline is only going to deploy basic Bicep templates and won't manage role assignments, don't use the Owner role.
54+
> - Use the narrowest scope that you can. Most pipelines only need to deploy resources to a resource group, so they shouldn't be given subscription-scoped role assignments.
55+
> - For many pipelines, a good default option for a role assignment is the Contributor role on the resource group scope.
56+
> - Consider everything your pipeline does, and everything it might do in the future. For example, you might consider creating a custom role definition for your website's deployment pipeline and only grant permissions for App Service and Application Insights. Next month, you might need to add an Azure Cosmos DB account to your Bicep file, but the custom role will block Azure Cosmos DB resources from being created.
5757
Instead, it's often better to use a built-in role, or a combination of built-in roles, to avoid having to repeatedly change your role definitions. Consider using Azure Policy to enforce your governance requirements for allowed services, SKUs, and locations.
58-
> * Test the pipeline to verify that the role assignment works.
58+
> - Test the pipeline to verify that the role assignment works.
5959
6060
### Mixing and matching role assignments
6161

@@ -113,7 +113,7 @@ Let's look at each argument:
113113

114114
> [!TIP]
115115
> It's a good practice to provide a justification for your role assignments by specifying a description. A description helps anyone who reviews the role assignments later to understand their purpose, and to understand how you decided on the assignee, role, and scope.
116-
116+
>
117117
> [!NOTE]
118118
> Role assignments can take a few minutes to become active.
119119

learn-pr/azure/authenticate-azure-deployment-pipeline-service-principals/includes/6-exercise-authorize-service-principal-deployments.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ In the previous exercise, you signed in by using the service principal and then
1616

1717
::: zone pivot="cli"
1818

19-
1. In Visual Studio Code's Azure Cloud Shell (bash) terminal, sign in to Azure by running the following command:
19+
1. In Visual Studio Code's Azure Cloud Shell (bash) terminal, sign in to Azure by running the following command:
2020

2121
```azurecli
2222
az login
@@ -70,9 +70,9 @@ Now you'll create a resource group to contain the toy company's website resource
7070

7171
For your website's deployment pipeline, you decide to create a role assignment with the following details:
7272

73-
- **Assignee**: The service principal that you created in the previous exercise.
74-
- **Role**: The Contributor built-in role.
75-
- **Scope**: The resource group that you created in the previous step.
73+
* **Assignee**: The service principal that you created in the previous exercise.
74+
* **Role**: The Contributor built-in role.
75+
* **Scope**: The resource group that you created in the previous step.
7676

7777
::: zone pivot="cli"
7878

@@ -116,7 +116,7 @@ You previously created a Bicep file that deploys your website's resources. Here,
116116

117117
## Deploy the Bicep file by using the service principal
118118

119-
You don't currently have a deployment pipeline, so you'll simulate what a pipeline does to deploy your Bicep file.
119+
You don't currently have a deployment pipeline, so you'll simulate what a pipeline does to deploy your Bicep file.
120120

121121
::: zone pivot="cli"
122122

@@ -183,8 +183,8 @@ Use the Azure portal to inspect the resources that you deployed and to inspect t
183183

184184
You might also see a deployment named **Failure-Anomalies-Alert-Rule-Deployment**. Application Insights creates this deployment automatically.
185185

186-
1. Select the **main** deployment to see what resources were deployed, and then expand **Deployment details**.
187-
186+
1. Select the **main** deployment to see what resources were deployed, and then expand **Deployment details**.
187+
188188
In this case, the App Service plan, the app, and the Application Insights instance are listed.
189189

190190
:::image type="content" source="../media/6-deployment-details.png" alt-text="Screenshot of the Azure portal deployments overview pane for the main deployment, with an App Service plan and app, and an Application Insights instance listed." border="true":::
@@ -193,7 +193,7 @@ Use the Azure portal to inspect the resources that you deployed and to inspect t
193193

194194
## Clean up the resource group and service principal
195195

196-
You've successfully created a service principal and role assignment, and you've deployed your website's resources by using a Bicep file. You can now remove the resources that you created.
196+
You've successfully created a service principal and role assignment, and you've deployed your website's resources by using a Bicep file. You can now remove the resources that you created.
197197

198198
::: zone pivot="cli"
199199

@@ -203,7 +203,7 @@ You've successfully created a service principal and role assignment, and you've
203203
az logout
204204
```
205205

206-
1. Sign back in to Azure with your own user account by running the following command:
206+
1. Sign back in to Azure with your own user account by running the following command:
207207

208208
```azurecli
209209
az login
@@ -219,7 +219,7 @@ You've successfully created a service principal and role assignment, and you've
219219

220220
When you're prompted to confirm, enter `y`.
221221

222-
2. Run the following command to delete the service principal. Replace the `APPLICATION_ID` placeholder with the application ID that you copied in the previous exercise:
222+
1. Run the following command to delete the service principal. Replace the `APPLICATION_ID` placeholder with the application ID that you copied in the previous exercise:
223223

224224
```azurecli
225225
az ad sp delete --id APPLICATION_ID
@@ -235,7 +235,7 @@ You've successfully created a service principal and role assignment, and you've
235235
Logout-AzAccount
236236
```
237237

238-
1. Sign back in to Azure with your own user account by running the following command:
238+
1. Sign back in to Azure with your own user account by running the following command:
239239

240240
```azurepowershell
241241
Connect-AzAccount
@@ -259,4 +259,4 @@ You've successfully created a service principal and role assignment, and you've
259259

260260
When you're prompted to confirm, enter `y`.
261261

262-
::: zone-end
262+
::: zone-end

0 commit comments

Comments
 (0)