X.509 client certificates - AWS IoT Core

X.509 client certificates

X.509 certificates provide AWS IoT with the ability to authenticate client and device connections. Client certificates must be registered with AWS IoT before a client can communicate with AWS IoT. A client certificate can be registered in multiple AWS accounts in the same AWS Region to facilitate moving devices between your AWS accounts in the same region. See Using X.509 client certificates in multiple AWS accounts with multi-account registration for more information.

We recommend that each device or client be given a unique certificate to enable fine-grained client management actions, including certificate revocation. Devices and clients must also support rotation and replacement of certificates to help ensure smooth operation as certificates expire.

For information about using X.509 certificates to support more than a few devices, see Device provisioning to review the different certificate management and provisioning options that AWS IoT supports.

AWS IoT supports these types of X.509 client certificates:
  • X.509 certificates generated by AWS IoT

  • X.509 certificates signed by a CA registered with AWS IoT.

  • X.509 certificates signed by a CA that is not registered with AWS IoT.

This section describes how to manage X.509 certificates in AWS IoT. You can use the AWS IoT console or AWS CLI to perform these certificate operations:

For more information about the AWS CLI commands that perform these operations, see AWS IoT CLI Reference.

Using X.509 client certificates

X.509 certificates authenticate client and device connections to AWS IoT. X.509 certificates provide several benefits over other identification and authentication mechanisms. X.509 certificates enable asymmetric keys to be used with devices. For example, you could burn private keys into secure storage on a device so that sensitive cryptographic material never leaves the device. X.509 certificates provide stronger client authentication over other schemes, such as user name and password or bearer tokens, because the private key never leaves the device.

AWS IoT authenticates client certificates using the TLS protocol's client authentication mode. TLS support is available in many programming languages and operating systems and is commonly used for encrypting data. In TLS client authentication, AWS IoT requests an X.509 client certificate and validates the certificate's status and AWS account against a registry of certificates. It then challenges the client for proof of ownership of the private key that corresponds to the public key contained in the certificate. AWS IoT requires clients to send the Server Name Indication (SNI) extension to the Transport Layer Security (TLS) protocol. For more information on configuring the SNI extension, see Transport security in AWS IoT Core.

To facilitate a secure and consistent client connection to AWS IoT core, a X.509 client certificate must possess the following:

You can create client certificates that use the Amazon Root CA and you can use your own client certificates signed by another certificate authority (CA). For more information about using the AWS IoT console to create certificates that use the Amazon Root CA, see Create AWS IoT client certificates. For more information about using your own X.509 certificates, see Create your own client certificates.

The date and time when certificates signed by a CA certificate expire are set when the certificate is created. X.509 certificates generated by AWS IoT expire at midnight UTC on December 31, 2049 (2049-12-31T23:59:59Z).

AWS IoT Device Defender can perform audits on your AWS account and devices supporting common IoT security best practices. This includes managing the expiration dates of X.509 certificates signed by your CA or the Amazon Root CA. For more information on managing a certificate's expiration date, see Device certificate expiring and CA certificate expiring.

On the official AWS IoT blog, a deeper dive into the management of device certificate rotation and security best practices is explored in How to manage IoT device certificate rotation using AWS IoT.

Using X.509 client certificates in multiple AWS accounts with multi-account registration

Multi-account registration makes it possible to move devices between your AWS accounts in the same Region or in different Regions. You can register, test, and configure a device in a pre-production account, and then register and use the same device and device certificate in a production account. You can also register the client certificate on the device or the device certificates without a CA that is registered with AWS IoT. For more information, see Register a client certificate signed by an unregistered CA (CLI).

Note

Certificates used for multi-account registration are supported on the iot:Data-ATS, iot:Data (legacy), iot:Jobs, and iot:CredentialProvider endpoint types. For more information about AWS IoT device endpoints, see AWS IoT device data and service endpoints.

Devices that use multi-account registration must send the Server Name Indication (SNI) extension to the Transport Layer Security (TLS) protocol and provide the complete endpoint address in the host_name field, when they connect to AWS IoT. AWS IoT uses the endpoint address in host_name to route the connection to the correct AWS IoT account. Existing devices that don't send a valid endpoint address in host_name will continue to work, but they will not be able to use the features that require this information. For more information about the SNI extension and to learn how to identify the endpoint address for the host_name field, see Transport security in AWS IoT Core.

To use multi-account registration
  1. You can register the device certificates with a CA. You can register the signing CA in multiple accounts in SNI_ONLY mode and use that CA to register the same client certificate to multiple accounts. For more information, see Register a CA certificate in SNI_ONLY mode (CLI) - Recommended.

  2. You can register the device certificates without a CA. See Register a client certificate signed by an unregistered CA (CLI). Registering a CA is optional. You're not required to register the CA that signed the device certificates with AWS IoT.

Certificate signing algorithms supported by AWS IoT

AWS IoT supports the following certificate-signing algorithms:

  • SHA256WITHRSA

  • SHA384WITHRSA

  • SHA512WITHRSA

  • SHA256WITHRSAANDMGF1 (RSASSA-PSS)

  • SHA384WITHRSAANDMGF1 (RSASSA-PSS)

  • SHA512WITHRSAANDMGF1 (RSASSA-PSS)

  • DSA_WITH_SHA256

  • ECDSA-WITH-SHA256

  • ECDSA-WITH-SHA384

  • ECDSA-WITH-SHA512

For more information about certificate authentication and security, see Device certificate key quality.

Note

The certificate signing request (CSR) must include a public key. The key can be either an RSA key with a length of at least 2,048 bits or an ECC key from NIST P-256, NIST P-384, or NIST P-521 curves. For more information, see CreateCertificateFromCsr in the AWS IoT API Reference Guide.