Skip to content

For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.

Page as Markdown

Auth0

Integrate agentgateway with Auth0 for identity management

Auth0 is an identity platform that provides authentication and authorization services. agentgateway can validate JWTs issued by Auth0.

Why use Auth0 with agentgateway?

  • Managed identity - No infrastructure to maintain
  • Social login - Google, GitHub, Microsoft, and more
  • Enterprise SSO - SAML, LDAP, Active Directory
  • MFA - Built-in multi-factor authentication
  • API protection - JWT-based API authentication

Configuration

Configure agentgateway to validate Auth0 JWTs:

# yaml-language-server: $schema=https://agentgateway.dev/schema/config
binds:
- port: 3000
  listeners:
  - routes:
    - backends:
      - mcp:
          targets:
          - name: my-server
            stdio:
              cmd: npx
              args: ["@modelcontextprotocol/server-everything"]
      policies:
        mcpAuthentication:
          mode: strict
          issuer: https://your-tenant.auth0.com/
          audiences:
          - https://api.example.com
          jwks:
            url: https://your-tenant.auth0.com/.well-known/jwks.json

Auth0 setup

  1. Create an API in Auth0 Dashboard:

    • Name: agentgateway API
    • Identifier: https://api.example.com
  2. Create an Application:

    • Type: Single Page Application or Machine to Machine
    • Note the Client ID and Client Secret
  3. Configure allowed callbacks and origins

Getting a token

Machine-to-machine

curl -X POST "https://your-tenant.auth0.com/oauth/token" \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "YOUR_CLIENT_ID",
    "client_secret": "YOUR_CLIENT_SECRET",
    "audience": "https://api.example.com",
    "grant_type": "client_credentials"
  }'

Using the token

curl http://localhost:3000/mcp \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"initialize",...}'

Permission-based authorization

Use Auth0 permissions with agentgateway:

policies:
  mcpAuthentication:
    mode: strict
    issuer: https://your-tenant.auth0.com/
    audiences: [https://api.example.com]
    jwks:
      url: https://your-tenant.auth0.com/.well-known/jwks.json
  authorization:
    rules:
    # Check for specific permission
    - '"read:tools" in jwt.permissions'

Learn more

Was this page helpful?
Agentgateway assistant

Ask me anything about agentgateway configuration, features, or usage.

Note: AI-generated content might contain errors; please verify and test all returned information.

Tip: one topic per conversation gives the best results. Use the + button in the chat header to start a new conversation.

Switching topics? Starting a new conversation improves accuracy.
↑↓ navigate select esc dismiss

What could be improved?

Your feedback helps us improve assistant answers and identify docs gaps we should fix.

Need more help? Join us on Discord: https://discord.gg/y9efgEmppm

Want to use your own agent? Add the Solo MCP server to query our docs directly. Get started here: https://search.solo.io/.