Skip to content

feat(ai-gateway): How-to for validating MCP tokens locally with JWK verification#4839

Open
tomek-labuk wants to merge 8 commits intomainfrom
jwk-mcp
Open

feat(ai-gateway): How-to for validating MCP tokens locally with JWK verification#4839
tomek-labuk wants to merge 8 commits intomainfrom
jwk-mcp

Conversation

@tomek-labuk
Copy link
Copy Markdown
Contributor

Description

Fixes #4820

Preview Links

Checklist

  • Tested how-to docs. If not, note why here.
  • All pages contain metadata.
  • Any new docs link to existing docs.
  • All autogenerated instructions render correctly (API, decK, Konnect, Kong Manager).
  • Style guide (capitalized gateway entities, placeholder URLs) implemented correctly.
  • Every page has a description entry in frontmatter.
  • Add new pages to the product documentation index (if applicable).

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 13, 2026

Deploy Preview for kongdeveloper ready!

Name Link
🔨 Latest commit 0b4e258
🔍 Latest deploy log https://app.netlify.com/projects/kongdeveloper/deploys/69df4925fe841900089c2ff6
😎 Deploy Preview https://deploy-preview-4839--kongdeveloper.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@tomek-labuk tomek-labuk marked this pull request as ready for review April 15, 2026 07:28
@tomek-labuk tomek-labuk requested a review from a team as a code owner April 15, 2026 07:28
Copilot AI review requested due to automatic review settings April 15, 2026 07:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new MCP how-to guide for validating MCP access tokens locally via JWKS (JWK Set) verification with the AI MCP OAuth2 plugin, using Keycloak as the example authorization server.

Changes:

  • Introduces a new how-to page detailing JWKS-based token validation and a local Keycloak setup workflow.
  • Adds new Gateway service and route entity example YAMLs used by the how-to’s {% entity_examples %} blocks.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
app/_how-tos/mcp/validate-mcp-tokens-with-jwk.md New how-to describing JWKS-based local JWT validation for MCP using AI MCP OAuth2 + AI MCP Proxy, including validation steps.
app/_data/entity_examples/gateway/services/weather-jwk-service.yaml Adds the upstream WeatherAPI service used by the new how-to.
app/_data/entity_examples/gateway/routes/weather-jwk.yaml Adds the MCP listener route (including the protected-resource metadata path) used by the new how-to.
app/_data/entity_examples/gateway/routes/weather-jwk-route.yaml Adds the conversion-only tools route used by the new how-to.

Comment thread app/_how-tos/mcp/validate-mcp-tokens-with-jwk.md Outdated
Comment on lines +1 to +4
---
title: Validate MCP tokens locally with JWK verification
content_type: how_to
description: "Configure the AI MCP OAuth2 plugin to validate MCP access tokens locally using the authorization server's published JWK Set instead of token introspection"
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The linked issue’s DoD calls out adding a reference to this new JWK-validation guide on the MCP landing page, but this PR only adds the how-to and entity examples; please add/update the MCP landing page entry so the new guide is discoverable.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's okay for now.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread app/_how-tos/mcp/validate-mcp-tokens-with-jwk.md
Comment thread app/_how-tos/mcp/validate-mcp-tokens-with-jwk.md
Comment on lines +8 to +16
works_on:
- on-prem
- konnect
min_version:
gateway: '3.14'
plugins:
- ai-mcp-oauth2
- ai-mcp-proxy
entities:
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This how-to will be picked up by the automated how-to test runner (products include gateway/ai-gateway) but it depends on an external Keycloak container and manual setup steps, so it should either add an automated prereq that starts/configures Keycloak or set automated_tests: false in frontmatter to avoid CI failures.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ai-gateway): How to for validating MCP tokens locally with JWK verification

2 participants