You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can skip to Explanation and Solution down below if you want to go straight to what is happening.
Steps to reproduce
Download multi-cert-ca-chain.zip, it contains a simple Certificate Authority chain that I created using openssl
Specifically, you will find:
root.pem public root certificate
intermediate.pem public intermediate certificate
intermediate.key the private key of the intermediate certificate, you will use it to sign CSRs from Kafka
ca-chain-ir the ca-chain in standard order (intermediate > root)
ca-chain-ri the ca-chain in reverse order, the reason for this chain is that the manual-tls-certificates charm expects reverse order when calling the provide-certificate action. I have raised this with the TLS team and they have a fix that is waiting to be approved
Run juju deploy ./kafka.yaml and wait for the deployment to settle down. You should see six outstanding CSRs when you run juju status.
Run the following script to extract CSRs from the manual-tls-certificates charm:
⚠️ The following scripts expect the ~/deployment directory to exist, run mkdir ~/deployment or modify the scripts to point to another directory before running the scripts.
When I run juju status, I should see all nodes active.
When I run nc $ZOOKEEPER_ID 2181, I should see statistics (latency, received, sent, connections, outstanding, etc.)
Indicating that Kafka nodes are up and running.
Actual behavior
When I run juju status, I see the ZooKeeper nodes go inactive and the Kafka machines waiting for ZooKeeper.
When I run nc $ZOOKEEPER_ID 2181, I see an error message saying that ZK is unavailable.
Explanation
The reason for this behavior is that when the charm sets the truststorehere it trusts only the ca.pem file which comes from the ca-certificates argument through the :certificates relation. That works if the CSRs are signed with a root certificate, but as soon as you have intermediate certificates, the charm doesn't trust certificate other than the one you provide through ca-certificate.
Solution
When the charm sets the truststorehere, it should not only trust ca.pem, it should also trust all of the certificates contained in the ca-chain argument from the :certificates relation.
Versions
Operating system: Ubuntu 22.04.5 LTS
Juju CLI: 3.5.4-genericlinux-amd64
Juju agent: 3.5.4
Charm revision: 149
LXD: 5.0.3
The text was updated successfully, but these errors were encountered:
ℹ️ TL ; DR
You can skip to Explanation and Solution down below if you want to go straight to what is happening.
Steps to reproduce
openssl
kafka.yaml
juju deploy ./kafka.yaml
and wait for the deployment to settle down. You should see six outstanding CSRs when you runjuju status
.manual-tls-certificates
charm:Expected behavior
When I run
juju status
, I should see all nodesactive
.When I run
nc $ZOOKEEPER_ID 2181
, I should see statistics (latency, received, sent, connections, outstanding, etc.)Indicating that Kafka nodes are up and running.
Actual behavior
When I run
juju status
, I see the ZooKeeper nodes go inactive and the Kafka machines waiting for ZooKeeper.When I run
nc $ZOOKEEPER_ID 2181
, I see an error message saying that ZK is unavailable.Explanation
The reason for this behavior is that when the charm sets the
truststore
here it trusts only theca.pem
file which comes from theca-certificates
argument through the:certificates
relation. That works if the CSRs are signed with aroot
certificate, but as soon as you have intermediate certificates, the charm doesn't trust certificate other than the one you provide throughca-certificate
.Solution
When the charm sets the
truststore
here, it should not only trustca.pem
, it should also trust all of the certificates contained in theca-chain
argument from the:certificates
relation.Versions
Operating system: Ubuntu 22.04.5 LTS
Juju CLI: 3.5.4-genericlinux-amd64
Juju agent: 3.5.4
Charm revision: 149
LXD: 5.0.3
The text was updated successfully, but these errors were encountered: