You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "Pournima513 (via GitHub)" <gi...@apache.org> on 2026/06/06 00:13:04 UTC

[D] Configuring mTLS and strict authentication for the Triple protocol in a Zero-Trust architecture [dubbo]

GitHub user Pournima513 created a discussion: Configuring mTLS and strict authentication for the Triple protocol in a Zero-Trust architecture

### Pre-check

- [X] I am sure that all the content I provide is in English.


### Apache Dubbo Component

Java SDK (apache/dubbo)

### Details

Hi Dubbo Community,

I am currently migrating a microservices architecture to Dubbo 3 and would love some advice on securing the RPC communications to align with zero-trust principles.

Context & Goal:

What I am trying to achieve: I want to ensure that all internal service-to-service communication is encrypted and strictly authenticated. Specifically, I want to implement mTLS (Mutual TLS) between my consumers and providers using the Triple protocol.

Current Setup: I have basic service discovery running via Nacos, and the Triple protocol is successfully handling plaintext traffic.

Environment Details:

Dubbo Version: 3.3.6

JDK Version: JDK 17

Registry / Integration: Nacos, Spring Boot 3

My Question:
What is the recommended way to enforce mTLS on the Triple protocol in Dubbo 3.3.x? Does Dubbo provide a built-in certificate management extension for this, or is it better to offload the TLS termination to a service mesh proxy (like Envoy) running alongside the Dubbo instances?

If configuring it directly in Dubbo via YAML, would the configuration look something like this, or am I missing required security plugins?

YAML
dubbo:
  protocol:
    name: tri
    port: 50051
    ssl-enabled: true
  ssl:
    server-key-cert-chain-path: /certs/server.pem
    server-private-key-path: /certs/server.key
    mutual-tls: true
Thanks in advance for your insights!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)


GitHub link: https://github.com/apache/dubbo/discussions/16311

----
This is an automatically sent email for notifications@dubbo.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@dubbo.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [D] Configuring mTLS and strict authentication for the Triple protocol in a Zero-Trust architecture [dubbo]

Posted by "tanishqzope (via GitHub)" <gi...@apache.org>.
GitHub user tanishqzope added a comment to the discussion: Configuring mTLS and strict authentication for the Triple protocol in a Zero-Trust architecture

Hi there! This is a great question. Moving towards a zero-trust architecture is definitely the right path, and Dubbo 3 handles this very well with the Triple protocol.

To answer your questions directly: you can do both, but the "recommended" approach depends heavily on how you want to manage certificate rotation and infrastructure overhead.

Here is a breakdown of your options and how to configure them:

1. The Native Approach (Direct YAML Configuration)
Dubbo does have built-in support for TLS and mTLS terminating directly within the framework, so you do not strictly need a sidecar proxy.

The YAML snippet you provided is very close! However, for true mutual TLS (where the server also authenticates the client), you must also provide the trust store/certificate collection so the provider can verify the consumer's certificate.

Your updated configuration should look like this:

YAML
dubbo:
  protocol:
    name: tri
    port: 50051
    ssl-enabled: true
  ssl:
    # Server's own identity
    server-key-cert-chain-path: /certs/server.pem
    server-private-key-path: /certs/server.key
    # Required for mTLS: Verifying the client
    mutual-tls: true
    trust-cert-collection-path: /certs/ca.pem 
(Note: You will also need corresponding dubbo.ssl.client-* configurations on the Consumer side to present its certificate to the Provider).

2. The Service Mesh Approach (Envoy / Istio)
While native mTLS works perfectly, the biggest challenge in zero-trust is certificate lifecycle management. Manually mounting and rotating /certs/server.pem across dozens of Spring Boot pods becomes operationally heavy.

For enterprise production environments, the community highly recommends offloading mTLS to a Service Mesh (like Istio + Envoy).

Why use a Service Mesh instead?

Automated Rotation: Istio handles identity provisioning via SPIFFE/SPIRE and automatically rotates short-lived certificates without you ever needing to touch your Spring Boot YAML.

Separation of Concerns: Your Dubbo application stays completely unaware of TLS. It communicates over plaintext to the Envoy sidecar running in the same pod via localhost, and Envoy handles the heavy lifting of encrypting the traffic across the network.

3. The Middle Ground: Proxyless Mesh
Since you are on Dubbo 3.3.x, you also have the option of a Proxyless Mesh. Dubbo can integrate directly with the Istio control plane (xDS) to fetch routing rules and security certificates dynamically, combining the automated certificate management of Istio with the high performance of native Dubbo (bypassing the Envoy sidecar network hop).

GitHub link: https://github.com/apache/dubbo/discussions/16311#discussioncomment-17198904

----
This is an automatically sent email for notifications@dubbo.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@dubbo.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org