Istio gives every workload in the mesh a certificate-backed identity, but its defaults favour easy adoption over strong security, so a hardened mesh needs deliberate choices about mTLS modes, authorisation policy, certificate authority design and control plane exposure. This guide works through those choices resource by resource, using the settings, field names and caveats in the Istio project's own documentation as of November 2026.
It is written for platform engineers, Kubernetes administrators and identity teams who already run Istio, or are about to, and want a configuration baseline they can test. It treats the mesh as a non-human identity system first: every sidecar, ztunnel and gateway holds a credential, and every AuthorizationPolicy is an access decision about one machine talking to another. For the vendor-neutral background on sidecar and sidecarless meshes, mesh authorisation concepts and multi-cluster trust, read the Service Mesh Security Guide first; this page stays specific to Istio configuration.
This is an independent guide from NHI Mgmt Group, based on the Istio project's public documentation as of November 2026. It is not sponsored or reviewed by the Istio project. Product features change, so confirm settings against Istio's current documentation.
Key takeaways
- Istio proxies default to
PERMISSIVEmTLS, which accepts plaintext as well as mTLS. Move toSTRICTonce every client is in the mesh, and treat any remainingPERMISSIVEorDISABLEsetting as a documented exception. - mTLS authenticates; it does not authorise. Any workload holding a valid mesh certificate can reach a service until an AuthorizationPolicy says otherwise.
- With no AuthorizationPolicy, Istio allows every request. Start from an allow-nothing policy and add narrow
ALLOWrules keyed on principals, namespaces and operations. - Use positive matching in
ALLOWrules and negative matching inDENYrules, so that a mistake produces a 403 rather than a bypass. - The default self-signed root is fine for a lab, not for production. Plug in an intermediate per cluster from a root kept offline, or integrate a production CA.
- The sidecar is not a security boundary against its own application, and
REGISTRY_ONLYegress is best-effort. Pair Istio with Kubernetes NetworkPolicy and an egress gateway. - Lock down istiod debug and xDS ports, use the Istio CNI plugin, keep to the latest patch release, and run
istioctl analyzein the pipeline.
How Istio workload identity works
Istio treats service identity as a first-class concept. On Kubernetes the identity of a workload is its Kubernetes service account, and Istio expresses it as a SPIFFE-style principal such as cluster.local/ns/default/sa/curl: trust domain, namespace and service account. That principal is what appears in the URI SAN of the workload certificate, and it is what AuthorizationPolicy rules match on. The SPIFFE concepts page explains the identifier format, and the SPIFFE and SPIRE Guide covers the wider standard.
Issuance follows a short loop. The Istio agent running beside Envoy (or in ztunnel, in ambient mode) creates a private key and a certificate signing request, then sends the CSR to istiod together with its credentials, which on Kubernetes is the pod's service account token. The CA in istiod validates those credentials and signs the CSR. Envoy receives the certificate and key from the agent through the Secret Discovery Service (SDS) API, and the agent watches expiry and repeats the process to rotate the certificate.
Three consequences matter for security teams:
- The service account is the identity. Two deployments that share a service account are indistinguishable to every policy in the mesh. Give each workload its own service account, and never run meaningful workloads as
default. - The service account token is the bootstrap credential. Anyone who can mint or steal a token for a service account can obtain a mesh certificate for it. Istio recommends third-party (projected, audience-scoped and expiring) service account tokens over first-party tokens; check that the cluster supports the TokenRequest API and set
global.jwtPolicyif needed. The Kubernetes Service Account Token Guide covers token hygiene. - Kubernetes RBAC is mesh RBAC. Permission to create pods with an arbitrary
serviceAccountNamein a namespace is, in effect, permission to impersonate that workload to the mesh. Review who holds pod create rights in sensitive namespaces.
Certificate authority design
By default, Istio's CA generates a self-signed root certificate and key and uses them to sign workload certificates. That makes installation simple but leaves the root key inside the cluster, with no separation between clusters and no link to your enterprise PKI.
Istio's documented alternative is to plug in your own CA material. You keep the root CA on an offline, well-protected machine, issue an intermediate certificate to the Istio CA in each cluster, and load it as a secret named cacerts in the istio-system namespace with four files:
File in cacerts | Contents |
|---|---|
ca-cert.pem | The intermediate certificate istiod signs with |
ca-key.pem | The intermediate private key |
root-cert.pem | The root certificate workloads trust |
cert-chain.pem | The certificate chain istiod presents |
The Istio task that describes this notes that its steps are for demonstration and that production should use a production-ready CA, with HashiCorp Vault given as an example. Whichever route you take, apply these rules:
- One intermediate per cluster, so a compromised cluster can be cut out without reissuing everything.
- Treat the
cacertssecret as a tier zero credential. Restrictgetandliston secrets inistio-systemto the smallest possible group, and alert on any read outside istiod. - Record intermediate expiry dates in your certificate inventory. Workload certificates rotate automatically; intermediates do not.
- Plan and rehearse intermediate rotation and trust domain changes before you need them. A rushed root change during an incident is a common cause of mesh-wide outages.
The mTLS Guide covers the underlying certificate mechanics if your team is new to mutual TLS.
PeerAuthentication: from permissive to strict mTLS
PeerAuthentication controls whether a workload accepts plaintext, mTLS or both on inbound connections. Istio's best practice page is direct about the default: proxies run in permissive mode, which accepts both, because that allows incremental adoption, and it recommends moving to strict mode as soon as you can.
| Mode | Behaviour |
|---|---|
UNSET | Inherits from the parent scope. With no parent, treated as PERMISSIVE. |
DISABLE | Connection is not tunnelled. Not supported in ambient mode. |
PERMISSIVE | Accepts plaintext or mTLS. |
STRICT | Requires mTLS. |
Scope and precedence work from narrow to broad: a workload-specific policy (with a selector) overrides a namespace-wide policy, which overrides the mesh-wide policy. A policy in the root namespace with no selector applies mesh-wide; a policy in the root namespace that does carry a selector is ignored. Only one mesh-wide policy and one namespace-wide policy per namespace take effect, and newer duplicates are ignored. Where several workload-specific policies match, the oldest wins. portLevelMtls sets a mode per container port (not the Service port) and only works when a selector is set.
A hardened baseline looks like this:
- Apply a mesh-wide policy named
defaultin the root namespace (typicallyistio-system) withmode: STRICT. - Where a namespace genuinely needs plaintext clients during migration, set a namespace-wide
PERMISSIVEpolicy with an owner and an end date. - Use
portLevelMtlswithDISABLEonly for specific ports that must accept non-mesh traffic, such as a health check from an external load balancer, and record why. - Prevent duplicate policies by convention: name namespace-wide policies
defaultand reject any second unselected policy in admission control.
Because duplicates are silently ignored and selectors in the root namespace are silently ignored, a strict mesh can be weakened without any error. Detect it by listing every PeerAuthentication in the cluster and checking for PERMISSIVE, DISABLE and UNSET modes and port-level exceptions.
AuthorizationPolicy: default deny and least privilege
AuthorizationPolicy is where Istio becomes an access control system for workloads. The resource has a selector or targetRefs (never both), a list of rules, and an action of ALLOW (the default), DENY, AUDIT or CUSTOM. Each rule has from (sources), to (operations) and when (conditions). Source fields include principals, requestPrincipals, namespaces, serviceAccounts, ipBlocks, remoteIpBlocks and trustDomains, each with a negative form such as notPrincipals. Fields inside one source are combined with AND.
Istio evaluates policies in a fixed order:
- If any
CUSTOMpolicy matches and denies, the request is denied. - If any
DENYpolicy matches, the request is denied. - If the workload has no
ALLOWpolicies, the request is allowed. - If any
ALLOWpolicy matches, the request is allowed. - Otherwise the request is denied.
Step three is the reason a fresh mesh is open. Close it with an allow-nothing policy: an AuthorizationPolicy with spec: {} in a namespace denies every request to workloads in that namespace, and the same policy in the root namespace applies across the mesh. Then add ALLOW policies per workload that name the calling principals and the operations they need.
Rules that hold up in practice:
- Match on principals, not IPs. Use
principalsorserviceAccountsfor east-west calls. IP blocks are fragile in Kubernetes and say nothing about which workload is calling. - Positive matching for ALLOW, negative for DENY. Istio recommends that
ALLOWpolicies use only positive fields such aspathsandvalues, andDENYpolicies only negative fields such asnotPathsandnotValues. A mismatch then fails closed with a 403. - Scope operations. Add
methods,pathsandportsto everyALLOWrule that fronts an HTTP API. "Service A can call service B" is rarely what you mean; "service A can GET /v1/orders on B" usually is. - Know the limits. AuthorizationPolicy enforces inbound traffic only, and server-first TCP protocols are not supported, because the server's first bytes are sent before the check.
- Test before enforcing. The experimental annotation
istio.io/dry-run: "true"evaluates a policy without enforcing it, so you can watch its effect on production traffic.AUDITactions only mark requests and need an audit plugin to do anything.
In ambient mode, layer seven policy runs in waypoints. Since Istio 1.25 you can bind an AuthorizationPolicy to the istio-waypoint GatewayClass with targetRefs; because GatewayClass is cluster-scoped, that policy must live in the root namespace. Keep the classic default-deny policy as well, because ztunnel still enforces it on mesh workloads. The Kubernetes Network Policies vs Service Mesh Policies page explains how the two policy layers fit together.
End-user authentication with RequestAuthentication
RequestAuthentication validates JSON Web Tokens against an issuer and JWKS. Its default behaviour surprises many teams: a request with an invalid token is rejected, but a request with no token at all is accepted. RequestAuthentication on its own therefore does not require authentication.
To require a token, pair it with an AuthorizationPolicy that allows only requests with a requestPrincipals value (for example, any principal from your issuer) or matches specific claims in a when condition such as request.auth.claims[iss]. Multiple matching RequestAuthentication policies are combined, and requests carrying more than one valid JWT are not supported, so keep one issuer per path where you can.
From an NHI perspective, the important point is that a JWT principal and a peer principal are different identities. A front-end service forwarding a user token is still a workload with its own certificate. Write policies that check both: the calling workload, through principals, and the end user or calling client, through requestPrincipals and claims.
Path normalisation and host matching
Path-based policies are only as good as the path the proxy sees. Istio's meshConfig.pathNormalization.normalization setting controls this:
| Option | Behaviour |
|---|---|
NONE | No normalisation |
BASE | RFC 3986 normalisation plus backslash to forward slash; the default in a standard installation |
MERGE_SLASHES | BASE plus merging of repeated slashes |
DECODE_AND_MERGE_SLASHES | Also decodes %2F, %2f, %5C and %5c before merging; the strictest option |
Istio's advice is to choose the strictest option your applications tolerate, then write positive and negative tests, because the backend can still interpret a URL differently from Envoy. Case differences are not normalised; if a backend treats paths case-insensitively, Istio points to a WASM filter (the supported route) or a WAF in front of the ingress gateway rather than Lua filters, which it describes as unsuitable for production.
Host matching has two traps. Istio generates both example.com and example.com:*, so an exact host match must list both. And hosts and notHosts belong on gateways, not sidecars: a sidecar does not use the Host header to forward traffic, so a client can reach the workload by IP with any Host header it likes.
Ingress and egress gateways
Gateways are where external identities meet the mesh, and they hold certificates and keys for public hostnames. Istio's recommendations:
- Restrict who can create Gateway resources to trusted cluster administrators, using Kubernetes RBAC or an admission policy tool.
- Avoid
hosts: ["*"], which lets any VirtualService bind. Use specific hosts, namespace-qualified hosts such asdefault/bar.example.com, or namespace wildcards such asroute-namespace/*. - Run a dedicated gateway for sensitive hosts, such as payments, and share one gateway for less sensitive traffic.
- Separate mTLS and simple TLS hosts onto different Gateways. Envoy does not enforce that the Host or
:authoritymatches the SNI, so a connection opened for one host can be reused to reach another; return HTTP 421 for sensitive hosts on the broader wildcard route. - Keep gateway credential RBAC consistent across clusters in multi-cluster meshes, and do not reuse a namespace name across clusters owned by different teams.
For egress, Istio states plainly that outboundTrafficPolicy: REGISTRY_ONLY is best-effort and not a security boundary. Enforced egress needs an egress gateway plus a Kubernetes NetworkPolicy that blocks pods from bypassing it. When a DestinationRule originates TLS to an external service, set tls.mode: SIMPLE with caCertificates, subjectAltNames and sni; verifying the chain without checking the SAN is not enough, and egress does not send SNI by default.
Control plane and data plane hardening
istiod signs every workload certificate and pushes every policy, which makes it the most privileged non-human identity in the mesh. Harden it and the proxies as follows:
- Lock down ports. Restrict istiod's debug and plaintext xDS ports (8080, 15010, 15012 and 15014) and limit exposure of proxy ports 15000, 15020, 15021 and 15090. Debug endpoint authentication is enabled by default; do not turn it off.
- Use the Istio CNI plugin. Without it, the
istio-initcontainer needsNET_ADMINandNET_RAWcapabilities in every application pod. - Remember what the sidecar can and cannot stop. Only TCP is captured; UDP and ICMP are not. An application shares a network namespace with its own sidecar and can bypass it; the guarantee is that a client cannot bypass another pod's sidecar. Add Kubernetes NetworkPolicy for defence in depth, and restart proxies after policy changes if existing connections must be cut.
- Declare protocols explicitly on Service ports rather than relying on automatic detection.
- Set connection limits. Istio and Envoy have no downstream connection limit by default; set
overload.global_downstream_max_connectionsto suit your environment. - Prefer hardened images and stable features. Distroless images reduce attack surface (Istio lists them as alpha), and alpha or experimental features may not receive normal security handling.
- Patch. Stay on the latest patch release of a supported Istio version so you receive security fixes.
If you suspect the control plane or CA material has been exposed, the If your service mesh is compromised playbook sets out containment and reissue steps.
Detecting misconfiguration and drift
Istio rejects some bad configuration and silently ignores other bad configuration, so validation has to be continuous. Istio recommends running istioctl analyze, monitoring the pilot_total_xds_rejects metric and proxy logs for rejected configuration, and testing both allowed and denied traffic for every security policy.
Build those into the delivery pipeline and add your own checks:
- Fail the build if any PeerAuthentication outside an approved list uses
PERMISSIVE,DISABLEor port-level exceptions. - Fail the build if a namespace that runs workloads has no allow-nothing or default-deny AuthorizationPolicy.
- Flag
ALLOWrules with nofromclause, withprincipals: ["*"], or with negative fields. - Flag Gateways with
hosts: ["*"]and DestinationRules that originate TLS withoutsubjectAltNames. - Alert on reads of the
cacertssecret and on changes to mesh-wide resources in the root namespace.
Map these to your control framework: NIST SP 800-53 SC-8 (transmission confidentiality and integrity) for strict mTLS, IA-9 (service identification and authentication) for workload identity, and the service mesh guidance in NIST SP 800-204A.
Common failure patterns
- Permanent permissive mode. The mesh was installed with permissive mTLS for migration and never switched, so plaintext clients outside the mesh still reach every service.
- mTLS treated as access control. Strict mTLS is on but no AuthorizationPolicy exists, so every workload with a mesh certificate can call every other workload.
- Shared service accounts. Many deployments run as
defaultor a shared account, so principal-based policies cannot tell them apart. - Ignored policies. A second namespace-wide PeerAuthentication or a selector in the root namespace is silently ignored, and the team believes a stricter setting is active.
- RequestAuthentication without a matching AuthorizationPolicy. Requests with no token pass straight through.
- Negative matching in ALLOW rules. A
notPathsrule in anALLOWpolicy opens a path the author did not expect. - Self-signed root in production. The root key sits in the cluster and every cluster trusts every other.
- Egress assumed blocked.
REGISTRY_ONLYis relied on as a control, with no egress gateway or NetworkPolicy behind it. - Exposed control plane ports. istiod debug or plaintext xDS ports are reachable from application namespaces.
Practitioner checklist
- Every workload runs under its own Kubernetes service account, with projected, expiring tokens.
- A mesh-wide PeerAuthentication in the root namespace sets
STRICT; every exception has an owner and end date. - An allow-nothing AuthorizationPolicy exists in every application namespace or mesh-wide, and each workload has narrow
ALLOWrules keyed on principals and operations. ALLOWrules use positive fields only;DENYrules use negative fields only.- Every RequestAuthentication is paired with an AuthorizationPolicy that requires a request principal.
- Path normalisation is set to the strictest option the applications tolerate, with positive and negative tests.
- The mesh uses a plugged-in intermediate per cluster or a production CA, with the root offline and
cacertsaccess restricted and monitored. - Gateway creation is restricted, wildcard hosts are removed, and sensitive hosts have a dedicated gateway.
- Egress is enforced by an egress gateway plus NetworkPolicy, and TLS origination checks
subjectAltNames. - istiod and proxy ports are restricted, the Istio CNI plugin is in use, and connection limits are set.
istioctl analyzeand policy tests run in the pipeline, andpilot_total_xds_rejectsis alerted on.- Istio runs the latest patch of a supported release.
Standards and references
- Istio: Security best practices
- Istio: Security concepts
- Istio: Authorization Policy reference
- Istio: PeerAuthentication reference
- Istio: Plug in CA certificates
- NIST: SP 800-204A Building Secure Microservices-based Applications Using Service-Mesh Architecture
- NIST: SP 800-53 Rev. 5
- SPIFFE: SPIFFE Concepts
Related NHI Mgmt Group resources: Service Mesh Security Guide · SPIFFE and SPIRE Guide · Kubernetes Service Account Token Guide · Kubernetes Security Guide