Skip to content

How to to provision an IoT Edge 1.2 via DPS, using identity certs issued by a CA via EST and keys stored in an HSM (TPM/PKCS11)

Notifications You must be signed in to change notification settings

arlotito/iot-edge-1.2-tpm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This guide explains how to provision an IoT Edge 1.2 via DPS, using an Identity Certificate dynamically issued by a CA via EST, with all the keys securely stored in an HSM implemented with a TPM and PKCS11.

All the required components (including a simulated TPM if needed) are installed running few scripts included in this repo.

Disclaimer

Samples in this repo are for demonstration purposes only! This is not a guidance or best practices on IoT Edge security.

Get started

Install git if you haven't it:

sudo apt-get install git -y

Grab the scripts from this repo:

cd ~
git clone https://github.com/arlotito/iot-edge-1.2-tpm.git
cd iot-edge-1.2-tpm/scripts
chmod +x *.sh

Once you have the scripts:

  1. install using either a one-click or step-by-step approach:
  2. troubleshoot if needed
  3. experiment

I deployed/performed all the steps, now what?

If everything went fine, you should now have an IoT Edge provisioned via DPS, using an Identity Certificate dynamically issued by a CA via EST, with private keys securely stored in the TPM/PKCS11.

If you want, you can now inspect the content of the PKCS11 store and see the private keys generated by IoT Edge:

export TPM2_PKCS11_STORE='/opt/tpm2-pkcs11'
export PKCS11_LIB_PATH='/usr/local/lib/libtpm2_pkcs11.so'
sudo pkcs11-tool --module "$PKCS11_LIB_PATH" -IOT

NOTE: the 'pkcs11-tool' is installed by script 3-install-pkcs11-tool.sh

...and make sure you have 'device-id' and 'aziot-edged-ca': picture 1

If you don't see any key or just the 'device-id', try with:

sudo iotedge system reprovision

Look at this for additional troubleshooting.

Tested configurations

This guide has been tested on:

References

About

How to to provision an IoT Edge 1.2 via DPS, using identity certs issued by a CA via EST and keys stored in an HSM (TPM/PKCS11)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages