Skip to main content

Using SSL Certificates as Transport Credentials

Whenever possible, Transports are advised to implement their Authentication through the use of SSL certificates and a certificate authority by using Mutual Authentication, to ensure identities of the endpoint and the client are well-known to each other - this is especially the case with Data Orchestrator's MQTT Protocol on top of VerneMQ Transport.

In this case, Transport Credentials are a SSL Certificate, and Pairing will interact with a Certificate Authority. The certificate rotates depending on the emission policy of the CA and can be renewed and invalidated countless times over the device lifecycle. The Certificate is a transient, asymmetric, device-specific, non-critical Transport Credential which can be in turn used to authenticate against the chosen Transport.

In this case, Transports should have no knowledge nor access to secrets or Authorization details: they rather have to comply with the configured CA and the certificate parsing, as the Certificate contains all needed information for Authorization as well.

Mutual SSL Authentication Flow​

Pairing SSL flow

Side note: the Transport usually bears the public certificate of the CA, and actually interacts with the CA itself only if it exposes an OCSP endpoint and the Transport is capable of understanding it. In case the CA exposes a CRL, the Transport just makes sure to update its CRL from the CA every once in a while. In both cases, Transport's only interaction with the CA is the configuration of its SSL endpoint.

Certificate Authority​

Pairing is designed to interact with an abstract certificate authority, given this authority is capable of:

  • Emitting SSL Certificates with a custom CN (this is important in the Transport authentication flow)
  • Revoking emitted certificates and exposing CRL/OCSP revocation information

and is accessible from a 3rd party (e.g. from a REST API). By default, Data Orchestrator supports Cloudflare's CFSSL, and also provides a minimal installation in its default deploy scripts. For bigger installations, especially in terms of number of connected devices, it is strongly advised to use a dedicated CFSSL installation. Also, Data Orchestrator Enterprise provides a number of additional features including support for other external CAs.

Certificate flow​

During the Pairing flow, the device must generate autonomously a Certificate Signing Request (CSR) which will be in turn relayed by Pairing to the configured Certificate Authority. Pairing will also provide the Certificate Authority with a custom CN, which maps to <realm>/<device id>.

The CA must ensure the signed certificate carries this information, as it will be used by the Transport to authenticate the caller inside Data Orchestrator. Pairing, in fact, will also perform sanity checks over the signed certificate and reject it in case the CA fails to comply.