# Implications of cluster mode on PKI structure

**URL:** https://openziti.discourse.group/t/implications-of-cluster-mode-on-pki-structure/3874
**Category:** Uncategorized
**Created:** [February 4, 2025, 4:18pm UTC](https://openziti.discourse.group/t/implications-of-cluster-mode-on-pki-structure/3874 "2025-02-04T16:18:00Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![mkuhlmann](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@mkuhlmann](https://openziti.discourse.group/u/mkuhlmann)
#### Post date: [February 4, 2025, 4:18pm UTC](https://openziti.discourse.group/t/implications-of-cluster-mode-on-pki-structure/3874/1 "2025-02-04T16:18:00Z")

</div>

Hi everyone,

I'm still working on getting my setup HA ready and in this context I came across a question:

With multiple controllers using different intermediate CAs (for signing) (thats whats presented in the docs on github), I could not get inter-router communication to work. The routers could not recognize their counterpart's certificates. This might be solved by initially pointing the routers to the same controller, but I did not test that yet and I fear that things might fail a little bit down the road.  
Another option would be to let all controllers use the same intermediate CA, but I have the feeling that this is a bad idea. Will the CRLs be synced between the controllers?

In general, what is a recommendable structure of a PKI in case I want to have sets of a controller and a edge-router on two distinct networks?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![andrew.martinez](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/andrew.martinez/32/540_2.png) [@andrew.martinez](https://openziti.discourse.group/u/andrew.martinez)
#### Post date: [February 4, 2025, 5:34pm UTC](https://openziti.discourse.group/t/implications-of-cluster-mode-on-pki-structure/3874/2 "2025-02-04T17:34:33Z")

</div>

In any PKI verification is done to a trust anchor, commonly the root CA. When multiple intermediates are present in an environment, it is standard practice for every client and server to present a chain of certificates instead of just one. The format is order specific of the client/server leaf certificate first, followed by supporting intermediates.

Each component trusts the root CA, and when a client or server verifies a presented chain, it must verify to that root.

> Another option would be to let all controllers use the same intermediate CA, but I have the feeling that this is a bad idea.

You shouldn't have to use the same intermediate. If each component properly presents its chain (clients and servers), it will validate back to the root CA,

> Will the CRLs be synced between the controllers?

Controllers share/distribute/synchronize a data model, including identity/authentication information. So they all know about the same identities, routers, etc.

> In general, what is a recommendable structure of a PKI in case I want to have sets of a controller and a edge-router on two distinct networks?

Do you mean two OpenZiti networks or two different underlay networks (i.e. the internet and internal network, or two cloud networks, etc.)

---

<div class="post-metadata">

### Author: ![mkuhlmann](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@mkuhlmann](https://openziti.discourse.group/u/mkuhlmann)
#### Post date: [February 7, 2025, 4:12pm UTC](https://openziti.discourse.group/t/implications-of-cluster-mode-on-pki-structure/3874/3 "2025-02-07T16:12:47Z")

</div>

Thanks Andrew, that made it clearer for me.

> [@andrew.martinez](#):
>
> Do you mean two OpenZiti networks or two different underlay networks (i.e. the internet and internal network, or two cloud networks, etc.)

I was trying to set up a HA cluster. I wanted to have one controller and one router in my home network and another set on my cloud VPS.  
What I dont really understand is the configuration of the controllers regarding the certificates. From your response I understand that the certificate files should contain the entire chain, but not the root CA (Server certificate + Intermediate certificates). The CA would be in a separate file referenced by the "ca" config item below "identity".  
Im a little bit confused when to use "server\_cert" and when "cert".

---

<div class="post-metadata">

### Author: ![andrew.martinez](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/andrew.martinez/32/540_2.png) [@andrew.martinez](https://openziti.discourse.group/u/andrew.martinez)
#### Post date: [February 7, 2025, 6:36pm UTC](https://openziti.discourse.group/t/implications-of-cluster-mode-on-pki-structure/3874/4 "2025-02-07T18:36:20Z")

</div>

> [@mkuhlmann](#):
>
> Im a little bit confused when to use "server\_cert" and when "cert".

The `cert` field is used to fulfill any request for a client certificate. The `server_cert` field is only used to fill requests for server certificates. If `server_cert` isn't define, `cert` will be assumed to have a certificate that is a client cert and a server cert.

The only difference between client certs and server certs are their X509 Key Usages, X509 Extended Key Usages, and SANs

Client Certs

- Usages
  - Digital Signature

- Extended Key Usages
  - Client Auth

- SANs
  - None required unless defined by the application using the certificate

Server Certs

- Usages
  - Digital Signature
  - Key Encipherment

- Extended Key Usages
  - Server Auth

- SANs
  - DNS or IP SANs for TLS

It is possible to make 1 certificate both a server cert and a client cert simply by fulfilling all the usage, extened key uses, and SANs. In which case you would only need the `cert` field. It is however, an uncommon practice. Most people issue a separate server and client certificate.

Background Context:

The format of `identity` configurations is an OpenZiti concept that spans all components. Controllers and routers use it within configuration files. SDKs usually use it inside of their own SDK configuration files as well. Within OpenZiti an identity configuration section may be used to define something that is a client, or a server and a client. SDKs are usually client only, routers are servers to SDKs and other routers and clients to other routers depending on the direction of the link establishment. Controllers are servers to router and SDKs, and also clients and servers to other controllers.

Word salad because describing direct graphs is hard.

---

<div class="post-metadata">

### Author: ![mkuhlmann](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@mkuhlmann](https://openziti.discourse.group/u/mkuhlmann)
#### Post date: [March 27, 2025, 5:05pm UTC](https://openziti.discourse.group/t/implications-of-cluster-mode-on-pki-structure/3874/5 "2025-03-27T17:05:22Z")

</div>

I got it. Thanks Andrew!

---

<div class="post-metadata">

### Author: ![qrkourier](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/qrkourier/32/52_2.png) [@qrkourier](https://openziti.discourse.group/u/qrkourier)
#### Post date: [March 27, 2025, 9:04pm UTC](https://openziti.discourse.group/t/implications-of-cluster-mode-on-pki-structure/3874/6 "2025-03-27T21:04:52Z")

</div>

Now we have some docs describing the clustered (HA) beta mode of operation in [Controller Clustering | OpenZiti](https://openziti.io/docs/reference/ha/overview)
