Introduction
SecureW2 TPM-based key attestation can be integrated with the certificate enrollment workflow to ensure that private keys are securely generated, stored, and validated within trusted hardware.
When an IoT device submits a Certificate Signing Request (CSR), the server cannot determine whether the private key is hardware-protected or software-generated. A TPM attestation validation server ensures that (1) the key is hardware-bound and non-exportable, and (2) the TPM is genuine and vendor-trusted. This guarantees that the issued certificate is cryptographically bound to a specific physical device and cannot be used without its TPM.
The following guide provides step-by-step instructions on setting up TPM Key Attestation for certificate enrollment.
Prerequisites
The following are the prerequisites for setting up TPM key attestation with Linux:
- Access to JoinNow Management Portal with Ultimate or Absolute subscription for GBB or Enterprise Enrollment and Attestation (EEA) subscription for Legacy.
- TPM 2.0 is available and enabled on the Linux machine.
Configuring JoinNow
The following are the high-level steps to be configured in JoinNow:
Creating an Intermediate CA
As a best practice, SecureW2 recommends having a new intermediate CA for TPM-based attestation.
To create a new intermediate CA:
- Log in to the JoinNow Management Portal.
- Navigate to Dynamic PKI > Certificate Authorities.
- Click Add Certificate Authority.
- In the Basic section, select the Device and User Authentication option from the Generate CA For drop-down list to authenticate devices and users.
- From the Type drop-down list, select Intermediate CA.
- From the Certificate Authority drop-down list, select the default Root CA for your organization.
- In the Common Name field, enter a common name for the CA certificate.
- From the Key Size drop-down list, select 2048 for the CA certificate key pair.
- From the Signature Algorithm drop-down list, select the signature algorithm for the certificate signing request. The option available is SHA-256.
- In the Validity Period (in years) field, enter the validity period of the CA certificate.
- Click Save. The new intermediate CA is generated.
Configure Key Attestation Platform
This section describes the steps to configure a key attestation platform for TPM.
- Navigate to Integration Hub > Key Attestation Platforms.
- Click Add.
Figure: Key Attestation Platform Page - In the Name field, enter a name for the key attestation platform.
- In the Display Description field, enter a suitable description for the key attestation platform.
- From the Type drop-down list, select TPM.
- From the Manufacturer drop-down list, select the trusted vendor that manufactured the TPM chip. SecureW2 currently supports AMD and Infineon.
NOTE: Select Other in the Manufacturer field and manually enter a manufacturer that is not listed.
Figure: Adding a TPM key attestation Platform - Click Save. The Token Details pop-up appears. Copy the API secret and Enrollment URI values into a text editor, as they are required for TPM enrollment.
Configuring Custom TPM Manufacturer
If the TPM chip’s manufacturer is not listed in the Manufacturer drop-down, Admin can select Other to manually enter the manufacturer, add the Manufacturer Root CA, and specify the whitelisted domains for the AIA URL.
This section describes the steps to configure a custom manufacturer for TPM.
- Navigate to Integration Hub > Key Attestation Platforms.
- Click Add.
- In the Name field, enter a name for the key attestation platform.
- In the Display Description field, enter a suitable description for the key attestation platform.
- From the Type drop-down list, select TPM.
- From the Manufacturer drop-down list, select Other.
- In the Manufacturer Name field, enter the manufacturer’s name.
Figure: Adding a TPM key attestation provider for a custom manufacturer
- Click Save. The Token Details pop-up appears. Copy the API secret and Enrollment URI values into a text editor, as they are required for TPM enrollment.
Figure: Token details dialog box
- Click the Configuration tab.
- In the Manufacturer Root CA field, click Choose file to locate and upload the root certificate.
- In the Whitelisted Domains field, enter the whitelisted domain and click Upload.
- Click Update.
Configuring Policy Management
The following policies must be created in JoinNow for TPM-based certificate enrollment.
Creating a Policy Workflow
- Go to Policy Management > Policy Workflows.
- Click Add Policy Engine Workflows.
- In the Basic section, in the Name field, enter a name for the policy.
- In the Description field, enter a description for the policy.
- Click Save. The page refreshes and automatically selects the Conditions tab.
- In the Conditions section, click the Core Provider drop-down and select the Device Management Platform auto-created with the same name as the Key attestation platform.
- Click Update.
Creating a Device Role Policy
Device Role Policy helps in mapping the attestation provider in JoinNow for device attestation.
- From the JoinNow Management Portal, go to Policy Management > Device Roles.
- Click Add Device Role Policy.
- In the Basic tab, enter a name in the Name field.
- For Display Description, enter a description.
- Click Save. The page refreshes, and the Conditions tab opens.
- Click on the Conditions tab.
- From the Identity drop-down, select the Key Attestation Provider created in the 2.1 Configure Key Attestation Platform section.
- Click Update.
Creating an Enrollment
- From the JoinNow Management Portal, go to Policy Management > Enrollment.
- Click Add Enrollment Policy.
- In the Basic tab, for Name, enter a name.
- For Description, enter a description.
- Click Save. The page refreshes and displays the Conditions and Settings tab.
- In the Conditions section, for Role, select the user role policy you created in the Creating a Policy Workflow section.
- For Device Role, select the device role created in the Creating a Device Role Policy section.
- Click on the Settings tab.
- From the Use Certificate Authority drop-down, select the Certificate Authority created for TPM.
- From the Use Certificate Template drop-down list, choose the DEFAULT CREATE CERTIFICATE TEMPLATE 1.
- Click Update.
Importing TPM IoT Agent from JoinNow
To download the TPM agent required for a Linux machine:
- Navigate to Downloads > Enrollment Gateway.
- Click the Download button adjacent to the TPM Agent.
Configuring Linux
The following steps configure a Linux machine for TPM-based certificate enrollment.
- Install TPM 2.0 tools using the following command – sudo apt install tpm2-tools.
- To verify the TPM Manufacturer, use the “tpm2_getcap properties-fixed” command.
Example output:
- TPM_IFX → Infineon
- TPM_AMD → AMD
- Import and extract the ZIP file downloaded from the JoinNow Management Portal in 2.3.4 Importing TPM IoT Agent from JoinNow. The following files will be extracted:
- Sp
- verify-tpm.sh
- Create a folder using the “mkdir tpm-enroll” command.
- Move the files to the created folder using “mv sp verify-tpm.sh tpm-enroll/”
- Enter the folder using “cd tpm-enroll”
- Run the following enrollment command:
./sp enroll \
--url "Enrollment URI" \
--identity "user@example.com" \
--psk "API Secret" \
--output-dir .
NOTE: Use the Enrollment URL and API Secret created earlier in 2.2 Configure Key Attestation Platform.
Sample Command:
./sp enroll \
--url "https://api.securew2.com/urltokenid/xxx/enroll/xxx" \
--identity "testamd@securew2.com" \
--psk "your_api_secret" \
--output-dir .
Enhanced Events
Admins can check the enrollment success message on the Enhanced Events page under Data and Monitoring:















