Skip to content

ADR: Optional RabbitMQ mutual TLS support#3946

Merged
iancooper merged 3 commits into
BrighterCommand:masterfrom
darrenschwarz:adr/3902-rabbitmq-mutual-tls
Dec 23, 2025
Merged

ADR: Optional RabbitMQ mutual TLS support#3946
iancooper merged 3 commits into
BrighterCommand:masterfrom
darrenschwarz:adr/3902-rabbitmq-mutual-tls

Conversation

@darrenschwarz

@darrenschwarz darrenschwarz commented Dec 20, 2025

Copy link
Copy Markdown
Contributor

Proposes an ADR for adding optional, opt-in mutual TLS (mTLS) support to RabbitMQ messaging gateways.

This PR is intentionally ADR-only to align on scope, constraints, and non-goals before implementation.

Related issue: #3902.

@CLAassistant

CLAassistant commented Dec 20, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@darrenschwarz darrenschwarz marked this pull request as draft December 20, 2025 04:18
Removed redundant 'Proposed' line from the document.
codescene-delta-analysis[bot]

This comment was marked as outdated.

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No application code in the PR — skipped Code Health checks.

See analysis details in CodeScene

Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

@darrenschwarz darrenschwarz marked this pull request as ready for review December 20, 2025 04:46
@iancooper

Copy link
Copy Markdown
Member

Hi @darrenschwarz -

Thanks for the ADR.

A few comments, mostly giving you situational awareness of things that will help you. Any questions, do shout.

@darrenschwarz

Copy link
Copy Markdown
Contributor Author

Hi @darrenschwarz -

Thanks for the ADR.

A few comments, mostly giving you situational awareness of things that will help you. Any questions, do shout.

Hey, This is the only comment I can see?

@lillo42 lillo42 added 2 - In Progress .NET Pull requests that update .net code V10.X labels Dec 23, 2025

@lillo42 lillo42 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the scope of this change? Will it introduce any breaking changes? If not, an ADR might not be necessary, and you can proceed directly with the implementation.

Comment thread docs/adr/00xx-rabbitmq-mutual-tls.md
@iancooper

Copy link
Copy Markdown
Member

No,an ADR is always good and in our guidelines. Some of you, no names, should be learning from this ;-)

ADRs are not only good to record design decisions, but we can point agents to them for docs or building a plan.

Comment thread docs/adr/00xx-rabbitmq-mutual-tls.md

### Negative

- Increases configuration surface area for RabbitMQ gateways

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is alright, as its opt in, so only you pay the cost if you take the benefit


The implementation will be supported by:

- **Unit tests** verifying correct propagation of mTLS configuration into the RabbitMQ connection factory

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally we tend to think about developer tests and acceptance tests, so the unit/integration distinction is a little spurious for us. For a transport, we tend to test against the actual transport, configured in Docker. (The core engine is tested against in-memory versions). So you really only need to extend the RMQ tests for this, and you can use Docker containers. Your issue might be that you need to configure Docker differently for mTLS, so other tests would fail. In that case, use an attibute for tests that use mTLS so that we can run you in GHA against a different container more easily.

4. Support will be implemented with **parity across synchronous and asynchronous RabbitMQ gateways**.
5. No changes will be made to existing message wire formats, headers, or CloudEvents propagation.

The primary mechanism for enabling mTLS will be the ability to supply an `X509Certificate2` (and associated trust configuration) to the RabbitMQ connection factory in a controlled, backwards-compatible manner.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One note. We continue to support both RMQ v6 as it is sync, alongside RMQ v7, which is async. For now, we should try to support pushing this option to both versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 - In Progress .NET Pull requests that update .net code V10.X

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants