Edit

Create or edit a policy with an external root CA (preview)

This article explains how to create or edit a policy within your Azure Device Registry namespace to manage an issuing CA that is signed by an external root CA.

Use this workflow if your organization maintains a private Public Key Infrastructure (PKI) and requires all IoT devices to chain up to a common trusted root. When a device requests a certificate via Device Registry, the platform returns a full certificate chain consisting of:

  • The device certificate: Unique to the specific IoT device.

  • The Microsoft issuing CA (ICA): The CA managed by Device Registry that signs the device request.

  • The external root CA: Your organization’s trusted root, which has signed the Microsoft ICA.

Any service that trusts your corporate root CA automatically trusts the certificates issued to your IoT devices by Azure.

Tip

If you do not possess an external root CA but would like to test this flow, see the additional instructions below to get started with a self-signed root CA and private key using OpenSSL.

Important

Azure IoT Hub with Azure Device Registry integration and Microsoft-backed X.509 certificate management is in public preview and isn't recommended for production workloads. For more information, see FAQ: What is new in IoT Hub?.

In Device Registry certificate management, a credential is the namespace-level root CA resource, and a policy is the issuing CA policy that signs device certificates.

Prerequisites

Before you begin, make sure you have the required setup and permissions so you can create, activate, and edit an external CA policy without deployment delays.

Requirements for your external root CA

To use an external root CA, your root CA must meet the following requirements:

Property Requirements
Key type and cryptography The CA key type must be ECC (P-256, P-384, P-521) with OID 1.2.840.10045.2.1. Explicit EC parameters are rejected, only named curve encoding (OID) is allowed. RSA is rejected.
Signature Signature algorithm must be SHA-256 or higher with ECDSA (ecdsa-with-SHA256, SHA384, or SHA512). SHA-1 is rejected.
Path length Path length for your root CA must be set to 1.
Subject The subject on the signed certificate must match the subject from the original CSR (case-insensitive with whitespace normalization)
Extensions BasicConstraints must be present, marked critical, with CA:TRUE. KeyUsage must include DigitalSignature, KeyCertSign, and CrlSign. If the EKU extension is present, it must include ClientAuth (OID 1.3.6.1.5.5.7.3.2). If EKU is absent entirely, that's acceptable (unconstrained CA per RFC 5280). Subject Key Identifier (SKI) must be present. X.509 Version must be Version 3.
Validity period Certificate must not be expired. Certificate NotBefore must not be in the future. Must have at least 365 days of remaining validity.

Create a policy

Choose the workflow that matches how you operate your environment.

Create and activate an external CA policy

Create a policy that uses your external CA, and then activate it after you upload the signed certificate chain from your PKI.

  1. Sign in to the Azure portal.

  2. Open your Azure Device Registry namespace.

  3. In the sidebar menu, under Namespace resources, select Credential policies.

  4. Select Create Policy.

    Screenshot showing the Credential policies pane.

  5. In the Basics tab, complete the fields as follows:

    Property Value
    Name Enter a unique name for your policy. The name must be between 3 and 50 alphanumeric characters and can include hyphens ('-').
    Validity period (days) Enter the number of days the issued certificates are valid.
    Select a Root CA for certificates in this policy Select Use an external root CA.

    Screenshot showing the Create policy dialog.

  6. Select Next, then Review + create.

  7. Refresh the Policies list if needed. Select the policy and confirm the policy status is Pending Activation.

  8. Select the Pending Activation link, then select Download certificate signing request (CSR) file.

    Screenshot showing the link to download the certificate signing request.

  9. Sign the CSR by using your external CA and prepare the signed chain file. The signed certificate's subject must exactly match the subject of the original CSR.

    If you do not possess an external root CA, you can use this resource to create one, see Create a self-signed root CA and private key using OpenSSL and PowerShell.

  10. In the policy details, upload the signed certificate chain.

  11. Activate the policy.

  12. Refresh the policy details and verify the policy status is active.

Edit policy validity period

Update the validity period for an existing external CA policy when certificate lifetime requirements change.

  1. In the sidebar menu of your Device Registry namespace, under Namespace resources, select Credential policies.

  2. Select the policy that you want to edit.

  3. On the Overview page, select edit next to Validity period.

  4. Change the Validity period value.

  5. Select Save.

Synchronize the credential

Synchronize your new or updated policy.

  1. In the sidebar menu of your Device Registry namespace, under Namespace resources, select Credential policies.

  2. Select Sync all, and then Yes.

    Screenshot showing the Sync all button.