kong-plugins

by Unique AI

Helm chartv2.1.0Verified publisher

The 'kong-plugins' chart provides a streamlined solution for deploying Kong plugins via ConfigMaps to be used with the Unique Software. Refer to each plugins readme section to learn more about them. Please report any security concerns with the plugins via the [Security Policy](https://github.com/Unique-AG/helm-charts/tree/main?tab=security-ov-file).

About this chart

kong-plugins

The 'kong-plugins' chart provides a streamlined solution for deploying Kong plugins via ConfigMaps to be used with the Unique Software.

Refer to each plugins readme section to learn more about them.

Please report any security concerns with the plugins via the Security Policy.

Implementation Details

kong-plugin-unique-jwt-auth

This plugin is a modified fork of kong-plugin-jwt-keycloak (Apache License 2.0 licensed) 🎖️

Cluster-Internal JWT Validation

This chart can configure Kong's JWT plugin to validate tokens using an identity provider (IdP) running within the same Kubernetes cluster, without Hairpin Routing. This is useful in scenarios where the IdP is not publicly accessible or when you want to ensure traffic stays within the cluster network.

To achieve this:

  1. Specify the JWKS URI directly: Instead of letting the plugin discover the JWKS endpoint via the IdP's well-known configuration endpoint, you can provide the internal service URL directly using the config.jwks_uri value. This bypasses the well-known lookup. For example, if your IdP's JWKS endpoint is available internally at http://my-idp-service.default.svc.cluster.local/jwks, set config.jwks_uri to this value.

  2. Disable TLS verification for cluster-internal traffic: By default, the plugin enforces TLS verification (config.ssl_verify: true) and requires HTTPS for all OIDC endpoints. For cluster-internal setups where the IdP communicates over plain HTTP (e.g., mTLS is handled at the mesh level rather than the application layer), set config.ssl_verify: false. This disables both SSL certificate validation and the HTTPS-only requirement for the JWKS and well-known endpoints.

  3. (Optional) Add custom headers: If your internal IdP endpoints (either the well-known endpoint or the direct JWKS endpoint) require specific headers for authentication, routing, or other purposes (e.g., a Host header matching an Ingress), you can configure these using:

    • config.well_known_extra_headers: Adds headers to the request for the .well-known/openid-configuration endpoint (if config.jwks_uri is not set).
    • config.jwks_extra_headers: Adds headers to the request for the JWKS endpoint specified by config.jwks_uri.

By using config.jwks_uri, you ensure that Kong fetches the JSON Web Key Set directly from the specified internal URL. By adding necessary headers via config.jwks_extra_headers or config.well_known_extra_headers, you can accommodate internal routing or security requirements.

Example configuration using Kong API Gateway 🦍

[!CAUTION] Plugin configuration is not helm chart values!

apiVersion: configuration.konghq.com/v1
kind: KongClusterPlugin
plugin: unique-jwt-auth
config:
  allowed_iss:
    - https://id.example.com
  jwks_extra_headers:
    forwarded: host=id.example.com
  jwks_uri: http://zitadel.<namespace>.svc.cluster.local:8080/oauth/v2/keys
  uri_param_names:
    - token
  zitadel_project_id: '<ZITADEL_PROJECT_ID>'
  # ssl_verify: false

With this configuration, both external clients (e.g., browser users) and the internal JWT validation plugin can utilize the same identity provider (IdP) for token issuance and validation without requiring further customization.

Upgrading

To 2.0.0 or 2.1.0 respectively

This release hardens JWT validation in the unique-jwt-auth plugin. It includes behavioral changes that may require configuration updates.

Breaking: Strict Issuer Matching

Previous versions used Lua pattern matching for allowed_iss, which allowed entries like https://id%.example%.com/.* to match multiple issuers. Version 2.0.0 requires exact string matches only. If your allowed_iss entries contain Lua pattern characters (., %, *, +, ?, [, ], ^, $, -), update them to the literal issuer URL returned in your tokens' iss claim.

Breaking: TLS Verification Enforced

Requests to OIDC well-known and JWKS endpoints now enforce TLS verification by default. Environments using self-signed certificates or internal CAs not in Kong's trusted store will fail. Ensure the certificate chain for your identity provider is trusted by Kong before upgrading, or set config.ssl_verify: false to opt out (e.g., for cluster-internal setups where transport security is handled at the mesh layer).

Breaking: JWKS URI Must Be HTTPS

When config.ssl_verify is true (the default), the jwks_uri returned from the well-known endpoint must start with https://. Setups using plain http:// JWKS URIs will be rejected. Set config.ssl_verify: false to allow http:// URIs for cluster-internal IdPs. Note: the HTTPS check applies only to the discovered jwks_uri from the well-known response, not to config.jwks_uri set directly in plugin configuration.

Changed Defaults

  • claims_to_verify now defaults to ["exp", "nbf"] (previously ["exp"]). Existing plugin instances keep their persisted config. New installations will validate nbf (not-before) by default. If your IdP sets nbf to a future timestamp or clock skew is a concern, adjust claims_to_verify accordingly.

Other Changes

  • Unsupported key types (non-RSA) in JWKS responses are skipped instead of causing errors.
  • Upstream headers (X-Unique-*) are now set only after successful consumer matching.
  • Debug logs no longer include full JWT claims or headers.
  • Error messages no longer include internal identifiers.

Values

KeyTypeDefaultDescription
appRepoAuthobject{"appRepositoryUrl":"http://service-app-repository.default.svc:8088","name":"kong-plugin-unique-app-repo-auth"}appRepoAuth enables the app-repo-auth plugin
appRepoAuth.appRepositoryUrlstring"http://service-app-repository.default.svc:8088"The default app repository url
appRepoAuth.namestring"kong-plugin-unique-app-repo-auth"The name of the app repository auth config map
jwtAuthobject{"name":"kong-plugin-unique-jwt-auth"}jwtAuth enables the jwt-auth plugin
jwtAuth.namestring"kong-plugin-unique-jwt-auth"The name of the jwt auth config map

Autogenerated from chart metadata using helm-docs v1.14.2

Deploy kong-plugins with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kong-plugins on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartkong-plugins is pinned at v2.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply