Skip to content

Commit 1352346

Browse files
authored
Merge pull request #109948 from ScarlettFalls/service-principal-fix
Service principal guidance for production checklist
2 parents 0702173 + a40905e commit 1352346

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

articles/iot-edge/production-checklist.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to take your Azure IoT Edge solution from development to
44
author: kgremban
55
manager: philmea
66
ms.author: kgremban
7-
ms.date: 08/09/2019
7+
ms.date: 4/02/2020
88
ms.topic: conceptual
99
ms.service: iot-edge
1010
services: iot-edge
@@ -129,11 +129,25 @@ When moving from test scenarios to production scenarios, remember to remove debu
129129
* Manage access to your container registry
130130
* Use tags to manage versions
131131

132-
### Manage access to your container registry
132+
### Manage access to your container registry with a service principal
133133

134134
Before you deploy modules to production IoT Edge devices, ensure that you control access to your container registry so that outsiders can't access or make changes to your container images. Use a private, not public, container registry to manage container images.
135135

136-
In the tutorials and other documentation, we instruct you to use the same container registry credentials on your IoT Edge device as you use on your development machine. These instructions are only intended to help you set up testing and development environments more easily, and should not be followed in a production scenario. Azure Container Registry recommends [authenticating with service principals](../container-registry/container-registry-auth-service-principal.md) when applications or services pull container images in an automated or otherwise unattended manner, as IoT Edge devices do. Create a service principal with read-only access to your container registry, and provide that username and password in the deployment manifest.
136+
In the tutorials and other documentation, we instruct you to use the same container registry credentials on your IoT Edge device as you use on your development machine. These instructions are only intended to help you set up testing and development environments more easily, and should not be followed in a production scenario. Azure Container Registry recommends [authenticating with service principals](../container-registry/container-registry-auth-service-principal.md) when applications or services pull container images in an automated or otherwise unattended manner (headless), as IoT Edge devices do.
137+
138+
To create a service principal, run the two scripts as described in [create a service principal](../container-registry/container-registry-auth-aci.md#create-a-service-principal). These scripts do the following tasks:
139+
140+
* The first script creates the service principal. It outputs the Service principal ID and the Service principal password. Store these values securely in your records.
141+
142+
* The second script creates role assignments to grant to the service principal, which can be run subsequently if needed. We recommend applying the **acrPull** user role for the `role` parameter. For a list of roles, see [Azure Container Registry roles and permissions](../container-registry/container-registry-roles.md)
143+
144+
To authenticate using a service principal, provide the service principal ID and password that you obtained from the first script.
145+
146+
* For the username or client ID, specify the service principal ID.
147+
148+
* For the password or client secret, specify the service principal password.
149+
150+
For an example of launching a container instance with Azure CLI, see [Authenticate using the service principal](../container-registry/container-registry-auth-aci.md#authenticate-using-the-service-principal).
137151

138152
### Use tags to manage versions
139153

0 commit comments

Comments
 (0)