ADR-001: TLS Mutual Authentication
Decision record for TLS mutual authentication between node and central, covering bootstrap, rotation, and fallback.
Metadata
- ADR ID: ADR-001
- Title: TLS Mutual Authentication for Node-Central Communication
- Status: Proposed
- Date: 2026-03-15 (proposed)
- Owner: Security/SRE lead
- Target Decision Date: 2026-04-05
- Relates to: System-Gaps-Deferred#security-and-trust-boundaries
Problem / Context
The node and central aggregator communicate over HTTP(S) on port 8080 for API queries. The original architecture specified mutual TLS to prevent impersonation, but left open:
- Certificate management: How are certificates issued, renewed, and revoked?
- API key strategy: Do we layer API keys on top of mTLS, or is mTLS sufficient?
- Credential bootstrap: How does a new node obtain its certificate on first deployment?
- Rotation cadence: What is the certificate lifetime and rotation frequency?
- Fallback authentication: If mTLS fails during GNSS-degraded operations, how do we detect and respond?
Current State
- Endpoint specs in System-APIs-Contracts assume authenticated requests but do not mandate mTLS
- Central aggregator auth model is undefined
- API is currently unauthenticated in prototypes
Why This Matters
- Security: Prevents unauthorized nodes from connecting to the central aggregator
- Trust: Establishes mutual identity between node and server
- Auditability: Credential rotation and revocation create audit trails for compliance
Deferred Decision Options
Option A: Mutual TLS + API Keys (Defense in Depth)
Approach: Install mTLS certificates on node and central; additionally require per-request API keys.
Pros:
- Strong double-layer authentication (certificate + key)
- API keys can be easier to rotate than certificates
- Compliant with zero-trust architecture patterns
- Incident response: revoke key without reissuing certificate
Cons:
- Operational complexity: manage two credential types
- API keys typically live in config files → secret management dependency
- Higher latency (validation of both cert and key)
- Overkill for internal network (node and central on same physical system or adjacent servers)
Implementation:
- Use
certifi+requestswith client certificates on node - FastAPI middleware validates certificate + extracts key from header
- Annual certificate rotation; quarterly key rotation
Option B: Mutual TLS Only (Simpler)
Approach: Client and server both require valid TLS certificates; no additional API key layer.
Pros:
- Simpler to operate: single credential type
- Faster (no extra header parsing)
- Standard practice for service-to-service comms
- Certificate-only rotation has established tooling (let's encrypt automation, cert-manager in Kubernetes)
Cons:
- Lost key = lost access (no secondary credential to fall back to)
- If node private key is compromised, all impersonation until certificate revoked
- API key layer useful for fine-grained per-user access control (backend team prefers this)
Implementation:
- Python
sslmodule on node for client cert - FastAPI
ssl_contextfor server-side enforcement - Automated certificate renewal (systemd timer on node)