Skip to content

fix: Update amqp to honor the transportConnector flags for clientAuth - #2756

Merged
mattrpav merged 2 commits into
apache:mainfrom
mattrpav:amq-amqp-nio-ssl-clientauth
Oct 29, 2026
Merged

mattrpav merged 2 commits into
apache:mainfrom
mattrpav:amq-amqp-nio-ssl-clientauth

Conversation

@mattrpav

@mattrpav mattrpav commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

amqp transport does not honor these config flags on the transport connector like the other transports

@mattrpav mattrpav self-assigned this Oct 26, 2026
@mattrpav
mattrpav requested a review from jbonofre October 26, 2026 18:05
@mattrpav mattrpav moved this from Backlog to In review in Apache ActiveMQ v6.5.0 Oct 26, 2026
@jeanouii

Copy link
Copy Markdown
Contributor

Looks good and it's a great fix.

Because this will prevent previous clients without certificat to connect with needClientAuth because it was not honored previously, we need to make it clear in the release notes I think.

In the test, the result of the createConnection() should be assigned to the connection of the parent maybe so the tearDown() can close it. Nothing important or critical.

Is there a negative test that basically asserts that a client without a valid certificate is now rejected?

Is there any back port you plan to do on other branches?

@mattrpav
mattrpav requested a review from jeanouii October 28, 2026 14:42
The amqp+nio+ssl connector should request the client certificate when the
connector URI sets needClientAuth or wantClientAuth in the bare form, matching
the openwire, stomp and mqtt nio+ssl connectors and the amqp+ssl blocking
connector. amqp+nio+ssl builds a plain TcpTransportServer that only applies
transport.-prefixed options, so the bare form is dropped and the certificate is
never requested.

testClientCertificateRequested fails for both bare needClientAuth and bare
wantClientAuth until the fix in the next commit.
AmqpNioSslTransportFactory built a plain TcpTransportServer, which only applies
transport.-prefixed connector options, so bare needClientAuth/wantClientAuth
were dropped and the client certificate was never requested. Build a
NIOSSLTransportServer and set needClientAuth/wantClientAuth on the transport in
createTransport, matching StompNIOSSLTransportFactory and
MQTTNIOSSLTransportFactory. transport.-prefixed options continue to work.
@mattrpav
mattrpav force-pushed the amq-amqp-nio-ssl-clientauth branch from c297178 to dc91ce4 Compare October 28, 2026 14:51

@jeanouii jeanouii 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.

Thank you

@mattrpav mattrpav added this to the 2026 Security hardening milestone Oct 29, 2026
@mattrpav
mattrpav merged commit babe406 into apache:main Oct 29, 2026
13 checks passed
@mattrpav
mattrpav deleted the amq-amqp-nio-ssl-clientauth branch October 29, 2026 15:09
@github-project-automation github-project-automation Bot moved this from In review to Done in Apache ActiveMQ v6.5.0 Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants