REGISTER NOW FOR THE KONG AGENTIC ERA WORLD TOUR GOVERN A2A TRAFFIC WITH KONG'S NEW AGENT GATEWAY WHY GARTNER’S “CONTEXT MESH” CHANGES EVERYTHING DON’T MISS API + AI SUMMIT 2026 SEPT 30 – OCT 1
  • [Why Kong](/company/why-kong)Why Kong
    • Explore the unified API Platform
        • BUILD APIs
        • [
          Kong Insomnia](/products/kong-insomnia)
          Kong Insomnia
        • [
          API Design](/products/kong-insomnia/api-design)
          API Design
        • [
          API Mocking](/products/kong-insomnia/api-mocking)
          API Mocking
        • [
          API Testing and Debugging](/products/kong-insomnia/api-testing-and-debugging)
          API Testing and Debugging
        • [
          MCP Client](/products/kong-insomnia/mcp-client)
          MCP Client
        • RUN APIs
        • [
          API Gateway](/products/kong-gateway)
          API Gateway
        • [
          Context Mesh](/products/kong-konnect/features/context-mesh)
          Context Mesh
        • [
          AI Gateway](/products/kong-ai-gateway)
          AI Gateway
        • [
          Event Gateway](/products/event-gateway)
          Event Gateway
        • [
          Kubernetes Operator](/products/kong-gateway-operator)
          Kubernetes Operator
        • [
          Service Mesh](/products/kong-mesh)
          Service Mesh
        • [
          Ingress Controller](/products/kong-ingress-controller)
          Ingress Controller
        • [
          Runtime Management](/products/kong-konnect/features/runtime-management)
          Runtime Management
        • DISCOVER APIs
        • [
          Developer Portal](/products/kong-konnect/features/developer-portal)
          Developer Portal
        • [
          Service Catalog](/products/kong-konnect/features/api-service-catalog)
          Service Catalog
        • [
          MCP Registry](/products/mcp-registry)
          MCP Registry
        • GOVERN APIs
        • [
          Metering and Billing](/products/kong-konnect/features/usage-based-metering-and-billing)
          Metering and Billing
        • [
          APIOps and Automation](/products/apiops-automation)
          APIOps and Automation
        • [
          API Observability](/products/kong-konnect/features/api-observability)
          API Observability
        • [Why Kong?](/company/why-kong)Why Kong?
      • CLOUD
      • [Cloud API Gateways](/products/kong-konnect/features/dedicated-cloud-gateways)Cloud API Gateways
      • [Need a self-hosted or hybrid option?](/products/kong-enterprise)Need a self-hosted or hybrid option?
      • COMPARE
      • [Considering AI Gateway alternatives? ](/performance-comparison/ai-gateway-alternatives)Considering AI Gateway alternatives?
      • [Kong vs. Postman](/performance-comparison/kong-vs-postman)Kong vs. Postman
      • [Kong vs. MuleSoft](/performance-comparison/kong-vs-mulesoft)Kong vs. MuleSoft
      • [Kong vs. Apigee](/performance-comparison/kong-vs-apigee)Kong vs. Apigee
      • [Kong vs. IBM](/performance-comparison/ibm-api-connect-vs-kong)Kong vs. IBM
      • GET STARTED
      • [Sign Up for Kong Konnect](/products/kong-konnect/register)Sign Up for Kong Konnect
      • [Documentation](https://developer.konghq.com/)Documentation
      • FOR PLATFORM TEAMS
      • [Developer Platform](/solutions/building-developer-platform)Developer Platform
      • [Kubernetes and Microservices](/solutions/build-on-kubernetes)Kubernetes and Microservices
      • [Observability](/solutions/observability)Observability
      • [Service Mesh Connectivity ](/solutions/service-mesh-connectivity)Service Mesh Connectivity
      • [Kafka Event Streaming](/solutions/kafka-stream-api-management)Kafka Event Streaming
      • FOR EXECUTIVES
      • [AI Connectivity](/ai-connectivity)AI Connectivity
      • [Open Banking](/solutions/open-banking)Open Banking
      • [Legacy Migration](/solutions/legacy-api-management-migration)Legacy Migration
      • [Platform Cost Reduction](/solutions/api-platform-consolidation)Platform Cost Reduction
      • [Kafka Cost Optimization](/solutions/reduce-kafka-cost)Kafka Cost Optimization
      • [API Monetization](/solutions/api-monetization)API Monetization
      • [AI Monetization](/solutions/ai-monetization)AI Monetization
      • [AI FinOps](/solutions/ai-cost-governance-finops)AI FinOps
      • FOR AI TEAMS
      • [Agent Gateway](/agent-gateway)Agent Gateway
      • [AI Governance](/solutions/ai-governance)AI Governance
      • [AI Security](/solutions/ai-security)AI Security
      • [AI Cost Control](/solutions/ai-cost-optimization-management)AI Cost Control
      • [Agentic Infrastructure](/solutions/agentic-ai-workflows)Agentic Infrastructure
      • [MCP Production](/solutions/mcp-production-and-consumption)MCP Production
      • [MCP Traffic Gateway](/solutions/mcp-governance)MCP Traffic Gateway
      • FOR DEVELOPERS
      • [Mobile App API Development](/solutions/mobile-application-api-development)Mobile App API Development
      • [GenAI App Development](/solutions/power-openai-applications)GenAI App Development
      • [API Gateway for Istio](/solutions/istio-gateway)API Gateway for Istio
      • [Decentralized Load Balancing](/solutions/decentralized-load-balancing)Decentralized Load Balancing
      • BY INDUSTRY
      • [Financial Services](/solutions/financial-services-industry)Financial Services
      • [Healthcare](/solutions/healthcare)Healthcare
      • [Higher Education](/solutions/api-platform-for-education-services)Higher Education
      • [Insurance](/solutions/insurance)Insurance
      • [Manufacturing](/solutions/manufacturing)Manufacturing
      • [Retail](/solutions/retail)Retail
      • [Software & Technology](/solutions/software-and-technology)Software & Technology
      • [Transportation](/solutions/transportation-and-logistics)Transportation
      • [See all Solutions](/solutions)See all Solutions
  • [Pricing](/pricing)Pricing
      • DOCUMENTATION
      • [Kong Konnect](https://developer.konghq.com/konnect/)Kong Konnect
      • [Kong Gateway](https://developer.konghq.com/gateway/)Kong Gateway
      • [Kong Mesh](https://developer.konghq.com/mesh/)Kong Mesh
      • [Kong AI Gateway](https://developer.konghq.com/ai-gateway/)Kong AI Gateway
      • [Kong Event Gateway](https://developer.konghq.com/event-gateway/)Kong Event Gateway
      • [Kong Insomnia](https://developer.konghq.com/insomnia/)Kong Insomnia
      • [Plugin Hub](https://developer.konghq.com/plugins/)Plugin Hub
      • EXPLORE
      • [Blog](/blog)Blog
      • [Learning Center](/blog/learning-center)Learning Center
      • [eBooks](/resources/e-book)eBooks
      • [Reports](/resources/reports)Reports
      • [Demos](/resources/demos)Demos
      • [Customer Stories](/customer-stories)Customer Stories
      • [Videos](/resources/videos)Videos
      • EVENTS
      • [API + AI Summit](/events/conferences/api-ai-summit)API + AI Summit
      • [Agentic Era World Tour](/agentic-era-world-tour)Agentic Era World Tour
      • [Webinars](/events/webinars)Webinars
      • [User Calls](/events/user-calls)User Calls
      • [Workshops](/events/workshops)Workshops
      • [Meetups](/events/meetups)Meetups
      • [See All Events](/events)See All Events
      • FOR DEVELOPERS
      • [Get Started](https://developer.konghq.com/)Get Started
      • [Community](/community)Community
      • [Certification](/academy/certification)Certification
      • [Training](https://education.konghq.com)Training
      • COMPANY
      • [About Us](/company/about-us)About Us
      • [We're Hiring!](/company/careers)We're Hiring!
      • [Press Room](/company/press-room)Press Room
      • [Contact Us](/company/contact-us)Contact Us
      • [Kong Partner Program](/partners)Kong Partner Program
      • [Enterprise Support Portal](https://support.konghq.com/s/)Enterprise Support Portal
      • [Documentation](https://developer.konghq.com/?_gl=1*tphanb*_gcl_au*MTcxNTQ5NjQ0MC4xNzY5Nzg4MDY0LjIwMTI3NzEwOTEuMTc3MzMxODI2MS4xNzczMzE4MjYw*_ga*NDIwMDU4MTU3LjE3Njk3ODgwNjQ.*_ga_4JK9146J1H*czE3NzQwMjg1MjkkbzE4OSRnMCR0MTc3NDAyODUyOSRqNjAkbDAkaDA)Documentation
  • [](/search)
  • [Login](https://cloud.konghq.com/login)Login
  • [Book Demo](/contact-sales)Book Demo
  • [Get Started](/products/kong-konnect/register)Get Started
[Blog](/blog)Blog
  • [AI Gateway](/blog/tag/ai-gateway)AI Gateway
  • [AI Security](/blog/tag/ai-security)AI Security
  • [AIOps](/blog/tag/aiops)AIOps
  • [API Security](/blog/tag/api-security)API Security
  • [API Gateway](/blog/tag/api-gateway)API Gateway
|
    • [API Management](/blog/tag/api-management)API Management
    • [API Development](/blog/tag/api-development)API Development
    • [API Design](/blog/tag/api-design)API Design
    • [Automation](/blog/tag/automation)Automation
    • [Service Mesh](/blog/tag/service-mesh)Service Mesh
    • [Insomnia](/blog/tag/insomnia)Insomnia
    • [Event Gateway](/blog/tag/event-gateway)Event Gateway
    • [View All Blogs](/blog/page/1)View All Blogs
We're Entering the Age of AI Connectivity [Read more](/blog/news/the-age-of-ai-connectivity)Read moreProducts & Agents:
    • [Kong AI Gateway](/products/kong-ai-gateway)Kong AI Gateway
    • [Kong API Gateway](/products/kong-gateway)Kong API Gateway
    • [Kong Event Gateway](/products/event-gateway)Kong Event Gateway
    • [Kong Metering & Billing](/products/usage-based-metering-and-billing)Kong Metering & Billing
    • [Kong Insomnia](/products/kong-insomnia)Kong Insomnia
    • [Kong Konnect](/products/kong-konnect)Kong Konnect
  • [Documentation](https://developer.konghq.com)Documentation
  • [Book Demo](/contact-sales)Book Demo
  1. Home
  2. Blog
  3. Engineering
  4. Token Exchange at the Gateway
[Engineering](/blog/engineering)Engineering
April 15, 2026
6 min read

# Token Exchange at the Gateway

How OAuth 2.0 Token Exchange Reshapes Trust Between Services — and Why the API Gateway Is Exactly the Right Place to Enforce It

Veena Rajarathna
Staff Product Manager, Kong

OAuth 2.0 Token Exchange fundamentally alters how services establish trust. And the API gateway is the ideal location to enforce this new model.

## What is token exchange?

Modern applications don’t run as a single monolithic. They are composed of services — frontend APIs, backend microservices, third-party integrations — each in its own security perimeter, potentially across different identity domains. The credentials that open one door don’t necessarily open another. 

OAuth 2.0 Token Exchange, defined in RFC 8693, is the standard that fills this gap. It gives a client a way to present an existing, valid security token to an authorization server and receive a different token in return, one that is scoped, shaped, and trusted for the next leg of the journey.

***RFC 8693 - CORE IDEA ****A client already holds a token. Rather than re-authenticating from scratch, it exchanges that token for a new one — potentially from a different issuer, with different scopes, representing a different identity relationship — all without exposing user credentials again.*

Think of it as a border crossing for tokens. Your passport gets you to the checkpoint. The checkpoint issues a temporary visitor's permit valid only for the area you're entering — not the whole country. Token exchange is that checkpoint, made programmable.

## Why API gateways are the right place for this

An API gateway sits at the intersection of every inbound request and every upstream service. It is, by design, the one entity in your architecture that sees all tokens, speaks to all services, and can be trusted to enforce cross-cutting policy.

Without token exchange at the gateway, each microservice has to solve the identity translation problem independently or worse, services get handed tokens that carry far more authority than they need. That's how privilege creep happens silently.

When token exchange lives in the gateway, three things become possible that were previously fragile or impossible:

✅ **Services stay dumb about identity complexity**: The gateway handles all token negotiation. A backend microservice receives exactly the token it expects with right scopes, right issuer and never needs to know what the original caller presented.

✅ **Trust boundaries are enforced in one place:** Policy about which tokens can be exchanged, under what conditions, for what scopes all live in gateway configuration, not scattered across ten services.

✅ **Cross-domain federation becomes tractable:** External tokens from a partner IdP, a third-party SAML provider, or a different internal domain can be translated into tokens the backend services actually understand at the edge, before any upstream service sees them.

## Use cases that matter in production

**🔽 Downscoping**: A client or a service receives a broad, powerful token. Before calling an API or another service, exchange it for one scoped only to the permissions that operation requires. Least privilege, enforced automatically.

**🔄 Federation or Token Translation: **Client presents a token that is either opaque, SAML-based or from third-party IDP to the gateway. Exchange it for an internal JWT that the microservice actually understands. Translation happens once, at the edge.

**🔗 Delegation & Impersonation: **A front-end service needs to act on a user’s behalf when calling a back-end API. Exchange the front-end’s token for one that carries the user’s identity and only the scopes required from that specific back-end call.
**🔐 Privacy: **Strip the sensitive user claims from a token before forwarding it to a service that doesn’t need and shouldn’t see. PII stays where its needed and nowhere else.

## How Kong implements token exchange In 3.14

Kong's implementation lives in the [**OpenID Connect plugin**](https://developer.konghq.com/plugins/openid-connect/)**OpenID Connect plugin**, which now supports token exchange for access tokens as of version 3.14. The plugin performs a strict sequence of checks before initiating any exchange, ensuring the token to be exchanged is valid and trusted before a new one is ever requested.

Validation checks before exchange triggers:

  • - Issuer (iss claim) matches a configured allow list of token issuers
  • - Token is not expired — exp claim verified
  • - Token is not used before its valid time — nbf claim verified
  • - Configured conditions (audience, scopes) are evaluated

Once those pass, Kong decides *whether* to exchange based on a simple but powerful rule: if the *original token issuer* and *target issuer* differ, exchange is always triggered. If they are the same IdP, the configured conditions determine whether exchange is warranted. Then Kong uses its own registered client credentials to execute the exchange with the authorization server.

### Token exchange configuration concepts defined

  • - **Subject Token**: The incoming token being exchanged. The "input" credential
  • - **Subject Token Issuer**: The authorization server that originally issued the subject token
  • - **Target Issuer**: The authorization server that should issue the new token for the upstream resource (original top-level issuer in the plugin)
  • - **Conditions**: Rules (audience, scopes) that must be met to trigger an exchange
  • - **Requested Token**: The output (or the new token issued after a successful exchange)

**How the flow moves**

Kong receives the subject token, validates it, applies configured conditions to decide whether exchange is warranted, and then uses its own client credentials to request a new token from the authorization server. The upstream service sees the exchanged one.

### Same issuer vs. cross-issuer exchange

**Sam Issuer **| Conditions decide

The subject token and the target service both live under the same IdP (e.g., the same Keycloak realm). Exchange is not automatic. Kong evaluates the configured conditions. If the incoming token has a wide scope as matched against has_scope, exchange fires and token is exchanged for a narrower-scoped token.

*This is the pattern for downscoping within a single identity domain: the same issuer, but you want a tighter token for the next hop.*

**Different Issuers** | Exchange always triggers

The token came from an external partner IdP, a legacy SAML provider, or a different internal realm. The target service expects tokens from your own authorization server. Because the issuers differ, Kong automatically initiates the exchange. No additional conditions needed.

*This is the pattern for federation and external token translation: convert a foreign credential into a domestic one at the gateway boundary.*

## Trust models and security boundaries

Token exchange introduces a new attack surface: an actor that can trigger exchanges can potentially obtain tokens with different (even broader) authority than they started with. RFC 8693 is explicit about this: **trust models are not optional.**

*⚠️ ****The trust model must strictly define**** which clients are allowed to trigger exchanges, which subject token issuers are trusted, and what scopes or audiences can appear on an exchanged token. Misconfiguration here particularly overly permissive **subject_token_issuers **can open privilege escalation paths. Configure conditions narrowly.*

Kong's implementation guards against this by requiring an explicit list of subject_token_issuers (trusted issuers are eligible for exchange). The conditions layer (audience presence, scope presence) adds a second gate. And the exchanged token's scopes are determined by the request configuration, not by what the subject token claimed. The authorization server makes the final call if it will issue and on what it will actually issue.

Token exchange isn't a niche feature for complex enterprises. It's the logical conclusion of treating your API gateway as a ***security control plane***, not just a routing layer. As service meshes deepen, as partner integrations multiply, and as internal identity domains proliferate, the question of "whose token does this service trust, and what can it do?" becomes impossible to answer service-by-service.

Centralizing the answer in Kong (with RFC 8693 as the standard) and the OpenID Connect plugin as the mechanism means every upstream service can operate with a cleanly-scoped, correctly-issued token, regardless of how the original caller authenticated. The token it receives is the token it was designed to trust.

That's not a convenience. That's a security posture. 

Enhance your security posture with Kong. Start with Kong Gateway 3.14 by [signing up](https://konghq.com/products/kong-konnect/register)signing up for Kong Konnect for free. Or, if you want to try Kong Gateway Enterprise 3.14, you can explore the options for getting started [here](https://konghq.com/install)here.

To explore the comprehensive list of features, fixes, and updates, please see the available CHANGELOG for Kong Gateway Enterprise [here](https://docs.konghq.com/gateway/changelog/)here.

- [OAuth](/blog/tag/oauth)OAuth- [API Gateway](/blog/tag/api-gateway)API Gateway- [Kong Gateway Enterprise](/blog/tag/kong-enterprise)Kong Gateway Enterprise- [Kong Gateway](/blog/tag/kong-gateway)Kong Gateway

Table of Contents

  • What is token exchange?
  • Why API gateways are the right place for this
  • Use cases that matter in production
  • How Kong implements token exchange In 3.14

## More on this topic

_Videos_

## How to Use Kong Gateway OAuth2 Plugin

_Videos_

## Kong Builders Nov 16- Introducing Kong Gateway Operator

## See Kong in action

Accelerate deployments, reduce vulnerabilities, and gain real-time visibility. 

[Get a Demo](/contact-sales)Get a Demo
**Topics**
- [OAuth](/blog/tag/oauth)OAuth- [API Gateway](/blog/tag/api-gateway)API Gateway- [Kong Gateway Enterprise](/blog/tag/kong-enterprise)Kong Gateway Enterprise- [Kong Gateway](/blog/tag/kong-gateway)Kong Gateway
Veena Rajarathna
Staff Product Manager, Kong

Recommended posts

# Beyond Static Routing: Modernizing API Logic with Conditional Policy Execution

[Engineering](/blog)EngineeringApril 15, 2026

Imagine you have a single Service, order-api . You want to apply a strict rate limit to most traffic, but you want to bypass that limit—or apply a different one—if the request contains a specific X-App-Priority: High header. Previously, you had t

Hugo Guerrero
[](https://konghq.com/blog/engineering/conditional-policy-execution)

# How to Dynamically Route Requests With Kong Enterprise

[Engineering](/blog)EngineeringJuly 31, 2020

Having worked with many customers and prospects at Kong, one of the main requirements we often hear is how to handle dynamic routing based on the URL and headers. In this blog post, I will cover different use cases we come across for dynamic routing

Mos Amokhtari
[](https://konghq.com/blog/engineering/how-to-dynamically-route-requests-with-kong-enterprise)

# No More Static Secrets: Kong Expands Cloud-Native Authentication Support

[Engineering](/blog)EngineeringApril 15, 2026

How Kong Gateway 3.14 closes the consistency gap in IAM-based authentication across AWS, Azure and GCP — and what it means for your production deployments Starting with 3.13 (which addressed Redis support) and completed in 3.14, Kong now presents

Walker Zhao
[](https://konghq.com/blog/engineering/cloud-native-authentication)

# Practical Strategies to Monetize AI APIs in Production

[Engineering](/blog)EngineeringMarch 27, 2026

Traditional APIs are, in a word, predictable. You know what you're getting: Compute costs that don't surprise you Traffic patterns that behave themselves Clean, well-defined request and response cycles AI APIs, especially anything that runs on LLMs

Deepanshu Pandey
[](https://konghq.com/blog/engineering/monetize-ai-apis)

# Kong AI/MCP Gateway and Kong MCP Server Technical Breakdown

[Engineering](/blog)EngineeringDecember 11, 2025

In the latest Kong Gateway 3.12 release , announced October 2025, specific MCP capabilities have been released: AI MCP Proxy plugin: it works as a protocol bridge, translating between MCP and HTTP so that MCP-compatible clients can either call exi

Jason Matis
[](https://konghq.com/blog/engineering/ai-gateway-mcp-gateway-mcp-server-breakdown)

# Kong Gateway 3.9: Extended AI Support and Enhanced Security

[Product Releases](/blog)Product ReleasesDecember 20, 2024

Today we're excited to announce Kong Gateway 3.9!  Since unveiling Kong Gateway 3.8 at API Summit 2024 just a few months ago, we’ve been busy making important updates and improvements to Kong Gateway. This release introduces new functionality arou

Alex Drag
[](https://konghq.com/blog/product-releases/kong-gateway-3-9)

# What's New in Kong Gateway 3.7?

[Product Releases](/blog)Product ReleasesMay 29, 2024

We're thrilled to announce the general availability of Kong Gateway 3.7 and Kong Gateway Enterprise 3.7. Along with enhancements and new features for both OSS and enterprise users, this version comes with the general availability of our edge AI Gate

Veena Rajarathna
[](https://konghq.com/blog/product-releases/kong-gateway-3-7)

## Ready to see Kong in action?

Get a personalized walkthrough of Kong's platform tailored to your architecture, use cases, and scale requirements.

[Get a Demo](/contact-sales)Get a Demo

## step-0

  • ## Company

    • [About Kong](/company/about-us)About Kong
    • [Customers](/customer-stories)Customers
    • [Careers](/company/careers)Careers
    • [Press](/company/press-room)Press
    • [Events](/events)Events
    • [Contact](/company/contact-us)Contact
    • [Pricing](/pricing)Pricing
      • Terms
      • Privacy
      • Trust and Compliance
  • ## Platform

    • [Kong AI Gateway](/products/kong-ai-gateway)Kong AI Gateway
    • [Kong Konnect](/products/kong-konnect)Kong Konnect
    • [Kong Gateway](/products/kong-gateway)Kong Gateway
    • [Kong Event Gateway](/products/event-gateway)Kong Event Gateway
    • [Kong Insomnia](/products/kong-insomnia)Kong Insomnia
    • [Documentation](https://developer.konghq.com)Documentation
    • [Book Demo](/contact-sales)Book Demo
  • ## Compare

    • [AI Gateway Alternatives](/performance-comparison/ai-gateway-alternatives)AI Gateway Alternatives
    • [Kong vs Apigee](/performance-comparison/kong-vs-apigee)Kong vs Apigee
    • [Kong vs IBM](/performance-comparison/ibm-api-connect-vs-kong)Kong vs IBM
    • [Kong vs Postman](/performance-comparison/kong-vs-postman)Kong vs Postman
    • [Kong vs Mulesoft](/performance-comparison/kong-vs-mulesoft)Kong vs Mulesoft
  • ## Explore More

    • [Open Banking API Solutions](/solutions/open-banking)Open Banking API Solutions
    • [API Governance Solutions](/solutions/api-governance)API Governance Solutions
    • [Istio API Gateway Integration](/solutions/istio-gateway)Istio API Gateway Integration
    • [Kubernetes API Management](/solutions/build-on-kubernetes)Kubernetes API Management
    • [API Gateway: Build vs Buy](/campaign/secure-api-scalability)API Gateway: Build vs Buy
    • [Kong vs Apigee](/performance-comparison/kong-vs-apigee)Kong vs Apigee
  • ## Open Source

    • [Kong Gateway](https://developer.konghq.com/gateway/install/)Kong Gateway
    • [Kuma](https://kuma.io/)Kuma
    • [Insomnia](https://insomnia.rest/)Insomnia
    • [Kong Community](/community)Kong Community

Increase developer productivity, security, and performance at scale with the unified platform for API management and AI.

  • English
  • Japanese
  • Frenchcoming soon
  • Spanishcoming soon
  • Germancoming soon
© Kong Inc. 2026
Interaction mode