---
title: "API Gateway and Istio: Clear North-South and East-West Boundaries - API7.ai"
description: "Combine an API gateway with Istio by assigning ingress, mesh, identity, routing, retries, and policy to explicit owners and testing every handoff."
url: "https://api7.ai/learning-center/api-gateway-guide/api-gateway-istio"
---

[Skip to article](#column-content)

Column contentsAPI Gateway Guide

[API Gateway Guide](https://api7.ai/learning-center/api-gateway-guide)

Search this column

01 Gateway Fundamentals

[View this topic · 10](https://api7.ai/learning-center/api-gateway-guide?topic=fundamentals)[1. What Is an API Gateway? API Gateway Software and Use Cases](https://api7.ai/learning-center/api-gateway-guide/what-is-an-api-gateway)[2. Why Do Modern Architectures Need an API Gateway?](https://api7.ai/learning-center/api-gateway-guide/why-do-modern-architectures-need-api-gateway)[3. Reverse Proxy vs Load Balancer vs API Gateway](https://api7.ai/learning-center/api-gateway-guide/api-gateway-vs-reverse-proxy-vs-load-balancer)[4. API Gateway and Microservices: Decoupling and Traffic Management](https://api7.ai/learning-center/api-gateway-guide/api-gateway-and-microservices)[5. Understanding Core API Gateway Features](https://api7.ai/learning-center/api-gateway-guide/core-api-gateway-features)[6. Open Source vs. Commercial API Gateways: How to Choose the Right One?](https://api7.ai/learning-center/api-gateway-guide/open-source-vs-commercial-api-gateway)[7. API Gateway vs Service Mesh: How to Choose?](https://api7.ai/learning-center/api-gateway-guide/api-gateway-vs-service-mesh)[8. Envoy vs NGINX, Java, and Go for API Gateways](https://api7.ai/learning-center/api-gateway-guide/nginx-vs-envoy-vs-java-vs-go)[9. Core Concepts of API Gateway: Service, Route, Upstream, Plugin, and Consumer](https://api7.ai/learning-center/api-gateway-guide/core-concepts-of-api-gateway)[10. API Gateway Comparison: Apache APISIX vs. Kong vs. Traefik vs. KrakenD vs. Tyk](https://api7.ai/learning-center/api-gateway-guide/api-gateway-comparison-apisix-kong-traefik-krakend-tyk)

02 Gateway Architecture and Design

[View this topic · 10](https://api7.ai/learning-center/api-gateway-guide?topic=architecture)[11. Deep Dive into API Gateway Architecture: Core Components and Design Principles](https://api7.ai/learning-center/api-gateway-guide/api-gateway-architecture)[12. Choosing the Right API Gateway for Your Architecture](https://api7.ai/learning-center/api-gateway-guide/api-gateway-monolithic-vs-microservices)[13. How to Architect an API Gateway for High Availability (HA)?](https://api7.ai/learning-center/api-gateway-guide/api-gateway-high-availability)[14. API Gateway Plugin Architecture: How to Extend and Customize Your API Gateway](https://api7.ai/learning-center/api-gateway-guide/api-gateway-plugin-system)[15. How Event-Driven Architecture (EDA) Works with API Gateway?](https://api7.ai/learning-center/api-gateway-guide/api-gateway-event-driven-architecture)[16. API Gateway Request Lifecycle Explained](https://api7.ai/learning-center/api-gateway-guide/api-gateway-request-lifecycle-explained)[17. Cloud-Native API Gateway on Kubernetes](https://api7.ai/learning-center/api-gateway-guide/cloud-native-api-gateway-kubernetes)[18. API Gateway Control Plane vs. Data Plane](https://api7.ai/learning-center/api-gateway-guide/api-gateway-control-plane-vs-data-plane)[19. How API Gateways Work with GitOps: Automating API Management](https://api7.ai/learning-center/api-gateway-guide/api-gateway-gitops-integration)[20. How to Perform A/B Testing and Canary Releases with an API Gateway](https://api7.ai/learning-center/api-gateway-guide/ab-testing-canary-release-api-gateway)

03 Gateway Setup and Traffic Handling

[View this topic · 10](https://api7.ai/learning-center/api-gateway-guide?topic=traffic-protocols)[21. How to Deploy an API Gateway on Kubernetes: Step-by-Step Guide for Engineers](https://api7.ai/learning-center/api-gateway-guide/deploy-api-gateway-on-kubernetes)[22. Hands-on Setup with Apache APISIX API Gateway](https://api7.ai/learning-center/api-gateway-guide/api-gateway-getting-started-guide)[23. API Gateway Auth: OAuth 2.0, JWT & OIDC with APISIX](https://api7.ai/learning-center/api-gateway-guide/api-gateway-authentication-apache-apisix-oauth-jwt-oidc)[24. Mastering Traffic Control: Efficiently Managing API Requests with Gateways](https://api7.ai/learning-center/api-gateway-guide/api-gateway-traffic-control-strategies)[25. Building Reliable API Gateways with Logging and Monitoring](https://api7.ai/learning-center/api-gateway-guide/api-gateway-logging-monitoring-best-practices)[26. Dynamic Routing in API Gateways: Best Practices for Flexible Traffic Management](https://api7.ai/learning-center/api-gateway-guide/api-gateway-dynamic-routing-management)[27. How API Gateways Support WebSocket](https://api7.ai/learning-center/api-gateway-guide/how-api-gateways-support-websocket)[28. API Gateway for GraphQL: Security, Cost, and Caching](https://api7.ai/learning-center/api-gateway-guide/api-gateway-handle-graphql)[29. How API Gateways Handle HTTP/3 QUIC Requests](https://api7.ai/learning-center/api-gateway-guide/api-gateway-http3-quic)[30. How API Gateways Handle MQTT Requests](https://api7.ai/learning-center/api-gateway-guide/api-gateway-mqtt)

04 Gateway Integrations, AI, and MCP

[View this topic · 10](https://api7.ai/learning-center/api-gateway-guide?topic=ai-mcp)[31. How API Gateways Handle gRPC Requests](https://api7.ai/learning-center/api-gateway-guide/api-gateway-grpc-support)[32. How API Gateways Implement Custom Plugins](https://api7.ai/learning-center/api-gateway-guide/api-gateway-custom-plugins)[33. How API Gateways Integrate with Kafka](https://api7.ai/learning-center/api-gateway-guide/api-gateway-kafka-integration)[34. How to Implement API Aggregation in API Gateways](https://api7.ai/learning-center/api-gateway-guide/api-gateway-api-aggregation)[35. How API Gateways Enable Serverless Architecture](https://api7.ai/learning-center/api-gateway-guide/api-gateway-serverless-architecture)[36. How API Gateways Proxy LLM Requests](https://api7.ai/learning-center/api-gateway-guide/api-gateway-proxy-llm-requests)[37. How API Gateways Enhance MCP Servers](https://api7.ai/learning-center/api-gateway-guide/api-gateway-enhance-mcp-server)[38. MCP Gateway vs MCP Proxy vs AI Gateway vs API Gateway](https://api7.ai/learning-center/api-gateway-guide/ai-gateway-vs-mcp-gateway-vs-api-gateway)[39. What Is an AI Gateway? Architecture and Benefits](https://api7.ai/learning-center/api-gateway-guide/what-is-an-ai-gateway)[40. What Is an MCP Gateway? Architecture, Use Cases & How It Works (2026 Guide)](https://api7.ai/learning-center/api-gateway-guide/what-is-mcp-gateway)

05 Gateway Performance

[View this topic · 10](https://api7.ai/learning-center/api-gateway-guide?topic=performance)[41. How API Gateway Reduces Latency: Performance Optimization Strategies](https://api7.ai/learning-center/api-gateway-guide/how-api-gateway-reduces-latency)[42. API Gateway Caching Strategy: Comprehensive Analysis and Implementation Guide](https://api7.ai/learning-center/api-gateway-guide/api-gateway-caching-strategy-analysis)[43. How to Optimize API Gateway Load Balancing: Advanced Strategies and Best Practices](https://api7.ai/learning-center/api-gateway-guide/how-to-optimize-api-gateway-load-balancing)[44. How API Gateway Efficiently Handles Large-Scale Traffic: Architecture and Strategies](https://api7.ai/learning-center/api-gateway-guide/how-api-gateway-handles-large-scale-traffic)[45. How to Improve API Gateway QoS: Traffic Classes, Capacity Protection, and SLOs](https://api7.ai/learning-center/api-gateway-guide/api-gateway-quality-of-service)[46. API Gateway Log Storage: Pipelines, Retention, Security, and Cost](https://api7.ai/learning-center/api-gateway-guide/api-gateway-log-storage)[47. API Gateway Timeouts and Retries: Safe Policies and APISIX Configuration](https://api7.ai/learning-center/api-gateway-guide/api-gateway-timeouts-retries)[48. API Gateway Concurrency Control: Capacity Budgets, Backpressure, and Load Shedding](https://api7.ai/learning-center/api-gateway-guide/api-gateway-concurrency-control)[49. Asynchronous API Gateway Patterns: Queues, Callbacks, and Performance Boundaries](https://api7.ai/learning-center/api-gateway-guide/asynchronous-api-gateway-patterns)[50. API Gateway TLS Performance: Handshakes, Session Reuse, and Measurement](https://api7.ai/learning-center/api-gateway-guide/api-gateway-tls-performance)

06 Gateway Security

[View this topic · 10](https://api7.ai/learning-center/api-gateway-guide?topic=security)[51. DDoS Defense at the API Gateway: Layered Controls and Failure Planning](https://api7.ai/learning-center/api-gateway-guide/api-gateway-ddos-defense)[52. Distributed API Gateway Rate Limiting: Local vs Redis Counters and Accuracy Trade-offs](https://api7.ai/learning-center/api-gateway-guide/distributed-api-gateway-rate-limiting)[53. API Gateway IP Allowlist and Denylist Management: Trust, Proxies, and Operations](https://api7.ai/learning-center/api-gateway-guide/api-gateway-ip-allowlist-denylist-management)[54. API Gateway Security Scanning: What to Test and How to Operationalize Findings](https://api7.ai/learning-center/api-gateway-guide/api-gateway-security-scanning)[55. SQL Injection and XSS at the API Gateway: Detection Limits and Defense in Depth](https://api7.ai/learning-center/api-gateway-guide/sql-injection-xss-api-gateway)[56. API Access Log Auditing: Evidence, Integrity, Retention, and Review](https://api7.ai/learning-center/api-gateway-guide/api-access-log-auditing)[57. Preventing API Scraping and Abuse: Identity, Behavioral Signals, and Rate Controls](https://api7.ai/learning-center/api-gateway-guide/prevent-api-scraping-abuse)[58. API Gateway mTLS: Client Identity, Certificate Rotation, and APISIX Configuration](https://api7.ai/learning-center/api-gateway-guide/api-gateway-mtls)[59. Fine-Grained API Gateway Authorization: RBAC, ABAC, and External Policy Decisions](https://api7.ai/learning-center/api-gateway-guide/fine-grained-api-gateway-authorization)[60. API Gateway and WAF Reference Architecture: Ownership, Header Trust, and Failure Modes](https://api7.ai/learning-center/api-gateway-guide/api-gateway-waf-reference-architecture)

07 Gateway Ecosystem and Comparisons

[View this topic · 10](https://api7.ai/learning-center/api-gateway-guide?topic=ecosystem)[61. Apache APISIX vs Kong: Migration, Operations, and Team Fit](https://api7.ai/learning-center/api-gateway-guide/apache-apisix-vs-kong)[62. Traefik vs Kong vs APISIX: A Reproducible API Gateway Benchmark Method](https://api7.ai/learning-center/api-gateway-guide/traefik-kong-apisix-benchmark-method)[63. Amazon API Gateway Explained: Deployment Models, Trade-offs, and Use Cases](https://api7.ai/learning-center/api-gateway-guide/amazon-api-gateway-explained)[64. API Gateway and Istio: Clear North-South and East-West Boundaries](https://api7.ai/learning-center/api-gateway-guide/api-gateway-istio)[65. API Gateway with NGINX: Layering, Ownership, and Migration Patterns](https://api7.ai/learning-center/api-gateway-guide/api-gateway-nginx)[66. API Gateway with Envoy: Deployment Patterns and Policy Ownership](https://api7.ai/learning-center/api-gateway-guide/api-gateway-envoy)[67. API Gateway with Cloudflare API Shield: Edge and Origin Security Boundaries](https://api7.ai/learning-center/api-gateway-guide/api-gateway-cloudflare-api-shield)[68. Apigee vs MuleSoft vs Amazon API Gateway: A Decision Framework](https://api7.ai/learning-center/api-gateway-guide/apigee-mulesoft-amazon-api-gateway)[69. Should an API Gateway Connect Directly to a Database? Patterns and Risks](https://api7.ai/learning-center/api-gateway-guide/api-gateway-database-access-patterns)[70. API Gateway Architecture for Large-Scale SaaS Platforms](https://api7.ai/learning-center/api-gateway-guide/api-gateway-large-scale-saas-architecture)

08 Industry Applications and Integrations

[View this topic · 10](https://api7.ai/learning-center/api-gateway-guide?topic=applications)[71. API Gateway CI/CD: Validation, Promotion, and Safe Rollback](https://api7.ai/learning-center/api-gateway-guide/api-gateway-ci-cd)[72. API Gateways for AI and ML Inference: Traffic, Security, and Observability](https://api7.ai/learning-center/api-gateway-guide/api-gateways-ai-ml-inference)[73. API Gateway Architecture for Financial Services: Controls and Failure Boundaries](https://api7.ai/learning-center/api-gateway-guide/api-gateway-financial-services)[74. API Gateway Architecture for E-Commerce: Checkout Reliability and Traffic Peaks](https://api7.ai/learning-center/api-gateway-guide/api-gateway-ecommerce)[75. API Gateways for Mobile Applications: Authentication, Payloads, and Versioning](https://api7.ai/learning-center/api-gateway-guide/api-gateways-mobile-applications)[76. API Gateways for Web3 Applications: RPC Traffic, Identity, and Abuse Controls](https://api7.ai/learning-center/api-gateway-guide/api-gateways-web3-applications)[77. OpenAPI-Driven API Gateway Operations: Import, Validation, and Drift Control](https://api7.ai/learning-center/api-gateway-guide/openapi-driven-api-gateway-operations)[78. gRPC-Web and gRPC Transcoding Through an API Gateway](https://api7.ai/learning-center/api-gateway-guide/grpc-web-grpc-transcoding-api-gateway)[79. API Gateway Pricing and Cost Optimization: A Workload-Based Model](https://api7.ai/learning-center/api-gateway-guide/api-gateway-pricing-cost-optimization)[80. Evaluating API Gateway Directions: Evidence and Architectural Impact](https://api7.ai/learning-center/api-gateway-guide/api-gateway-trends)

09 Advanced Gateway Applications

[View this topic · 10](https://api7.ai/learning-center/api-gateway-guide?topic=operations)[81. API Gateways in Zero Trust Architecture: Identity, Policy, and Limits](https://api7.ai/learning-center/api-gateway-guide/api-gateways-zero-trust-architecture)[82. API Gateway Log Analytics: Correlation, Queries, and Operational Signals](https://api7.ai/learning-center/api-gateway-guide/api-gateway-log-analytics)[83. From API Sprawl to Governed Delivery: The Gateway's Role in Modernization](https://api7.ai/learning-center/api-gateway-guide/api-gateway-modernization)[84. API Monetization at the Gateway: Plans, Metering, Entitlements, and Billing Boundaries](https://api7.ai/learning-center/api-gateway-guide/api-monetization-gateway)[85. Safe AI-Assisted API Gateway Optimization: Recommendations, Guardrails, and Approval](https://api7.ai/learning-center/api-gateway-guide/ai-assisted-api-gateway-optimization)[86. API Gateways for Low-Code and No-Code Integration: Governance and Safety](https://api7.ai/learning-center/api-gateway-guide/api-gateways-low-code-no-code-integration)[87. API Gateway and CIAM Integration: Token Validation, Consent, and Identity Context](https://api7.ai/learning-center/api-gateway-guide/api-gateway-ciam-integration)[88. Elastic API Gateway Scaling: Signals, Capacity, and Safe Scale-In](https://api7.ai/learning-center/api-gateway-guide/elastic-api-gateway-scaling)[89. Multi-Tenant SaaS API Gateways: Isolation, Quotas, and Tenant-Aware Policy](https://api7.ai/learning-center/api-gateway-guide/multi-tenant-saas-api-gateway-policy)[90. API Gateway DevSecOps: Policy as Code, Testing, and Runtime Feedback](https://api7.ai/learning-center/api-gateway-guide/api-gateway-devsecops)

10 Platform Engineering and Planning

[View this topic · 10](https://api7.ai/learning-center/api-gateway-guide?topic=platform-governance)[91. API Discovery and Documentation at the Gateway: Inventory, Ownership, and Drift](https://api7.ai/learning-center/api-gateway-guide/api-discovery-documentation-gateway)[92. WebAssembly Plugins for API Gateways: Portability, Isolation, and APISIX Boundaries](https://api7.ai/learning-center/api-gateway-guide/api-gateway-webassembly-plugins)[93. Monitoring API Gateways with Prometheus and Grafana: Metrics, Dashboards, and Alerts](https://api7.ai/learning-center/api-gateway-guide/monitor-api-gateways-prometheus-grafana)[94. API Gateway Reliability Engineering: SLOs, Failure Isolation, and Incident Response](https://api7.ai/learning-center/api-gateway-guide/api-gateway-reliability-engineering)[95. API Gateways for Edge AI Inference: Routing, Constraints, and Observability](https://api7.ai/learning-center/api-gateway-guide/api-gateways-edge-ai-inference)[96. Reducing Cloud Cost with API Gateway Controls: Measurement Before Optimization](https://api7.ai/learning-center/api-gateway-guide/reducing-cloud-cost-api-gateway-controls)[97. Improving API Developer Experience with Gateway Standards and Self-Service](https://api7.ai/learning-center/api-gateway-guide/improving-api-developer-experience-gateway-self-service)[98. API Gateway Change Management: Compatibility, Progressive Delivery, and Rollback](https://api7.ai/learning-center/api-gateway-guide/api-gateway-change-management-rollback)[99. Operating Serverless APIs: Cold Starts, Idempotency, and Asynchronous Handoffs](https://api7.ai/learning-center/api-gateway-guide/operating-serverless-apis-gateway)[100. Planning an API Gateway Roadmap for the Next Five Years](https://api7.ai/learning-center/api-gateway-guide/planning-api-gateway-roadmap-next-five-years)

[API Gateway Guide](https://api7.ai/learning-center/api-gateway-guide)[Gateway Ecosystem and Comparisons](https://api7.ai/learning-center/api-gateway-guide?topic=ecosystem)

On this page

On this page

- [Key Takeaways](#key-takeaways)

- [Separate the Responsibility Planes](#separate-the-responsibility-planes)

- [Choose One of Three Topologies](#choose-one-of-three-topologies)

  - [1. API gateway before Istio ingress](#1-api-gateway-before-istio-ingress)
  - [2. Istio ingress as the only public gateway](#2-istio-ingress-as-the-only-public-gateway)
  - [3. Public gateway plus dedicated multicluster east-west gateways](#3-public-gateway-plus-dedicated-multicluster-east-west-gateways)

- [Define the Identity Handoff](#define-the-identity-handoff)

- [Pair Authentication with Authorization](#pair-authentication-with-authorization)

- [Treat Mesh mTLS as Workload Authentication](#treat-mesh-mtls-as-workload-authentication)

- [Assign Traffic Policy Once](#assign-traffic-policy-once)

- [Coordinate Kubernetes Configuration Ownership](#coordinate-kubernetes-configuration-ownership)

- [Observe and Verify the Complete Path](#observe-and-verify-the-complete-path)

- [Migration Sequence](#migration-sequence)

- [Summary](#summary)

- [FAQ](#faq)

  - [Does every Istio deployment need a separate API gateway?](#does-every-istio-deployment-need-a-separate-api-gateway)
  - [Is an Istio east-west gateway an API gateway?](#is-an-istio-east-west-gateway-an-api-gateway)
  - [Does Istio mTLS authenticate the end user?](#does-istio-mtls-authenticate-the-end-user)

- [Next Steps](#next-steps)

Article 64

# API Gateway and Istio: Clear North-South and East-West Boundaries

API7.ai

September 14, 2026

An API gateway and Istio can complement each other, but only when each policy has one clear owner. A common design gives the API gateway the public API contract—consumer authentication, quotas, version routing, and request transformation—while Istio protects and observes workload-to-workload traffic inside the mesh. That division is a starting point, not a rule: Istio's ingress gateway may be sufficient when the public edge needs only the capabilities it already provides.

The dangerous design is an accidental stack. Two gateways validate different tokens, append different client addresses, retry the same request, and report incompatible route names. This guide shows how to choose a topology, define the identity handoff, and verify the complete path before production traffic moves.

The Istio behavior in this guide is reviewed against Istio 1.31.1. Pin the patch release and Gateway API CRDs used by the deployment, because a floating documentation page is not a production version contract.

## Key Takeaways

- Start with responsibilities, not products: public API policy, mesh identity, application authorization, and network exposure need named owners.
- Use one permitted public path. An Istio ingress endpoint or workload service that remains directly reachable can bypass edge policy.
- Istio `RequestAuthentication` validates credentials that are present; an accompanying authorization policy is needed when credentials must be present.
- Mesh mutual TLS authenticates workloads, not end users, and does not replace authorization.
- Put retries, timeouts, and traffic splitting at the layer with the required context, then test the combined deadline and replay behavior.

## Separate the Responsibility Planes

| Decision                                                     | Typical owner                     | Boundary to preserve                                              |
| ------------------------------------------------------------ | --------------------------------- | ----------------------------------------------------------------- |
| Public hostname, API product, consumer credential, and quota | API gateway                       | A route-level identity is not an application object permission    |
| Internet exposure and first trusted proxy hop                | Edge load balancer or API gateway | Forwarded headers are trusted only from configured peers          |
| Workload identity and service-to-service encryption          | Istio                             | A valid workload certificate is authentication, not authorization |
| East-west service authorization                              | Istio plus service owner          | Mesh policy cannot infer every domain-state rule                  |
| Object and workflow authorization                            | Application                       | Keep checks next to the data and business state they protect      |
| Canary routing and retries                                   | One selected traffic layer        | Duplicate retries and splits create multiplicative behavior       |

This allocation is deliberately conditional. If Istio ingress owns the public API policy, it is serving the gateway role for that boundary. If a separate API gateway owns that role, Istio should not silently recreate a conflicting public contract.

## Choose One of Three Topologies

### 1. API gateway before Istio ingress

```
flowchart LR
    C[External client] --> G[API gateway]
    G -->|Authenticated origin connection| I[Istio ingress gateway]
    I --> M[Mesh workload]
    M --> S[Downstream mesh service]
```

Use this topology when the edge needs API consumer management, complex transformations, developer-facing credentials, or governance that is intentionally outside the mesh. Restrict the Istio ingress endpoint so traffic can arrive only from the API gateway path. The gateway-to-ingress connection needs its own server authentication and, when required, client authentication; a forwarded identity header alone does not prove which proxy sent it.

The extra hop has a cost. Measure connection reuse, TLS handshakes, body buffering, streaming, and failure behavior. Do not keep both layers merely because both products are installed.

### 2. Istio ingress as the only public gateway

Istio supports exposing services through an [ingress gateway](https://github.com/istio/istio.io/blob/f4852bb34b4d4e8d7761554743a75a250fbd002d/content/en/docs/tasks/traffic-management/ingress/ingress-control/index.md) and can use its own networking API or the [Kubernetes Gateway API](https://github.com/istio/istio.io/blob/f4852bb34b4d4e8d7761554743a75a250fbd002d/content/en/docs/tasks/traffic-management/ingress/gateway-api/index.md). This can be the smallest design when the required public routing and security policies fit the selected Istio version and operating model.

Before removing a separate API gateway, inventory hard requirements: consumer lifecycle, key issuance, shared quotas, request or response transformation, schema governance, analytics, monetization, and non-Kubernetes backends. Do not assume an ingress listener supplies a complete API-management lifecycle.

### 3. Public gateway plus dedicated multicluster east-west gateways

An east-west gateway has a different job from a public API gateway. Istio's documented multi-network pattern uses dedicated gateways when workloads in separate cluster networks cannot connect directly. Those gateways transport authenticated mesh traffic between networks and rely on trusted mTLS workload identities; they are not automatically public API entry points.

The Istio 1.31 [multi-primary, multi-network guide](https://github.com/istio/istio.io/blob/f4852bb34b4d4e8d7761554743a75a250fbd002d/content/en/docs/setup/install/multicluster/multi-primary_multi-network/index.md) also warns that its east-west gateway may be publicly reachable by default and needs production access restrictions. Keep public DNS, firewall policy, listener ports, and certificate trust separate for north-south and east-west gateways.

## Define the Identity Handoff

Draw each identity as a different value:

1. the network peer that connected to the public edge;
2. the client address resolved through trusted proxy rules;
3. the API consumer or end-user identity validated from a credential;
4. the gateway workload identity used on the mesh connection; and
5. the application principal used for object authorization.

Do not collapse them into one `X-User` or `X-Forwarded-For` header. At the first trusted boundary, remove caller-supplied copies of security-sensitive identity headers. The owning gateway can then create a bounded context for the next hop. The receiver must accept that context only on an authenticated connection from an authorized gateway workload.

If the application needs the original bearer token, decide whether to forward it, exchange it, or forward selected verified claims. Forwarding every claim increases coupling and disclosure. A gateway-generated request ID is useful for correlation, but it is not a user identity.

## Pair Authentication with Authorization

The Istio 1.31 [`RequestAuthentication` API](https://github.com/istio/api/blob/d60a532be69a851dc74e86f42e15890cc9cb3825/security/v1beta1/request_authentication.proto) makes an important distinction: invalid credentials covered by the rule are rejected, but a request with no credential is accepted without an authenticated identity. To require a valid principal, pair authentication with authorization.

This Istio 1.31.1 excerpt illustrates the relationship; replace the selector, issuer, audience, and JWKS URI with values from the deployment's identity contract:

```
apiVersion: security.istio.io/v1
kind: RequestAuthentication
metadata:
  name: public-api-jwt
  namespace: istio-system
spec:
  selector:
    matchLabels:
      istio: ingressgateway
  jwtRules:
    - issuer: "https://identity.example.com/"
      audiences: ["api://orders"]
      jwksUri: "https://identity.example.com/.well-known/jwks.json"
---
apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
  name: require-public-api-principal
  namespace: istio-system
spec:
  selector:
    matchLabels:
      istio: ingressgateway
  rules:
    - from:
        - source:
            requestPrincipals: ["*"]
```

This is a configuration excerpt, not a complete deployment. Confirm the ingress workload labels, policy attachment model, issuer behavior, JWKS availability, exempt health or token-issuance paths, and the exact Istio version. Match `audiences` to the IdP and API contract; when the list is empty, Istio's documented fallback is to accept an audience matching the service name. A separate edge gateway may already validate the token; if Istio validates again, document why, how key rotation is synchronized, and which result the application trusts.

## Treat Mesh mTLS as Workload Authentication

Istio 1.31 [security best practices](https://github.com/istio/istio.io/blob/f4852bb34b4d4e8d7761554743a75a250fbd002d/content/en/docs/ops/best-practices/security/index.md) state that proxies use permissive mutual TLS during incremental adoption by default, accepting both mutual TLS and plaintext when possible. Moving to strict mode rejects plaintext mesh connections. These two paths have different trust properties and must be tested before a migration is called complete.

Even strict mutual TLS proves a workload identity, not that the end user may read a particular invoice or modify a particular account. Apply mesh authorization policy for workload-level access and keep object-level checks in the application. Use Kubernetes `NetworkPolicy` and cloud firewall controls as defense in depth because traffic capture and gateway exposure are separate boundaries.

## Assign Traffic Policy Once

Retries are the clearest source of accidental multiplication. If the API gateway attempts a request twice and Istio attempts each upstream call twice, one client operation can create four application attempts. Writes may be replayed after partial completion.

For every route, record:

- the end-to-end client deadline;
- connection, request, and per-try timeouts at each hop;
- which methods or operations are retryable;
- the maximum total attempts across the path;
- the idempotency key and deduplication owner for replayable writes;
- which layer performs canary weighting, fault injection, or outlier handling.

Keep public API version routing at the layer that owns the external contract. Keep service-instance selection and workload-local resilience in the mesh unless a deliberate exception has stronger context. Then inject a slow upstream, a reset after headers, and a control-plane outage to observe actual behavior.

## Coordinate Kubernetes Configuration Ownership

Kubernetes Gateway API improves role separation through resources such as `GatewayClass`, `Gateway`, and `HTTPRoute`, but it does not prevent two teams from expressing conflicting intent. Assign each `GatewayClass` to one controller, restrict who may create public listeners, and use namespace attachment rules deliberately.

Choose a source of truth for hostnames, certificates, routes, and policy attachments. A GitOps repository should show whether a public route is reconciled by the API gateway controller or Istio. Status conditions must be part of promotion: an accepted manifest that no controller programs is not a successful deployment.

## Observe and Verify the Complete Path

Use one correlation value across layers, but retain each layer's own authoritative fields. Logs should distinguish edge rejection, Istio authentication failure, mesh authorization denial, upstream reset, application denial, and client cancellation.

Before cutover, verify:

- direct traffic cannot reach Istio ingress or a service around the public gateway;
- forged forwarding and identity headers are replaced at the trust boundary;
- missing, invalid, expired, and valid credentials follow the intended paths;
- permissive and strict mesh mTLS behavior is understood during migration;
- timeout and retry totals remain within the client deadline;
- streaming, WebSocket, gRPC, and large-body routes work without unintended buffering;
- route deletion, certificate rotation, and policy rollback are observable;
- north-south and east-west gateways expose only their intended listeners.

## Migration Sequence

1. Inventory current hostnames, routes, identities, retries, timeouts, and observability fields.
2. Assign one owner to every policy and remove duplicate defaults from the target design.
3. Deploy the new path without public traffic and test origin authentication and bypass resistance.
4. Mirror or replay sanitized traffic to verify routing and telemetry without creating writes.
5. Shift a small cohort with an immediate DNS or load-balancer rollback.
6. Compare denial reasons, latency, errors, and upstream attempt counts.
7. Remove the old public path only after rollback and emergency access are documented.

## Summary

Combining an API gateway with Istio is an ownership exercise, not a requirement to stack two proxies. Use the API gateway for the public API contract when its capabilities are needed, use Istio for mesh identity and service traffic, and leave domain authorization with the application. Authenticate every handoff, prevent alternate paths, and test the combined retries, deadlines, identities, and failures as one system.

## FAQ

### Does every Istio deployment need a separate API gateway?

No. Istio ingress may be sufficient for a deployment whose public requirements fit its supported routing and security model. Add a separate API gateway only for explicit capabilities and operating ownership.

### Is an Istio east-west gateway an API gateway?

It is a gateway for mesh traffic between networks. It does not automatically own public API products, consumer credentials, quotas, or lifecycle governance.

### Does Istio mTLS authenticate the end user?

No. It authenticates participating workloads. End-user authentication and application authorization remain separate decisions.

## Next Steps

Compare the broader [API gateway and service mesh roles](https://api7.ai/learning-center/api-gateway-guide/api-gateway-vs-service-mesh), design [gateway mTLS identity and rotation](https://api7.ai/learning-center/api-gateway-guide/api-gateway-mtls), and define [fine-grained authorization ownership](https://api7.ai/learning-center/api-gateway-guide/fine-grained-api-gateway-authorization).

[Previous article**Amazon API Gateway Explained: Deployment Models, Trade-offs, and Use Cases**](https://api7.ai/learning-center/api-gateway-guide/amazon-api-gateway-explained)[Next article**API Gateway with NGINX: Layering, Ownership, and Migration Patterns**](https://api7.ai/learning-center/api-gateway-guide/api-gateway-nginx)

On this page

- [Key Takeaways](#key-takeaways)

- [Separate the Responsibility Planes](#separate-the-responsibility-planes)

- [Choose One of Three Topologies](#choose-one-of-three-topologies)

  - [1. API gateway before Istio ingress](#1-api-gateway-before-istio-ingress)
  - [2. Istio ingress as the only public gateway](#2-istio-ingress-as-the-only-public-gateway)
  - [3. Public gateway plus dedicated multicluster east-west gateways](#3-public-gateway-plus-dedicated-multicluster-east-west-gateways)

- [Define the Identity Handoff](#define-the-identity-handoff)

- [Pair Authentication with Authorization](#pair-authentication-with-authorization)

- [Treat Mesh mTLS as Workload Authentication](#treat-mesh-mtls-as-workload-authentication)

- [Assign Traffic Policy Once](#assign-traffic-policy-once)

- [Coordinate Kubernetes Configuration Ownership](#coordinate-kubernetes-configuration-ownership)

- [Observe and Verify the Complete Path](#observe-and-verify-the-complete-path)

- [Migration Sequence](#migration-sequence)

- [Summary](#summary)

- [FAQ](#faq)

  - [Does every Istio deployment need a separate API gateway?](#does-every-istio-deployment-need-a-separate-api-gateway)
  - [Is an Istio east-west gateway an API gateway?](#is-an-istio-east-west-gateway-an-api-gateway)
  - [Does Istio mTLS authenticate the end user?](#does-istio-mtls-authenticate-the-end-user)

- [Next Steps](#next-steps)
