Skip to content

Commit a2f79e6

Browse files
Merge pull request #249056 from kgremban/aug22-111494-branch
Module certificate CN statement
2 parents 8537fc6 + 3d1f383 commit a2f79e6

File tree

5 files changed

+40
-0
lines changed

5 files changed

+40
-0
lines changed

articles/iot-hub/module-twins-cli.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ This article shows you how to create an Azure CLI session in which you:
3434

3535
* Make sure that port 8883 is open in your firewall. The samples in this article use MQTT protocol, which communicates over port 8883. This port can be blocked in some corporate and educational network environments. For more information and ways to work around this issue, see [Connecting to IoT Hub (MQTT)](../iot/iot-mqtt-connect-to-iot-hub.md#connecting-to-iot-hub).
3636

37+
## Module authentication
38+
39+
You can use symmetric keys or X.509 certificates to authenticate module identities. For X.509 certificate authentication, the module's certificate *must* have its common name (CN) formatted like `CN=<deviceid>/<moduleid>`. For example:
40+
41+
```bash
42+
openssl req -new -key d1m1.key.pem -out d1m1.csr -subj "/CN=device01\/module01"
43+
```
44+
3745
## Prepare the Cloud Shell
3846

3947
If you want to use the Azure Cloud Shell, you must first launch and configure it. If you use the CLI locally, skip to the [Prepare a CLI session](#prepare-a-cli-session) section.

articles/iot-hub/module-twins-dotnet.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ At the end of this article, you have two .NET console apps:
3535

3636
* An IoT hub. Create one with the [CLI](iot-hub-create-using-cli.md) or the [Azure portal](iot-hub-create-through-portal.md).
3737

38+
## Module authentication
39+
40+
You can use symmetric keys or X.509 certificates to authenticate module identities. For X.509 certificate authentication, the module's certificate *must* have its common name (CN) formatted like `CN=<deviceid>/<moduleid>`. For example:
41+
42+
```bash
43+
openssl req -new -key d1m1.key.pem -out d1m1.csr -subj "/CN=device01\/module01"
44+
```
45+
3846
## Get the IoT hub connection string
3947

4048
[!INCLUDE [iot-hub-howto-module-twin-shared-access-policy-text](../../includes/iot-hub-howto-module-twin-shared-access-policy-text.md)]

articles/iot-hub/module-twins-node.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ At the end of this article, you have two Node.js apps:
3535

3636
* Node.js version 10.0.x or later. [Prepare your development environment](https://github.com/Azure/azure-iot-sdk-node/tree/main/doc/node-devbox-setup.md) describes how to install Node.js for this article on either Windows or Linux.
3737

38+
## Module authentication
39+
40+
You can use symmetric keys or X.509 certificates to authenticate module identities. For X.509 certificate authentication, the module's certificate *must* have its common name (CN) formatted like `CN=<deviceid>/<moduleid>`. For example:
41+
42+
```bash
43+
openssl req -new -key d1m1.key.pem -out d1m1.csr -subj "/CN=device01\/module01"
44+
```
45+
3846
## Get the IoT hub connection string
3947

4048
[!INCLUDE [iot-hub-howto-module-twin-shared-access-policy-text](../../includes/iot-hub-howto-module-twin-shared-access-policy-text.md)]

articles/iot-hub/module-twins-portal-dotnet.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ In this article, you will learn how to:
3636

3737
* A registered device. Register one in the [Azure portal](iot-hub-create-through-portal.md#register-a-new-device-in-the-iot-hub).
3838

39+
## Module authentication
40+
41+
You can use symmetric keys or X.509 certificates to authenticate module identities. For X.509 certificate authentication, the module's certificate *must* have its common name (CN) formatted like `CN=<deviceid>/<moduleid>`. For example:
42+
43+
```bash
44+
openssl req -new -key d1m1.key.pem -out d1m1.csr -subj "/CN=device01\/module01"
45+
```
46+
3947
## Create a module identity in the portal
4048

4149
Within one device identity, you can create up to 20 module identities. To add an identity, follow these steps:

articles/iot-hub/module-twins-python.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ At the end of this article, you have three Python apps:
3939

4040
* [Python version 3.7 or later](https://www.python.org/downloads/) is recommended. Make sure to use the 32-bit or 64-bit installation as required by your setup. When prompted during the installation, make sure to add Python to your platform-specific environment variable.
4141

42+
## Module authentication
43+
44+
You can use symmetric keys or X.509 certificates to authenticate module identities. For X.509 certificate authentication, the module's certificate *must* have its common name (CN) formatted like `CN=<deviceid>/<moduleid>`. For example:
45+
46+
```bash
47+
openssl req -new -key d1m1.key.pem -out d1m1.csr -subj "/CN=device01\/module01"
48+
```
49+
4250
## Get the IoT hub connection string
4351

4452
In this article, you create a back-end service that adds a device in the identity registry and then adds a module to that device. This service requires the **registry write** permission (which also includes **registry read**). You also create a service that adds desired properties to the module twin for the newly created module. This service needs the **service connect** permission. Although there are default shared access policies that grant these permissions individually, in this section, you create a custom shared access policy that contains both of these permissions.

0 commit comments

Comments
 (0)