fix title of rabbitMQ gateway nuget package#9
Merged
Conversation
iancooper
added a commit
that referenced
this pull request
Oct 8, 2014
fix title of rabbitMQ gateway nuget package
darrenschwarz
added a commit
to darrenschwarz/Brighter
that referenced
this pull request
Dec 20, 2025
Implements client certificate configuration for RabbitMQ connections
to support mutual TLS authentication.
Changes:
- Add ClientCertificate, ClientCertificatePath, and
ClientCertificatePassword properties to RmqMessagingGatewayConnection
- Implement SSL configuration in RmqMessageGateway for both sync and
async variants
- Support X509Certificate2 objects and file paths (.pfx/PKCS#12 format)
- Use X509CertificateLoader.LoadPkcs12FromFile (not obsolete constructors)
- Certificate object takes precedence over file path
- Maintain backwards compatibility (certificate configuration is optional)
Testing:
- Behavioral tests verify ConnectionFactory.Ssl configuration
- Tests assert SSL enablement, certificate passing, and precedence
- Error case tests (missing file, invalid certificate)
- Self-signed certificates generated in test setup
- Full test coverage for both sync and async variants
- All 14 tests passing
Compliance with Critical Guidelines:
- Rule BrighterCommand#1: Implemented identically for both sync AND async variants
- Rule BrighterCommand#3: Backwards compatible (certificate is optional, all nullable)
- Rule BrighterCommand#7: Used typed X509Certificate2 API consistently
- Rule BrighterCommand#9: Extracted LoadCertificate helper method
- Rules BrighterCommand#10-12: No changes to trace propagation (observability preserved)
darrenschwarz
added a commit
to darrenschwarz/Brighter
that referenced
this pull request
Dec 28, 2025
Implements client certificate configuration for RabbitMQ connections
to support mutual TLS authentication.
Changes:
- Add ClientCertificate, ClientCertificatePath, and
ClientCertificatePassword properties to RmqMessagingGatewayConnection
- Implement SSL configuration in RmqMessageGateway for both sync and
async variants
- Support X509Certificate2 objects and file paths (.pfx/PKCS#12 format)
- Use X509CertificateLoader.LoadPkcs12FromFile (not obsolete constructors)
- Certificate object takes precedence over file path
- Maintain backwards compatibility (certificate configuration is optional)
Testing:
- Behavioral tests verify ConnectionFactory.Ssl configuration
- Tests assert SSL enablement, certificate passing, and precedence
- Error case tests (missing file, invalid certificate)
- Self-signed certificates generated in test setup
- Full test coverage for both sync and async variants
- All 14 tests passing
Compliance with Critical Guidelines:
- Rule BrighterCommand#1: Implemented identically for both sync AND async variants
- Rule BrighterCommand#3: Backwards compatible (certificate is optional, all nullable)
- Rule BrighterCommand#7: Used typed X509Certificate2 API consistently
- Rule BrighterCommand#9: Extracted LoadCertificate helper method
- Rules BrighterCommand#10-12: No changes to trace propagation (observability preserved)
darrenschwarz
added a commit
to darrenschwarz/Brighter
that referenced
this pull request
Dec 31, 2025
Implements client certificate configuration for RabbitMQ connections
to support mutual TLS authentication.
Changes:
- Add ClientCertificate, ClientCertificatePath, and
ClientCertificatePassword properties to RmqMessagingGatewayConnection
- Implement SSL configuration in RmqMessageGateway for both sync and
async variants
- Support X509Certificate2 objects and file paths (.pfx/PKCS#12 format)
- Use X509CertificateLoader.LoadPkcs12FromFile (not obsolete constructors)
- Certificate object takes precedence over file path
- Maintain backwards compatibility (certificate configuration is optional)
Testing:
- Behavioral tests verify ConnectionFactory.Ssl configuration
- Tests assert SSL enablement, certificate passing, and precedence
- Error case tests (missing file, invalid certificate)
- Self-signed certificates generated in test setup
- Full test coverage for both sync and async variants
- All 14 tests passing
Compliance with Critical Guidelines:
- Rule BrighterCommand#1: Implemented identically for both sync AND async variants
- Rule BrighterCommand#3: Backwards compatible (certificate is optional, all nullable)
- Rule BrighterCommand#7: Used typed X509Certificate2 API consistently
- Rule BrighterCommand#9: Extracted LoadCertificate helper method
- Rules BrighterCommand#10-12: No changes to trace propagation (observability preserved)
iancooper
added a commit
that referenced
this pull request
Feb 1, 2026
* Add mutual TLS support for RabbitMQ (#3902) Implements client certificate configuration for RabbitMQ connections to support mutual TLS authentication. Changes: - Add ClientCertificate, ClientCertificatePath, and ClientCertificatePassword properties to RmqMessagingGatewayConnection - Implement SSL configuration in RmqMessageGateway for both sync and async variants - Support X509Certificate2 objects and file paths (.pfx/PKCS#12 format) - Use X509CertificateLoader.LoadPkcs12FromFile (not obsolete constructors) - Certificate object takes precedence over file path - Maintain backwards compatibility (certificate configuration is optional) Testing: - Behavioral tests verify ConnectionFactory.Ssl configuration - Tests assert SSL enablement, certificate passing, and precedence - Error case tests (missing file, invalid certificate) - Self-signed certificates generated in test setup - Full test coverage for both sync and async variants - All 14 tests passing Compliance with Critical Guidelines: - Rule #1: Implemented identically for both sync AND async variants - Rule #3: Backwards compatible (certificate is optional, all nullable) - Rule #7: Used typed X509Certificate2 API consistently - Rule #9: Extracted LoadCertificate helper method - Rules #10-12: No changes to trace propagation (observability preserved) * Add RabbitMQ mutual TLS support with self-signed certificate option Implements mutual TLS (mTLS) authentication for RabbitMQ connections, enabling secure communication where both client and server authenticate using X.509 certificates. Changes: - Add ClientCertificate, ClientCertificatePath, and ClientCertificatePassword properties to RmqMessagingGatewayConnection (Sync & Async) - Add TrustServerSelfSignedCertificate property for test/dev environments - Configure SSL options with certificate chain validation - Fix GetSanitizedUri() to handle mTLS URIs without username/password - Use NET9_0_OR_GREATER conditional compilation for X509CertificateLoader (falls back to X509Certificate2 for .NET 8.0 and netstandard2.0) - Add acceptance tests with [Trait("Requires", "Docker-mTLS")] for CI filtering The implementation provides full parity between Sync (RMQ v6) and Async (RMQ v7) gateways. Certificate loading supports both runtime objects and file paths. Configuration is secure by default with opt-in flag for accepting self-signed certificates in test environments only. * Add observability tests for RabbitMQ mutual TLS Verifies that W3C Trace Context (TraceParent, TraceState, Baggage) and CloudEvents trace context survive mTLS connections, ensuring compliance with Critical Review Guidelines Rules #10-12. Tests verify: - TraceParent header preservation over mTLS - TraceState and Baggage propagation - BrighterTracer.WriteProducerEvent instrumentation - CloudEvents trace context serialization - Parity between Sync and Async gateways Tagged with [Trait("Category", "Observability")] for selective test execution. * Add simple mTLS test harness for RabbitMQ Creates a minimal Web API that demonstrates publishing and consuming messages over RabbitMQ with mutual TLS authentication. Features: - Single application acts as both producer and consumer - TodoCreated event with TodoCreatedHandler - REST endpoints: POST /todos and GET /health - RabbitMQ connection configured with client certificate - Comprehensive README with setup and troubleshooting - Built for .NET 8.0 compatibility The test harness verifies end-to-end mTLS functionality including certificate loading, SSL connection establishment, message publishing with publisher confirms, and message consumption over secure connection. * Exclude mTLS tests from regular CI The mTLS tests require: - Generated certificates (tests/certs/) - RabbitMQ with mTLS configuration - Docker compose setup with special config These tests are tagged with [Trait("Requires", "Docker-mTLS")] and should only run when explicitly requested with --filter "Requires=Docker-mTLS", not in the regular rabbitmq-ci workflow. * Add Requires=Docker-mTLS trait to observability tests The observability test classes were missing the [Trait("Requires", "Docker-mTLS")] attribute, causing them to run in regular CI despite needing mTLS infrastructure. This trait ensures these tests are only executed when explicitly requested with --filter "Requires=Docker-mTLS", matching the acceptance tests. * Fix sync mTLS test failures by enforcing sequential execution Add Collection attributes to sync mTLS test classes to prevent parallel execution race conditions during TLS handshake. Changes: - Add [Collection("RabbitMQ mTLS")] to mTLS test classes - Add RabbitMQMtlsTestCollection with DisableParallelization - Add quorum queue test coverage for both sync and async All 18 mTLS tests (9 sync + 9 async) now pass consistently. * deleted local certs for testing * Fix missing NOT operator in RMQ sync requeue logic The AddUserDefinedHeaders method in the SYNC version (RmqMessagePublisher.cs) was missing the negation operator that exists in the ASYNC version. This caused only system headers to be copied during message requeuing instead of user-defined headers, resulting in message body loss. Changed: if (_headersToReset.Contains(header.Key)) To: if (!_headersToReset.Contains(header.Key)) This brings the SYNC implementation in line with the ASYNC version from commit 76aeced. * Fix mTLS certificate validation and race condition in sync consumer This commit includes fixes to complete the mTLS implementation for RabbitMQ messaging gateways, resolving test failures and a race condition. ## mTLS Implementation - Added RmqTlsConfigurator helper classes (Async and Sync variants) to centralize TLS/SSL configuration logic - Extracts certificate loading and SslOption configuration into reusable internal static class - Supports both X509Certificate2 objects and file paths with optional passwords - Integrates with RmqMessagingGatewayConnection configuration ## Bug Fixes 1. Certificate validation failures (18 tests) - Server certificate is issued for hostname rabbitmq-mtls but tests connect to localhost, causing SSL name mismatch errors - Updated RmqTlsConfigurator to accept both RemoteCertificateChainErrors AND RemoteCertificateNameMismatch when TrustServerSelfSignedCertificate is enabled - This is appropriate for test/development environments with self-signed certificates 2. Race condition in sync consumer (intermittent failures) - RmqMessageConsumer.CreateConsumer() was manually calling HandleBasicConsumeOk after BasicConsume - RabbitMQ client already calls this method automatically as a callback, causing concurrent modifications to non-thread-safe collections in DefaultBasicConsumer - Removed the redundant manual call and added explanatory comment All 32 mTLS tests now pass consistently (16 async + 16 sync). Files added: - src/Paramore.Brighter.MessagingGateway.RMQ.Async/RmqTlsConfigurator.cs - src/Paramore.Brighter.MessagingGateway.RMQ.Sync/RmqTlsConfigurator.cs Files modified: - src/Paramore.Brighter.MessagingGateway.RMQ.Async/RmqMessageGateway.cs - src/Paramore.Brighter.MessagingGateway.RMQ.Async/RmqMessagingGatewayConnection.cs - src/Paramore.Brighter.MessagingGateway.RMQ.Sync/RmqMessageGateway.cs - src/Paramore.Brighter.MessagingGateway.RMQ.Sync/RmqMessagingGatewayConnection.cs - src/Paramore.Brighter.MessagingGateway.RMQ.Sync/RmqMessageConsumer.cs Fixes #3902 * Address PR review comments - Update copyright attribution to Darren Schwarz - Remove excessive XML documentation from internal methods - Replace Guid.NewGuid().ToString() with Id.Random() (V10 pattern) - Reorganize acceptance tests into separate folders - Add PowerShell certificate generation script for Windows - Revert race condition fix (will be addressed separately) - Update documentation with boolean logic bug fix explanation * Address PR review comments - Update copyright attribution to Darren Schwarz per CLA - Remove ALL XML documentation from internal RmqTlsConfigurator classes - Replace Guid.NewGuid().ToString() with Id.Random() (V10 pattern) - Reorganize acceptance tests into separate Acceptance/ folders - Add PowerShell certificate generation script for Windows developers - Revert race condition fix (will be addressed in separate issue) - Update namespaces for moved test files All review comments from @iancooper addressed. Unit tests: 14/14 passed Acceptance tests: 18/18 passed Total: 32/32 mTLS tests passing * Address PR review comments - Update copyright attribution to Darren Schwarz per CLA - Remove ALL XML documentation from internal RmqTlsConfigurator classes - Remove license headers from test files per project convention - Replace Guid.NewGuid().ToString() with Id.Random() (V10 pattern) - Reorganize acceptance tests into separate Acceptance/ folders - Add PowerShell certificate generation script for Windows developers - Revert race condition fix (will be addressed in separate issue) - Update namespaces for moved test files All review comments from @iancooper addressed. Unit tests: 14/14 passed Acceptance tests: 18/18 passed Total: 32/32 mTLS tests passing --------- Co-authored-by: Ian Cooper <ian_hammond_cooper@yahoo.co.uk>
9 tasks
iancooper
added a commit
that referenced
this pull request
Jun 1, 2026
- ralph-implement: switch return contract to one-path-per-line, add main-agent normalisation + empty-list guard for git add/checkout (#2) - design: add actionable ADR-number re-check in Step 6 validation (#4) - README: correct Plan agent tool description (all tools except mutating) (#6) - requirements: forbid sub-agent from prompting the user (#9) - tasks: mark coverage spot-check as sampling, point to /spec:review (#3) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
The title of the nuget package was wrong