STAGE 2 Enterprise Security Posture

mTLS + X.509 Identity

Prove who is connecting,
not just where from.

IP allowlisting controls the network boundary. mTLS goes inside it — requiring every connection to present a cryptographic certificate that proves its identity before a single byte of application data is exchanged.

Builds On Stage 1 (IP)
Complexity Medium
Identity Layer Cryptographic
Next Stage SPIFFE / SPIRE
Scroll Down

The Core Principle

Both sides prove who they are.

Standard TLS proves only that the server is legitimate. Mutual TLS (mTLS) extends this — the client must also present a valid certificate. Every connection is a two-way cryptographic handshake before any application traffic flows.

Mutual

Both client and server present X.509 certificates. Neither can impersonate the other — the identity proof is symmetric.

Cryptographic

Identity is proved by possession of a private key — not a password, not an IP address. It cannot be guessed or replayed.

Layered

mTLS sits inside the IP boundary from Stage 1. Even if an attacker reaches the service, they still cannot connect without a valid cert.

Auditable

Every connection carries a verified identity in its certificate. Access logs become meaningful — who called what, not just which IP.

IP allowlisting tells you where a connection came from. mTLS tells you who sent it. These are fundamentally different questions — and both matter.

entityOS Security Framework — Stage 2

TLS vs mTLS

One-way trust vs mutual trust.

Standard HTTPS proves the server is who it claims to be. mTLS adds the same proof in the other direction — the client must also hold a certificate from a trusted Certificate Authority.

Standard TLS (HTTPS)

Server proves identity

  • Server presents its certificate to the client
  • Client verifies the server cert against a trusted CA
  • Client remains anonymous — no certificate required
  • Encrypted channel established — data is confidential
Anyone can connect — identity of the caller is unknown
Mutual TLS (mTLS)

Both sides prove identity

  • Server presents its certificate — client verifies it
  • Client presents its certificate — server verifies it
  • Connection is rejected if either cert is invalid or untrusted
  • Encrypted channel carries verified identity on both ends
Only callers with a valid certificate from your CA can connect
STEP 01

Set Up a CA

Create or use an existing Certificate Authority — your internal PKI. This can be AWS Private CA, HashiCorp Vault PKI, or a self-managed CA. All certificates for your services will be issued by this CA.

# AWS Private CA — create root CA aws acm-pca create-certificate-authority --type ROOT --certificate-authority-configuration "KeyAlgorithm=RSA_2048, SigningAlgorithm=SHA256WITHRSA, Subject={CN=entityOS Internal CA}"
STEP 02

Issue Service Certs

Each service gets its own X.509 certificate issued by your CA. The certificate contains the service identity in the Common Name or SAN. Use short-lived certs (24–72 hours) with automated renewal via cert-manager or ACM.

# cert-manager — issue cert for a service apiVersion: cert-manager.io/v1 kind: Certificate metadata: name: payments-service spec: secretName: payments-tls duration: 24h issuerRef: name: internal-ca
STEP 03

Enforce mTLS

Configure your load balancer, API gateway, or service mesh to require a client certificate on every inbound connection. Reject any connection that doesn't present a valid cert from your CA.

# AWS ALB — require client cert aws elbv2 modify-listener --listener-arn arn:aws:elasticloadbalancing:... --mutual-authentication "Mode=verify, TrustStoreArn=arn:aws:elasticloadbalancing:..., IgnoreClientCertificateExpiry=false"

X.509 Identity

Certificates for every actor.

X.509 certificates are no longer just for HTTPS. In a Stage 2 deployment they identify every type of actor in your system — users, devices, workloads, and services.

Users

Device-bound certs replace passwords for human access to internal APIs and admin systems

Devices

MDM-enrolled device certs gate access at the hardware level — enforced at the network layer

Workloads

Short-lived certs identify pods, containers, and functions — rotated automatically, never stored as secrets

Services

Service mesh certificates enable zero-trust service-to-service mTLS — every API call is authenticated

PROP 01 Verifiable Provenance Certificate chains provide cryptographically verifiable identity — the cert cannot be forged without the private key from the issuing CA. PKI
PROP 02 Short-Lived & Auto-Rotated Use certs with 24–72 hour lifetimes. Automated rotation via cert-manager or ACM means no long-lived secrets to steal or leak. Lifecycle
PROP 03 Revocable Certificates can be revoked immediately via CRL or OCSP if a service is compromised — no password reset, no key rotation ceremony required. Control
PROP 04 Carries Rich Identity Subject fields and SANs can encode service name, environment, team, and role — enabling fine-grained authorisation policies based on cert attributes. Identity

Scenario Matrix

Stage 1 + Stage 2 combined.

How the combined IP allowlisting + mTLS stack performs across common enterprise access scenarios.

Scenario Stage 1 (IP) + Stage 2 (mTLS) What it adds
Admin API — internal only ✓ Blocks external ✓ Verifies admin identity Only admins with a valid cert can connect, even from inside the network
Service-to-service API calls ✓ VPC only ✓ Verifies calling service payments-service can only be called by services holding an authorised cert
CI/CD pipeline ✓ Fixed NAT IP ✓ Pipeline cert identity CI runner proves it is the authorised pipeline, not just from the right IP
Remote / distributed teams ✗ IP varies ✓ Device cert works VPN not required — device certificate provides the identity boundary instead
Autoscaling container fleets ✗ Ephemeral IPs ✓ Workload cert Each pod gets a short-lived cert at startup — IP irrelevant, identity is the cert
Attacker inside allowed network ✗ IP is trusted ✓ No cert = no access Lateral movement is blocked — attacker cannot connect without a CA-signed cert
Compromised service credential ✗ No protection ✓ Cert revocable Revoke the service cert immediately — all connections from that identity stop
Thousands of microservices ✗ CIDR sprawl ✓ Automated cert mgmt cert-manager handles issuance and rotation at scale — no manual IP rule management

Implementation

Deploy Stage 2 in six steps.

01 Choose your PKI Select a Certificate Authority: AWS Private CA (managed, cloud-native), HashiCorp Vault PKI (self-managed, flexible), cert-manager + Let's Encrypt (Kubernetes-native), or an existing enterprise CA. Your choice drives everything downstream. Foundation
02 Define your trust domain Decide which services trust which CAs. A single root CA works for simple deployments. Separate CAs per environment (dev/staging/prod) provide stronger isolation. Document this clearly — it is your security boundary. Design
03 Issue certificates to all services Every service that participates in mTLS needs a certificate. Automate issuance using cert-manager, ACM, or Vault agent. Set short expiry (24–72 hours) and configure automatic renewal. Never manually distribute certificates. Issuance
04 Configure mTLS on ingress points Enable mutual TLS verification at your load balancers, API gateways, or service mesh (Istio, Linkerd, Envoy). Start in permissive mode to observe — then switch to enforce mode once all services have valid certs. Enforce
05 Log and monitor certificate usage Enable certificate logging at the load balancer and service mesh. Alert on: connections without a cert, expired cert attempts, unknown CA presentations, and unusual volumes from a single cert identity. Observe
06 Build a cert rotation runbook Document and test the rotation process before you need it in an incident. Confirm automated renewal works. Test revocation and re-issuance. Verify that a revoked cert is refused within your target time (aim for <60 seconds). Govern

Best Practices

Rules that keep Stage 2 effective.

mTLS is powerful but easy to misconfigure. These rules prevent the most common failures that leave you thinking you have cryptographic identity — when you don't.

Rule 01

Automate rotation, always

If a human needs to be involved in certificate renewal, it will be missed. Use cert-manager, ACM auto-renewal, or Vault agent. Treat any manually managed certificate as a security liability.

Rule 02

Keep certificates short-lived

Long-lived certificates (years) are secrets waiting to be stolen. Use 24–72 hour certs. A stolen short-lived cert expires before an attacker can exploit it. The small operational cost of rotation is worth the significant security gain.

Rule 03

Separate CAs per environment

A dev service should never be able to call production. Use separate CAs for dev, staging, and production. A cert issued by your dev CA will be rejected by your prod services — the environments are cryptographically isolated.

Rule 04

Encode identity in the cert

Put meaningful data in the certificate Subject — service name, team, environment, version. This enables authorisation policies that go beyond "has a valid cert" to "is the payments service, in prod, from team finance".

Rule 05

Test revocation before you need it

Run a revocation drill quarterly — revoke a test service cert and verify it is refused by dependent services within your SLA. If you've never tested it, you don't know if it works when a real incident occurs.

Rule 06

Never skip verification in development

The most dangerous configuration is InsecureSkipVerify: true. It disables all certificate checking and defeats the entire purpose of mTLS. Never allow it, even in dev.

Common Mistakes to Avoid
Using self-signed certs without a CA

A self-signed cert cannot be verified by any other service — it proves nothing. You need a shared CA that both sides trust. Self-signed certs in prod are security theatre.

Only enforcing mTLS at the edge

Enforcing mTLS at the load balancer but not between internal services means lateral movement after the edge is unchecked. mTLS must extend to every service-to-service call.

Storing private keys as plain secrets

If the private key is stored in a Kubernetes secret or environment variable in plaintext, the certificate provides no security. Keys must be in a secrets manager or HSM.

Not alerting on certificate expiry

A cert that expires in production silently breaks all connections. Monitor expiry dates with at least 72 hours' warning. An unmonitored cert expiry is an incident waiting to happen.

The Road Ahead

Stage 2 proves identity.

mTLS with manually managed certificates works well up to hundreds of services. Beyond that — ephemeral containers, autoscaling fleets, multi-cloud — you need automated workload identity. That's Stage 3.

01 Complete

IP Allowlisting

Network boundary control — deny all, allow known CIDRs. The outer perimeter that Stage 2 sits inside.

02 Current Stage

mTLS + X.509 Identity

Cryptographic identity for every connection. Both sides prove who they are with a certificate before any data flows.

Stage 2 Principle

Add mTLS to every internal service connection — not just the edge. Every service must present a valid X.509 certificate before it can connect. Combined with Stage 1 IP controls, this means an attacker needs both network access and a cryptographic credential — two independent barriers instead of one.