If you're looking for a simpler way, Kong may be the answer. As with everything with [Kong](https://konghq.com)Kong, the idea is to make things as lightweight as possible, including the complexity of setting up and maintaining certificate-based security.
One of our global customers in the banking industry recently had a mature certificate infrastructure that needed adoption from internal and governmental regulations. Based on their previous experience with legacy gateways, they were afraid of the complexity of integrating the gateway into their certificate management system and making sure updates are propagated automatically to the gateway cluster. In their previous solution, this was a manual task. With the below Kong mTLS use cases, this was quick and easy.
When thinking about certificates in an API gateway context, you might immediately think about these two use cases:
- The gateway should present a certificate to the client.
But there are two more use cases you may want to consider:
- Kong presents the certificate to the backend (upstream).
- Kong sends the trust to the upstream (which certificate/s we allow the backend to present).
## #1: Certificate Presented by Kong to the Client
Let's start with the certificate Kong serves to the client (the one you would see when opening the proxy in the browser).
### The Default Certificate
When someone accesses a route exposed using Kong Gateway, the presented certificate by Kong should match the entered hostname (for example, proxy.example.com) so the client can trust that Kong established the connection.
But what if Kong is listening on multiple different hostnames/[FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name)FQDN? In this case, we need to present different certificates depending on the route. Examples might be different brandings (like api.myshoesbrand.com and api.myshirtsbrand.com) or also very common internal vs. external phasing routes (like api.interal.lan and api.mybrand.com).
The actual order is the exact opposite of how we just went through it:
- Upload the certificate (I do expect you have created it already and have put the files into the current folder) http -f admin.kong.internal.lan/certificates cert=@myCert.crt key=@myCert.key tags=myCert
- Create an SNI and link to the uploaded certificate (the above command created the id) http -f admin.kong.internal.lan/snis name=api.interal.lan certificate.id=the-certificate-id-you-got-from-above-upload
- Create a route linking to the SNI (the above command created the id) http -f admin.kong.internal.lan/services/myservice/routes name=myInternalRoute hosts=api.internal.lan snis=the-sni-id-you-got-from-above-upload
*Note: While all the other documentation here is true for both Kong and Kong Enterprise, mTLS is an enterprise-only plugin.*
Authenticating consumers based on certificates is a prevalent mechanism, especially for (but not limited to) financial users of Kong. Each client gets its own certificate to present on every API call to prove its identity.
### Authentication
The [mTLS plugin](https://docs.konghq.com/hub/kong-inc/mtls-auth)mTLS plugin has one parameter called ca_certificates. As the name already tells us, we need to specify one or multiple CAs, which we'll use as the trusted source. Only incoming certificates that use those CAs will be trusted.
- By default, the parameter skip_consumer_lookup is set to false, so there must be a matching consumer in Kong. If no consumer is found, the call gets denied. We can do all the typical consumer-based steps if we find a consumer, even adding the consumer to one or multiple groups using the [ACL plugin](https://docs.konghq.com/hub/kong-inc/acl)ACL plugin.
- Depending on the contents of your certificate, it already might contain group membership information (see parameter authenticated_group_by). If so, we can directly use those extracted groups with the ACL plugin even without consumer matching in place.
## #3: Certificate Presented by Kong to the Upstream
The trust between the gateway and the backend system can be secured using certificates. This time, Kong presents a certificate to the upstream to prove its identity. This use case is about the backend validating that an accepted incoming call came from Kong Gateway and not another intermediary.
### The Default Certificate
Kong presents a self-signed certificate (the default) after installation to the upstream. If you want to change this default:
- Copy your desired certificate and key to the machine.
- Upload the certificate (I do expect you have created it already and have put the files into the current folder) http -f admin.kong.internal.lan/certificates cert=@myCert.crt key=@myCert.key tags=myCert
Attach the certificate to all calls for a specific service (the id got returned from the previous call) http -f admin.kong.internal.lan/services/my_sensitive_backend url=https://sensitive.internal.lan client_certificate.id=the_id_from_previous_upload
Certificates can play a vital role in the trusted connections to your clients and your backend systems. Using them, you can achieve both the encryption of the traffic on the transport level and create (mutual) trust between the connected systems.
Certificate configurations can often be very complex. Handling all of this within Kong keeps it simple. It can be integrated into existing certificate management systems to automate all the configurations.
Try out these examples yourself by getting a Kong installation. If you have any questions, do not hesitate to contact us.
Traditional APIs are, in a word, predictable. You know what you're getting: Compute costs that don't surprise you Traffic patterns that behave themselves Clean, well-defined request and response cycles AI APIs, especially anything that runs on LLMs
Running Kong in front of your Solace Broker adds real benefits: Authentication & Access Control – protect your broker from unauthorized publishers. Validation & Transformation – enforce schemas, sanitize data, and map REST calls into event topics.
"The whole is more than the sum of its parts." Aristotle is credited with this quote, and it's true in the world of data. Legacy systems typically approached their role in a limited manner. Each system was intended to be used by a certain user set
Architecture Overview
A multicloud DCGW architecture typically contains three main layers.
1\. Konnect Control Plane
The SaaS control plane manages configuration, plugins, and policies. All gateways connect securely to this layer.
2\. Dedicated C
The example below shows how an AI agent can be built using Volcano SDK with minimal code, while still interacting with backend services in a controlled way. The agent is created by first configuring an LLM, then defining an MCP (Model Context Prot
Kong customers include some of the most forward-thinking, tech-savvy organizations in the world. And while we’re proud to help them innovate through traditional APIs, the reality is that their ambitions don’t stop there. Increasingly, our customers a
Today we're excited to announce Kong Gateway 3.9! Since unveiling Kong Gateway 3.8 at API Summit 2024 just a few months ago, we’ve been busy making important updates and improvements to Kong Gateway. This release introduces new functionality arou