Secure Service Communication

CNPA Domain: Platform Observability, Security, and Conformance (20%) Topic: Secure Service Communication

Overview

In a microservices architecture, services communicate constantly over the network. By default, this traffic is unencrypted and unauthenticated β€” any compromised workload can eavesdrop or impersonate another service. Secure service communication is the platform capability that ensures every service-to-service connection is:

  • Encrypted (confidentiality)

  • Authenticated (identity verification)

  • Authorized (only permitted callers succeed)

Platform teams implement this transparently through mutual TLS (mTLS) and service mesh, so application developers don't manage certificates themselves.


The Problem: East-West Traffic

                 North-South (external)
                      ↓
              [Ingress / API Gateway]
                      ↓
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚         Kubernetes Cluster          β”‚
    β”‚                                     β”‚
    β”‚   [Service A] ──?──▢ [Service B]    β”‚  ← East-West
    β”‚       ↕                   ↕         β”‚
    β”‚   [Service C] ──?──▢ [Service D]    β”‚  ← East-West
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

East-west traffic between services is the largest attack surface in a microservices platform. Without mTLS:

  • A compromised pod can intercept traffic from other services

  • Services cannot verify the identity of their callers

  • Network-based attacks (MITM, impersonation) are possible inside the cluster


Mutual TLS (mTLS)

TLS (Transport Layer Security) encrypts a connection. Mutual TLS additionally requires both parties to present certificates β€” the client authenticates the server AND the server authenticates the client.

How Service Mesh Implements mTLS

Without service mesh, each application must manage its own certificates. With a service mesh, a sidecar proxy (Envoy) intercepts all traffic and handles TLS transparently:

The application code communicates on localhost with no TLS knowledge. The service mesh handles everything.


Service Mesh: Istio

Istioarrow-up-right is the most widely deployed service mesh. Platform teams install Istio on the cluster and enforce mTLS across namespaces.

Enabling mTLS Cluster-Wide

Authorization Policies

Istio AuthorizationPolicy restricts which services can communicate:


Service Mesh: Linkerd

Linkerdarrow-up-right is a CNCF graduated, simpler alternative to Istio with automatic mTLS requiring zero configuration after installation.

All pods in annotated namespaces automatically get mTLS with zero application changes.


Kubernetes Network Policies

Even before implementing a service mesh, NetworkPolicies provide Layer 3/4 traffic control:

Note: NetworkPolicies require a CNI plugin that supports them (Calico, Cilium, Weave).


Zero-Trust Networking

Zero-trust is the security model that assumes no network location is trusted by default:

"Never trust, always verify"

Principle
Implementation

Verify explicitly

mTLS identity for every service call

Least privilege

AuthorizationPolicies limit permitted callers

Assume breach

Network policies segment blast radius

Platform teams implement zero-trust by combining:

  1. mTLS (via service mesh) for authentication

  2. AuthorizationPolicies for access control

  3. NetworkPolicies for network segmentation

  4. External secrets to avoid credential leakage


Certificate Management

Service mesh tools manage short-lived certificates automatically. For platform-level certificate authority:


Key Takeaways

  • East-west (service-to-service) traffic is the primary attack surface inside a Kubernetes cluster

  • mTLS provides both encryption and mutual identity verification for service communication

  • Service meshes (Istio, Linkerd) implement mTLS transparently via sidecar proxies β€” no application code changes

  • Istio AuthorizationPolicies enforce which service identities are permitted to call which services

  • NetworkPolicies provide network segmentation at L3/L4 as a complementary security layer

  • Zero-trust = verify every connection, grant least privilege, assume breach


Further Reading

Last updated