OpenID Connect with Curityv3.14+

Integrate Kong Gateway and the Curity Identity Server for introspection using the Phantom Token pattern.

The OpenID Connect plugin introspects an incoming opaque access token and receives a JWT in the introspection response from the Curity Identity Server. As part of the introspection, the OpenID Connect plugin validates that required scopes are available in the introspected token.

  • This example uses config.upstream_headers to map claims using a path array. This lets you access claims at any depth in the token payload.
  • If the correct scopes are missing, access to the requested upstream service is denied.
  • If access is granted, the JWT from the introspection response is added to a header and forwarded to the upstream service where it can be consumed.

Prerequisites

Environment variables

  • ISSUER: The issuer authentication URL for your IdP. For Curity, that typically looks like this: https://idsvr.example.com/oauth/v2/oauth-anonymous.

  • CLIENT_ID: The client ID that the plugin uses when it calls authenticated endpoints of the IdP.

  • CLIENT_SECRET: The client secret needed to connect to Curity.

Set up the plugin

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!