Skip to content

Commit 13090b7

Browse files
authored
Merge pull request #300934 from PatAltimore/patricka-freshness2
Freshness review
2 parents cafb35f + 8578cf9 commit 13090b7

File tree

2 files changed

+38
-43
lines changed

2 files changed

+38
-43
lines changed

articles/iot-edge/how-to-access-dtpm.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: dTPM access for Azure IoT Edge for Linux on Windows
33
description: Learn about how to configure access the dTPM on your Azure IoT Edge for Linux on Windows virtual machine.
44
author: PatAltimore
55
ms.author: patricka
6-
ms.date: 05/29/2024
6+
ms.date: 06/05/2025
77
ms.topic: concept-article
88
ms.service: azure-iot-edge
99
ms.custom: linux-related-content
@@ -14,74 +14,74 @@ services: iot-edge
1414

1515
[!INCLUDE [iot-edge-version-all-supported](includes/iot-edge-version-all-supported.md)]
1616

17-
A Trusted platform module (TPM) chip is a secure crypto-processor that is designed to carry out cryptographic operations. This technology is designed to provide hardware-based, security-related functions. The Azure IoT Edge for Linux on Windows (EFLOW) virtual machine doesn't have a virtual TPMs attached to the VM. However, the user can enable or disable the TPM passthrough feature, that allows the EFLOW virtual machine to use the Windows host OS TPM. The TPM passthrough feature enables two main scenarios:
17+
A trusted platform module (TPM) chip is a secure crypto-processor that carries out cryptographic operations. This technology provides hardware-based security functions. The Azure IoT Edge for Linux on Windows (EFLOW) virtual machine doesn't have a virtual TPM attached. However, you can enable or disable the TPM passthrough feature, which lets the EFLOW virtual machine use the Windows host OS TPM. The TPM passthrough feature lets you:
1818

19-
- Use TPM technology for IoT Edge device provisioning using Device Provisioning Service (DPS)
20-
- Read-only access to cryptographic keys stored inside the TPM.
19+
- Use TPM technology for IoT Edge device provisioning with Device Provisioning Service (DPS)
20+
- Get read-only access to cryptographic keys stored in the TPM
2121

22-
This article describes how to develop a sample code in C# to read cryptographic keys stored inside the device TPM.
22+
This article shows you how to write sample C# code to read cryptographic keys stored in the device TPM.
2323

2424
> [!IMPORTANT]
25-
> The access to the TPM keys is limited to read-only. If you want to write keys to the TPM, you need to do it from the Windows host OS.
25+
> Access to TPM keys is limited to read-only. To write keys to the TPM, do it from the Windows host OS.
2626
2727
## Prerequisites
2828

29-
- A Windows host OS with a TPM or vTPM (if using Windows host OS virtual machine).
30-
- EFLOW virtual machine with TPM passthrough enabled. Using an elevated PowerShell session, use `Set-EflowVmFeature -feature "DpsTpm" -enable` to enable TPM passthrough. For more information, see [Set-EflowVmFeature to enable TPM passthrough](./reference-iot-edge-for-linux-on-windows-functions.md#set-eflowvmfeature).
31-
- Ensure that the NV index (default index=3001) is initialized with 8 bytes of data. The default AuthValue used by the sample is {1,2,3,4,5,6,7,8} which corresponds to the NV (Windows) Sample in the TSS.MSR libraries when writing to the TPM. All index initialization must take place on the Windows Host before reading from the EFLOW VM. For more information about TPM samples, see [TSS.MSR](https://github.com/microsoft/TSS.MSR).
29+
- A Windows host OS with a TPM or vTPM (if you use a Windows host OS virtual machine).
30+
- An EFLOW virtual machine with TPM passthrough enabled. In an elevated PowerShell session, run `Set-EflowVmFeature -feature "DpsTpm" -enable` to enable TPM passthrough. For more information, see [Set-EflowVmFeature to enable TPM passthrough](./reference-iot-edge-for-linux-on-windows-functions.md#set-eflowvmfeature).
31+
- Make sure the NV index (default index=3001) is initialized with 8 bytes of data. The default AuthValue used by the sample is {1,2,3,4,5,6,7,8}, which matches the NV (Windows) sample in the TSS.MSR libraries when writing to the TPM. Initialize all indexes on the Windows host before reading from the EFLOW VM. For more information about TPM samples, see [TSS.MSR](https://github.com/microsoft/TSS.MSR).
3232

3333
> [!WARNING]
34-
> Enabling TPM passthrough to the virtual machine may increase security risks.
34+
> Enabling TPM passthrough to the virtual machine can increase security risks.
3535
3636
## Create the dTPM executable
3737

38-
The following steps show you how to create a sample executable to access a TPM index from the EFLOW VM. For more information about EFLOW TPM passthrough, see [Azure IoT Edge for Linux on Windows Security](./iot-edge-for-linux-on-windows-security.md).
38+
Follow these steps to create a sample executable to access a TPM index from the EFLOW VM. For more information about EFLOW TPM passthrough, see [Azure IoT Edge for Linux on Windows Security](./iot-edge-for-linux-on-windows-security.md).
3939

4040
1. Open Visual Studio 2019 or 2022.
4141

4242
1. Select **Create a new project**.
4343

44-
1. Choose **Console App** in the list of templates then select **Next**.
44+
1. Choose **Console App** in the list of templates, and then select **Next**.
4545

4646
![Visual Studio create new solution](./media/how-to-access-dtpm/vs-new-solution.png)
4747

48-
1. Fill in the **Project Name**, **Location** and **Solution Name** fields then select **Next**.
48+
1. Fill in the **Project Name**, **Location**, and **Solution Name** fields, and then select **Next**.
4949

50-
1. Choose a target framework. The latest .NET 6.0 LTS version is preferred. After choosing a target framework, select **Create**. Visual Studio creates a new console app solution.
50+
1. Choose a target framework. The latest .NET 6.0 LTS version is preferred. After you choose a target framework, select **Create**. Visual Studio creates a new console app solution.
5151

5252
1. In **Solution Explorer**, right-click the project name and select **Manage NuGet Packages**.
5353

54-
1. Select **Browse** and then search for `Microsoft.TSS`. For more information about this package, see [Microsoft.TSS](https://www.nuget.org/packages/Microsoft.TSS).
54+
1. Select **Browse**, and then search for `Microsoft.TSS`. For more information about this package, see [Microsoft.TSS](https://www.nuget.org/packages/Microsoft.TSS).
5555

56-
1. Choose the **Microsoft.TSS** package from the list then select **Install**.
56+
1. Choose the **Microsoft.TSS** package from the list, and then select **Install**.
5757

58-
:::image type="content" source="./media/how-to-access-dtpm/vs-nuget-microsoft-tss.png" alt-text="Screenshot that shows Visual Studio add NuGet packages .":::
58+
:::image type="content" source="./media/how-to-access-dtpm/vs-nuget-microsoft-tss.png" alt-text="Screenshot of Visual Studio showing how to add NuGet packages.":::
5959

60-
1. Edit the *Program.cs* file and replace the contents with the [EFLOW TPM sample code - Program.cs](https://raw.githubusercontent.com/Azure/iotedge-eflow/main/samples/tpm-read-nv/Program.cs).
60+
1. Edit the *Program.cs* file, and replace the contents with the [EFLOW TPM sample code - Program.cs](https://raw.githubusercontent.com/Azure/iotedge-eflow/main/samples/tpm-read-nv/Program.cs).
6161

62-
1. Select **Build** > **Build solution** to build the project. Verify the build is successful.
62+
1. Select **Build** > **Build solution** to build the project. Verify that the build is successful.
6363

64-
1. In **Solution Explorer**, right-click the project then select **Publish**.
64+
1. In **Solution Explorer**, right-click the project, and then select **Publish**.
6565

66-
1. In the **Publish** wizard, choose **Folder** > **Folder**. Select **Browse** and choose an output location for the executable file to be generated. Select **Finish**. After the publish profile is created, select **Close**.
66+
1. In the **Publish** wizard, choose **Folder** > **Folder**. Select **Browse**, and choose an output location for the executable file to be generated. Select **Finish**. After the publish profile is created, select **Close**.
6767

6868
1. On the **Publish** tab, select **Show all settings** link. Change the following configurations then select **Save**.
6969
- Target Runtime: **linux-x64**.
7070
- Deployment mode: **Self-contained**.
7171

72-
:::image type="content" source="./media/how-to-access-dtpm/sample-publish-options.png" alt-text="Screenshot that shows publish options .":::
72+
:::image type="content" source="./media/how-to-access-dtpm/sample-publish-options.png" alt-text="Screenshot of publish options.":::
7373

74-
1. Select **Publish** then wait for the executable to be created.
74+
1. Select **Publish**, and then wait for the executable to be created.
7575

76-
If publish succeeds, you should see the new files created in your output folder.
76+
If publishing succeeds, you see the new files in your output folder.
7777

7878
## Copy and run the executable
7979
Once the executable file and dependency files are created, you need to copy the folder to the EFLOW virtual machine. The following steps show you how to copy all the necessary files and how to run the executable inside the EFLOW virtual machine.
8080

8181
1. Start an elevated *PowerShell* session using **Run as Administrator**.
8282

8383
1. Change directory to the parent folder that contains the published files.
84-
For example, if your published files are under the folder *TPM* in the directory `C:\Users\User`. You can use the following command to change to the parent folder.
84+
For example, if your published files are under the folder *TPM* in the directory `C:\Users\User`. You can use the following command to change to the parent folder.
8585
```powershell
8686
cd "C:\Users\User"
8787
```
@@ -103,7 +103,7 @@ Once the executable file and dependency files are created, you need to copy the
103103
Connect-EflowVm
104104
```
105105
106-
1. Change directory to the folder where you copied the *tar* file and check the file is available. If you used the example above, when connected to the EFLOW VM, you'll already be at the *iotedge-user* root folder. Run the `ls` command to list the files and folders.
106+
1. Change directory to the folder where you copied the *tar* file and check that the file is available. If you used the previous example, when you connect to the EFLOW VM, you're already at the *iotedge-user* root folder. Run the `ls` command to list the files and folders.
107107
108108
1. Run the following command to extract all the content from the *tar* file.
109109
```bash
@@ -136,4 +136,4 @@ Once the executable file and dependency files are created, you need to copy the
136136
137137
## Next steps
138138
139-
* Learn [How to develop IoT Edge modules with Linux containers using IoT Edge for Linux on Windows](./tutorial-develop-for-linux-on-windows.md).
139+
Learn [how to develop IoT Edge modules with Linux containers using IoT Edge for Linux on Windows](./tutorial-develop-for-linux-on-windows.md).

articles/iot-edge/how-to-configure-module-build-options.md

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to use the module.json file to configure build and deploy
44
author: PatAltimore
55

66
ms.author: patricka
7-
ms.date: 05/31/2024
7+
ms.date: 06/05/2025
88
ms.topic: how-to
99
ms.service: azure-iot-edge
1010
services: iot-edge
@@ -14,25 +14,22 @@ services: iot-edge
1414

1515
[!INCLUDE [iot-edge-version-all-supported](includes/iot-edge-version-all-supported.md)]
1616

17-
The *module.json* file controls how modules are built and deployed. IoT Edge module Visual Studio
18-
and Visual Studio Code projects include the *module.json* file. The file contains IoT Edge module
19-
configuration details including the version and platform that is used when building an IoT Edge
20-
module.
17+
The *module.json* file controls how modules are built and deployed. IoT Edge module projects in Visual Studio and Visual Studio Code include the *module.json* file. This file has configuration details for the IoT Edge module, like the version and platform used when building the module.
2118

2219
## *module.json* settings
2320

24-
The *module.json* file includes the following settings:
21+
The *module.json* file has these settings:
2522

2623
| Setting | Description |
2724
|---|---|
28-
| image.repository | The repository of the module. |
29-
| image.tag.version | The version of the module. |
25+
| image.repository | The module repository. |
26+
| image.tag.version | The module version. |
3027
| image.tag.platforms | A list of supported platforms and their corresponding dockerfile. Each entry is a platform key and dockerfile pair `<platform key>:<dockerfile>`. |
31-
| image.buildOptions | The build arguments used when running `docker build`. |
32-
| image.contextPath | The context path used when running `docker build`. By default, it's the current folder of the *module.json* file. If your Docker build needs files not included in the current folder such as a reference to an external package or project, set the **contextPath** to the root path of all necessary files. Verify the files are copied in the dockerfile. |
33-
| language | The programming language of the module. |
28+
| image.buildOptions | Build arguments used when running `docker build`. |
29+
| image.contextPath | The context path used when running `docker build`. By default, it's the current folder of the *module.json* file. If your Docker build needs files not included in the current folder, like a reference to an external package or project, set **contextPath** to the root path of all necessary files. Verify the files are copied in the dockerfile. |
30+
| language | The module programming language. |
3431

35-
For example, the following *module.json* file is for a C# IoT Edge module:
32+
For example, this *module.json* file is for a C# IoT Edge module:
3633

3734
```json
3835
{
@@ -59,10 +56,8 @@ For example, the following *module.json* file is for a C# IoT Edge module:
5956
}
6057
```
6158

62-
Once the module is built, the final tag of the image is combined with both version and platform as
63-
`<repository>:<version>-<platform key>`. For this example, the image tag for `amd64.debug` is
64-
`localhost:5000/csharpmod:0.0.1-amd64.debug`.
59+
After you build the module, the final image tag combines the version and platform as `<repository>:<version>-<platform key>`. For this example, the image tag for `amd64.debug` is `localhost:5000/csharpmod:0.0.1-amd64.debug`.
6560

66-
## Next step
61+
## Next steps
6762

6863
[Understand the requirements and tools for developing IoT Edge modules](module-development.md)

0 commit comments

Comments
 (0)