
Historically, web security was designed for the human user. We built complex ecosystems of login, password, MFA, cookies and transport layers like TLS to validate who is on the other side of the screen. However, modern systems operate under a different dynamic. Today, most relevant traffic is generated by Non-Human Identities (NHI): microservices, automation jobs, CI/CD pipelines and, increasingly, AI agents that consume APIs and make decisions autonomously.
In this scenario, the practice of using static API keys as machine identity has become a latent vulnerability. While they work for prototypes, keys do not scale securely; they are shared secrets that do not prove possession, do not carry context and are notoriously difficult to rotate without operational impact.
The modern approach requires that workload identity be treated as a first-class citizen in a Zero Trust architecture. For this, the combination of TLS 1.3 performance (see site speed) and strong authentication using mTLS (Mutual TLS) sets the new gold standard for security.
The Problem: The Fragility of Static Secrets
API keys are popular for their simplicity: just a string in the request header. However, that ease hides dangerous structural limitations.
An API key only responds if “someone knows this secret,” but it does not prove “who the caller is.” Technically, the key is “what you know,” while mTLS focuses on “who you are” through cryptographic proof of possession.
Technical Analogy: Think of an API key like a shared Wi‑Fi password: whoever has the password gets in. mTLS is like a non-transferable biometric badge tied to a specific device and authenticated by the server.
Additionally, static secrets leak frequently in logs, traces, environment variables or via attacks such as prompt injection against AI agents. When a key becomes a “secret that lives too long,” it stops being a credential and becomes a security liability.
Aligning Concepts: NHI and Workload Identity
To protect internal (East‑West) traffic and external (North‑South) integrations, we need to consolidate three pillars:
- NHI (Non‑Human Identity): Recognize that services, bots and AI agents need identities as robust as humans’.
- Workload Identity: The ability to bind a request to a specific workload in a verifiable way and tied to context (environment, cluster or namespace).
- Zero Trust: The principle of never implicitly trusting anyone, not even inside the network perimeter. Here, mTLS acts as the mechanism that brings identity to the transport layer.
TLS 1.3: The Performance Engine that Enables mTLS
Many organizations avoided mTLS in the past due to computational cost and handshake latency. TLS 1.3 removed that barrier, making mutual authentication not only secure but extremely efficient.
1‑RTT Handshake and Latency Reduction
TLS 1.3 reduces the typical handshake to a single round‑trip (1‑RTT). In microservices and AI API architectures, where call frequency is massive, this time savings lowers p99 latency and eases CPU pressure, enabling strong authentication without penalizing user experience.
Privacy and Topology Shielding
A crucial and often underestimated benefit of TLS 1.3 is that the client certificate travels encrypted during the handshake. This prevents passive observers from performing reconnaissance on your network and mapping which services or identities are communicating.
The 0‑RTT Shortcut
The 0‑RTT resumption feature allows data to be sent immediately on resumed connections. It’s a formidable performance gain for read operations, though it must be applied cautiously with security filters for sensitive transactions to avoid replay attacks.
AI Agents: The New Client on Your Infrastructure
AI agents change the nature of traffic because they execute action chains, calling multiple APIs and tools continuously.
Practical Example: Imagine an AI agent authorized to access your customer database to generate reports. With mTLS, you ensure that only that specific worker has access. If a worker from another domain (e.g., generic analytics) is compromised, it cannot access the sensitive database because it does not possess the digital certificate required for that specific route.
Implementation at the Edge: Why the Edge?
Managing mTLS individually across hundreds of microservices creates inconsistency and configuration drift. The Edge is the ideal control point for three reasons:
- Cryptographic Offload: By terminating mTLS at the Edge, you remove the asymmetric processing burden from your origin, standardizing versions and ciphers in one place.
- Logs and Traceability: Each request can be tied to a certificate fingerprint or serial, enabling precise forensic audits.
- Programmable Policies: Using Edge Functions, you can combine identity and business logic. For example, you can validate an AI agent’s certificate and simultaneously apply a token quota or cost limits before the request ever touches your server.
Automation and Migration Checklist
For machine identities, speed is essential. Management must be automated via Infrastructure as Code (IaC), using tools like the Azion Terraform Provider to programmatically provision certificates and policies.
Zero Trust Action Plan:
- Standardize on TLS 1.3: Remove legacy protocols and harden your cipher suites.
- Map your NHIs: Identify all agents and services that consume your APIs.
- Permissive Mode: Start by validating certificates without blocking traffic to collect telemetry and identify potential failures.
- Enforcement: Require mTLS on sensitive routes and expand to all critical traffic.
- Observability: Ensure your logs record the cryptographic identity tied to each workload.
Conclusion
API keys were a convenient solution for a simpler internet. For a world of AI agents and autonomous microservices, they represent an unnecessary risk. The combination of TLS 1.3 and mTLS provides the foundation for robust machine identity: lower latency, more privacy and absolute control. By moving enforcement to the Edge, you achieve security without compromising overall performance.
Next Step: Evaluate your most critical endpoints and start migrating to mTLS today. Discover Azion Certificate Manager to automate your Zero Trust journey.