Make the MQTT CA certificate configurable - #1166
Open
oysand wants to merge 2 commits into
Open
Conversation
8 tasks
oysand
force-pushed
the
make-mqtt-ca-certificate-configurable
branch
from
August 25, 2026 10:30
d71566f to
27f9011
Compare
oysand
force-pushed
the
make-mqtt-ca-certificate-configurable
branch
from
August 27, 2026 12:14
27f9011 to
2974f3d
Compare
This was referenced Aug 27, 2026
Contributor
Author
|
Pushed
Also documented that an inline certificate has to be spilled to disk because the MQTT client takes a Added a test that the certificate is written once and that the cleanup removes it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
ISAR verified the broker certificate against a CA certificate bundled with the package, at a hardcoded path in
mqtt_client.py. Every environment therefore had to share one broker certificate, and the armada integration tests had to be handed the production one.This is the first of three PRs that remove the need for any external secret to run the armada integration tests. See equinor/armada for the other two.
What
Resolve the CA certificate in this order:
ISAR_MQTT_CA_CERT— the CA inline as PEM, written to a temporary file on startup.ISAR_MQTT_CA_CERT_PATH— a path to a CA certificate file.Both new settings default to empty, so behaviour is unchanged unless one is set.
The inline form exists because Kubernetes and testcontainers both deliver this kind of material as an environment variable far more easily than as a mounted file. It is what the integration tests use to hand ISAR a CA minted for that test run.
Verified
make check(mypy) clean,make formatapplied.isar-robotimage and run through the full armada integration suite against a broker using a generated certificate — 4 passed.Ready for review checklist:
Merge order
This is one of five PRs that remove the need for any external secret to run the armada
integration tests. They must merge in this order:
Make the MQTT CA certificate configurable #1166 — MQTT CA certificate configurable
then wait for the
:devimages to publishOut of order it breaks: armada's reusable workflow currently declares
INTEGRATION_TEST_AZURE_CLIENT_SECRETasrequired: trueand every caller uses@main, so acaller that stops passing it before step 2 fails immediately. Conversely step 2 needs the new
broker and the configurable ISAR CA already published, because it feeds the broker its
credentials through the environment.