mTLS is mutual TLS authentication. Traditional TLS only authenticates the server to the client, but not the client to the server. mTLS provides mutual authentication by validating the identities of both peers to each other via their TLS certs before sending data over a secure channel.
mTLS authentication in the Aranya syncer allows users to leverage their existing PKI infrastructure to authenticate nodes to each other before syncing.
Aranya’s sync traffic is currently secured via s2n_quic PSKs. We previously developed our own fork of s2n_quic to add support for PSKs to the library. While PSKs are the ideal solution for securing QUIC communications for our zero-trust application, there are a few realities that make it impractical:
main branch of s2n_quic is not going to happen any time soon.Because of this, we plan to migrate the authentication/encryption of the Aranya syncer transport from QUIC PSKs to QUIC mTLS certs.
Abbreviations in this document:
Note: QUIC requires TLS 1.3 so that is an implied requirement. It’s worth mentioning here since it is relevant to the security properties of our mTLS implementation.
Future enhancements:
Example usage:
# Create a root CA
aranya-certgen ca --cert ca.pem --key ca.key --ca-name "My Company CA" --validity-days 10
# Create a signed certificate
aranya-certgen signed \
--ca-cert ca.pem --ca-key ca.key \
--cert server.pem --key server.key \
--cn server \
--dns example.com --dns www.example.com \
--ip 192.168.1.10
--validity-days 10
Future enhancements:
mTLS root and device certs are generated externally via a user’s existing PKI infrastructure. Device certs are signed by one of the root certs or an intermediate CA cert using the PKI infrastructure.
We recommend using P-256 ECDSA certs generated from a secret key of at least 256 bits (NIST SP 800-52 Rev. 2).
An example of how to generate/sign certs with the openssl cli tool will be provided for users that do not have an existing PKI infrastructure. Certs should not be checked into the aranya repo and should always be generated/signed for each deployment.
Paths to the root certs and device cert will be provided in the daemon config. The root cert directory is assumed to be flat: we do not support any recursion or symlinks. Certs will be loaded into the QUIC syncer module when the daemon loads.
daemon_config.toml:
[sync.quic]
...
root_certs=<root certs directory>
device_cert=<device cert directory>
...
The Aranya daemon will refuse to start if the following conditions are not met:
root1.pem).cert.pem) and the corresponding secret key (e.g. cert.key).Verification of the cert chain is not performed by the daemon when starting up and loading certs into the QUIC library. For simplicity, we will rely on the QUIC library to detect invalid certs at runtime when performing the TLS handshake for QUIC connections.
Please ensure that your PKI infrastructure has done the following before loading certs into the daemon’s QUIC syncer:
All QUIC syncer PSK and IKM related Aranya APIs and configs for the QUIC syncer will be replaced with the new daemon cert configuration defined in this document. This will cause breaking changes to the Aranya API.
Existing Aranya deployments using PSKs will not be compatible with newer Aranya software which has migrated to mTLS certs. We recommend upgrading all Aranya software in a deployment to a version that supports mTLS certs at the same time.
Existing Aranya deployments using different PSKs for each team will no longer be able to manage different certs for each team. Reusing certs across teams is acceptable since it only leaks team metadata such as devices, roles, permissions, etc. Aranya’s RBAC scheme must grant permissions to a device/role before it is allowed to perform any operations on the graph. If using different mTLS certs for each team is important, we recommend isolating each team into its own Aranya deployment with different certs rather than managing multiple teams in the same deployment. In the future, we intend to allow different certs to be used for each team in a single deployment.