Verify TLS connection using a custom CAv3.16+

Verify a call node’s outbound TLS connection against a private CA using the plugin’s ca_certificates field, instead of relying on Kong Gateway’s global trusted CA store.

This is useful when a call node contacts an internal service whose certificate is signed by a private CA that can’t be added to a global trust store, for example on Konnect Dedicated Cloud Gateways.

This example contains the following nodes:

  1. The node AUTHOR calls an internal HTTPS endpoint. Its certificate is verified against the CA Certificate object referenced in ca_certificates, instead of the global trusted CA store.
  2. The node EXIT returns the call’s response body directly to the client.

If the internal endpoint’s certificate isn’t signed by a CA in ca_certificates, the AUTHOR node fails with a TLS verification error, and Datakit returns a 500 response instead of reaching EXIT.

Note: ca_certificates is set at the root of the plugin’s config. All call nodes in the plugin instance share the same trust store. When set, it replaces the global trusted CA store for verifying outbound calls, so include any public CAs you still need to trust alongside your private CA. The field has no effect if a node’s ssl_verify is false.

Prerequisites

  • You have added your private CA to Kong Gateway as a CA Certificate object.

Environment variables

  • CA_CERT_ID: The ID of your CA Certificate object in Kong Gateway.

  • SERVICE_URL: The URL of the internal service the AUTHOR node will call.

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!