mTLS: The Bedrock of Our Network Security

mTLS: The Bedrock of Our Network Security

In modern distributed environments, relying on simple API keys or static bearer tokens for authentication is a severe architectural vulnerability. If an API key is intercepted in transit, accidentally committed to a source control repository, or extracted from an endpoint, the attacker gains permanent, unfettered access to the infrastructure until the key is manually revoked.

StateWarden addresses this attack vector at the architectural level. Our entire distributed architecture-from the Artemis Control Plane to the Driad Data Plane and the local Agents-communicates exclusively over Mutually Authenticated Transport Layer Security (mTLS).


1. What is mTLS?

Standard TLS (what secures your connection to a website like https://bank.com) is a one-way street. The server proves its identity to your browser using a digital certificate, ensuring you aren't talking to a malicious imposter. However, the server has no mathematical proof of who you are; it relies on you typing in a password later.

Mutual TLS (mTLS) is a two-way street. Both the Server (Artemis/Driad) and the Client (the Agent) must cryptographically prove their identity to each other before a single byte of application data is exchanged.

2. Dynamic Certificate Generation

StateWarden does not use static, hardcoded certificates, nor do we require you to manually generate and distribute keys via complex Public Key Infrastructure (PKI) software. The entire process is seamlessly abstracted during the Agent Pairing phase.

The Pairing Handshake

When you execute the sw init command on a new server and provide the one-time pairing code:

  1. The Agent generates a standard private key for mTLS, alongside a Post-Quantum Kyber (ML-KEM) keypair. The Kyber private key is hardware-bound to the endpoint via PrimeKEM and never leaves the machine.
  2. The Agent generates a Certificate Signing Request (CSR) and securely transmits it, along with its Kyber public key, to the Artemis Control Plane.
  3. Artemis acts as an internal Certificate Authority (CA). It validates the pairing code, signs the CSR, and issues a unique Client Certificate.
  4. Artemis returns the signed certificate and the Agent's provisioning secrets inside a quantum-resistant "PQ-Hybrid Payload" secured by ML-KEM (Kyber) key encapsulation.
  5. The Agent opens the payload with its hardware-bound Kyber private key, installs its certificates, and permanently locks down its network communications.

3. The Security Benefits

By utilizing dynamic mTLS for all inter-node communication, StateWarden provides the following security properties:

  • Resistance to Credential Theft: An attacker who intercepts network traffic cannot establish their own session or impersonate the Agent, because completing the TLS handshake requires the Agent's local private key, which is generated on the endpoint and never transmitted.
  • Cryptographic Access Control: The Driad Storage Nodes do not use passwords. If an unauthorized client attempts to connect to a Driad node to download a backup chunk, Driad will forcefully terminate the TCP connection during the initial handshake because the client lacks an Artemis-signed certificate. The connection is dropped before the HTTP layer even loads.
  • Device Removal: If a server is stolen or compromised, an administrator deletes the device from the StateWarden Dashboard, which removes its record from the device registry. The Control Plane resolves the device identity on every request, so subsequent requests from the removed device are rejected at the application layer. Re-enrolling the machine requires a new pairing, which issues fresh credentials.

4. Total Compartmentalization

StateWarden strictly compartmentalizes trust. The Agent (which handles backups) uses dynamic, device-specific certificates. However, the StateWarden distribution and update servers (dist.statewarden.net) use entirely separate repository certificates.

This strict segregation ensures that a compromise of an endpoint Agent cannot be leveraged to pivot into the CI/CD deployment pipeline, and vice versa. Every component in the StateWarden ecosystem only possesses the exact cryptographic authority required to perform its specific duty.


StateWarden: Resilience Engineered.

Was this article helpful?