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/iot-dps/how-to-revoke-device-access-portal.md
+38-23Lines changed: 38 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,32 +3,31 @@ title: Disenroll device from Azure IoT Hub Device Provisioning Service
3
3
description: How to disenroll a device to prevent provisioning through Azure IoT Hub Device Provisioning Service (DPS)
4
4
author: wesmc7777
5
5
ms.author: wesmc
6
-
ms.date: 04/05/2018
6
+
ms.date: 01/24/2022
7
7
ms.topic: conceptual
8
8
ms.service: iot-dps
9
9
services: iot-dps
10
-
manager: timlt
11
10
---
12
11
13
12
# How to disenroll a device from Azure IoT Hub Device Provisioning Service
14
13
15
-
Proper management of device credentials is crucial for high-profile systems like IoT solutions. A best practice for such systems is to have a clear plan of how to revoke access for devices when their credentials, whether a shared access signatures (SAS) token or an X.509 certificate, might be compromised.
14
+
Proper management of device credentials is crucial for high-profile systems like IoT solutions. A best practice for such systems is to have a clear plan of how to revoke access for devices when their credentials, whether a shared access signatures (SAS) token or an X.509 certificate, might be compromised.
16
15
17
-
Enrollment in the Device Provisioning Service enables a device to be [provisioned](about-iot-dps.md#provisioning-process). A provisioned device is one that has been registered with IoT Hub, allowing it to receive its initial [device twin](~/articles/iot-hub/iot-hub-devguide-device-twins.md) state and begin reporting telemetry data. This article describes how to disenroll a device from your provisioning service instance, preventing it from being provisioned again in the future.
16
+
Enrollment in the Device Provisioning Service enables a device to be [provisioned](about-iot-dps.md#provisioning-process). A provisioned device is one that has been registered with IoT Hub, allowing it to receive its initial [device twin](~/articles/iot-hub/iot-hub-devguide-device-twins.md) state and begin reporting telemetry data. This article describes how to disenroll a device from your provisioning service instance, preventing it from being provisioned again in the future. To learn how to deprovision a device that has already been provisioned to an IoT hub, see [Manage deprovisioning](how-to-unprovision-devices.md).
18
17
19
18
> [!NOTE]
20
19
> Be aware of the retry policy of devices that you revoke access for. For example, a device that has an infinite retry policy might continuously try to register with the provisioning service. That situation consumes service resources and possibly affects performance.
21
20
22
21
## Disallow devices by using an individual enrollment entry
23
22
24
-
Individual enrollments apply to a single device and can use X.509 certificates, TPM endorsement keys (in a real or virtual TPM), or SAS tokens as the attestation mechanism. To disallow a device that has an individual enrollment, you can either disable or delete its enrollment entry.
23
+
Individual enrollments apply to a single device and can use X.509 certificates, TPM endorsement keys (in a real or virtual TPM), or SAS tokens as the attestation mechanism. To disallow a device that has an individual enrollment, you can either disable or delete its enrollment entry.
25
24
26
-
To temporarily disallow the device by disabling its enrollment entry:
25
+
To temporarily disallow the device by disabling its enrollment entry:
27
26
28
27
1. Sign in to the Azure portal and select **All resources** from the left menu.
29
28
2. In the list of resources, select the provisioning service that you want to disallow your device from.
30
29
3. In your provisioning service, select **Manage enrollments**, and then select the **Individual Enrollments** tab.
31
-
4. Select the enrollment entry for the device that you want to disallow.
30
+
4. Select the enrollment entry for the device that you want to disallow.
32
31
33
32

34
33
@@ -41,21 +40,20 @@ To permanently disallow the device by deleting its enrollment entry:
41
40
1. Sign in to the Azure portal and select **All resources** from the left menu.
42
41
2. In the list of resources, select the provisioning service that you want to disallow your device from.
43
42
3. In your provisioning service, select **Manage enrollments**, and then select the **Individual Enrollments** tab.
44
-
4. Select the check box next to the enrollment entry for the device that you want to disallow.
45
-
5. Select **Delete** at the top of the window, and then select **Yes** to confirm that you want to remove the enrollment.
43
+
4. Select the check box next to the enrollment entry for the device that you want to disallow.
44
+
5. Select **Delete** at the top of the window, and then select **Yes** to confirm that you want to remove the enrollment.
46
45
47
46

48
47
49
-
50
48
After you finish the procedure, you should see your entry removed from the list of individual enrollments.
51
49
52
50
## Disallow an X.509 intermediate or root CA certificate by using an enrollment group
53
51
54
-
X.509 certificates are typically arranged in a certificate chain of trust. If a certificate at any stage in a chain becomes compromised, trust is broken. The certificate must be disallowed to prevent Device Provisioning Service from provisioning devices downstream in any chain that contains that certificate. To learn more about X.509 certificates and how they are used with the provisioning service, see [X.509 certificates](./concepts-x509-attestation.md#x509-certificates).
52
+
X.509 certificates are typically arranged in a certificate chain of trust. If a certificate at any stage in a chain becomes compromised, trust is broken. The certificate must be disallowed to prevent Device Provisioning Service from provisioning devices downstream in any chain that contains that certificate. To learn more about X.509 certificates and how they are used with the provisioning service, see [X.509 certificates](./concepts-x509-attestation.md#x509-certificates).
55
53
56
54
An enrollment group is an entry for devices that share a common attestation mechanism of X.509 certificates signed by the same intermediate or root CA. The enrollment group entry is configured with the X.509 certificate associated with the intermediate or root CA. The entry is also configured with any configuration values, such as twin state and IoT hub connection, that are shared by devices with that certificate in their certificate chain. To disallow the certificate, you can either disable or delete its enrollment group.
57
55
58
-
To temporarily disallow the certificate by disabling its enrollment group:
56
+
To temporarily disallow the certificate by disabling its enrollment group:
59
57
60
58
1. Sign in to the Azure portal and select **All resources** from the left menu.
61
59
2. In the list of resources, select the provisioning service that you want to disallow the signing certificate from.
@@ -65,14 +63,13 @@ To temporarily disallow the certificate by disabling its enrollment group:
65
63
66
64

67
65
68
-
69
66
To permanently disallow the certificate by deleting its enrollment group:
70
67
71
68
1. Sign in to the Azure portal and select **All resources** from the left menu.
72
69
2. In the list of resources, select the provisioning service that you want to disallow your device from.
73
70
3. In your provisioning service, select **Manage enrollments**, and then select the **Enrollment Groups** tab.
74
-
4. Select the check box next to the enrollment group for the certificate that you want to disallow.
75
-
5. Select **Delete** at the top of the window, and then select **Yes** to confirm that you want to remove the enrollment group.
71
+
4. Select the check box next to the enrollment group for the certificate that you want to disallow.
72
+
5. Select **Delete** at the top of the window, and then select **Yes** to confirm that you want to remove the enrollment group.
76
73
77
74

78
75
@@ -83,25 +80,43 @@ After you finish the procedure, you should see your entry removed from the list
83
80
84
81
## Disallow specific devices in an enrollment group
85
82
86
-
Devices that implement the X.509 attestation mechanism use the device's certificate chain and private key to authenticate. When a device connects and authenticates with Device Provisioning Service, the service first looks for an individual enrollment that matches the device's credentials. The service then searches enrollment groups to determine whether the device can be provisioned. If the service finds a disabled individual enrollment for the device, it prevents the device from connecting. The service prevents the connection even if an enabled enrollment group for an intermediate or root CA in the device's certificate chain exists.
83
+
Devices that implement the X.509 attestation mechanism use the device's certificate chain and private key to authenticate. When a device connects and authenticates with Device Provisioning Service, the service first looks for an individual enrollment with a registration ID that matches the common name (CN) of the device (end-entity) certificate. The service then searches enrollment groups to determine whether the device can be provisioned. If the service finds a disabled individual enrollment for the device, it prevents the device from connecting. The service prevents the connection even if an enabled enrollment group for an intermediate or root CA in the device's certificate chain exists.
87
84
88
85
To disallow an individual device in an enrollment group, follow these steps:
89
86
90
87
1. Sign in to the Azure portal and select **All resources** from the left menu.
91
88
2. From the list of resources, select the provisioning service that contains the enrollment group for the device that you want to disallow.
92
89
3. In your provisioning service, select **Manage enrollments**, and then select the **Individual Enrollments** tab.
93
-
4. Select the **Add individual enrollment** button at the top.
94
-
5. On the **Add Enrollment** page, select **X.509** as the attestation **Mechanism** for the device.
90
+
4. Select the **Add individual enrollment** button at the top.
91
+
5. Follow the appropriate step depending on whether you have the device (end-entity) certificate.
92
+
93
+
- If you have the device certificate, on the **Add Enrollment** page select:
94
+
95
+
**Mechanism**: X.509
96
+
97
+
**Primary .pem or .cer file**: Upload the device certificate. For the certificate, use the signed end-entity certificate installed on the device. The device uses the signed end-entity certificate for authentication.
98
+
99
+
**IoT Hub Device ID**: Leave this blank. For devices provisioned through X.509 enrollment groups, the device ID is set by the device certificate CN and is the same as the registration ID.
100
+
101
+
:::image type="content" source="./media/how-to-revoke-device-access-portal/add-enrollment-x509.png" alt-text="Screenshot of properties for the disallowed device in an X.509 enrollment entry.":::
102
+
103
+
- If you don't have the device certificate, on the **Add Enrollment** page select:
104
+
105
+
**Mechanism**: Symmetric Key
106
+
107
+
**Auto-generate keys**: Make sure this is selected. The keys don't matter for this scenario.
108
+
109
+
**Registration ID**: If the device has already been provisioned, use its IoT Hub device ID. You can find this in the registration records of the enrollment group, or in the IoT hub that the device was provisioned to. If the device has not yet been provisioned, enter the device certificate CN. (In this latter case, you don't need the device certificate, but you will need to know the CN.)
95
110
96
-
Upload the device certificate, and enter the device ID of the device to be disallowed. For the certificate, use the signed end-entity certificate installed on the device. The device uses the signed end-entity certificate for authentication.
111
+
**IoT Hub Device ID**: Leave this blank. For devices provisioned through X.509 enrollment groups, the device ID is set by the device certificate CN and is the same as the registration ID.
97
112
98
-

113
+
:::image type="content" source="./media/how-to-revoke-device-access-portal/add-enrollment-symmetric-key.png" alt-text="Screenshot of properties for the disallowed device in a symmetric key enrollment entry.":::
99
114
100
-
6. Scroll to the bottom of the **Add Enrollment** page and select **Disable** on the **Enable entry** switch, and then select **Save**.
115
+
6. Scroll to the bottom of the **Add Enrollment** page and select **Disable** on the **Enable entry** switch, and then select **Save**.
101
116
102
-
[](./media/how-to-revoke-device-access-portal/disable-individual-enrollment-in-enrollment-group.png#lightbox)
117
+
:::image type="content" source="./media/how-to-revoke-device-access-portal/select-disable-on-indivdual-entry.png" alt-text="Screenshot of disabled individual enrollment entry to disable device from group enrollment in the portal.":::
103
118
104
-
When you successfully create your enrollment, you should see your disabled device enrollment listed on the **Individual Enrollments** tab.
119
+
When you successfully create your enrollment, you should see your disabled device enrollment listed on the **Individual Enrollments** tab.
0 commit comments