Skip to content

auth.server.cafile property specified in config.properties is not working #425

@dlowrey

Description

@dlowrey

Expected behavior

When config.properties contains valid values for:

auth.server.cafile
auth.client.cert
auth.client.key

I should be able to do operations like con, pub, sub without having to specify certificate information.

Actual behavior

When attempting to do a con via the interactive shell (started via mqtt sh), I only get:

No trusted certificate found

My colleagues and I have troubleshooted this all day (on Mac OSX and Windows), and we discovered that if we specify the --ca-cert option (con --ca-cert ...) everything works fine, and the other client certificate values get picked up from the config.properties files correctly.

To Reproduce

Must have a MQTT broker set up for mTLS.

Steps

Specify the below keys with valid values in your config.properties file:

auth.server.cafile
auth.client.cert
auth.client.key

Then start interactive shell

mqtt sh

And try to connect to a broker

con -i myIdentifier

Reproducer code

Details

I think a similar issue was opened previously: #125, and we had some MacOSX users who had no issue with this using 4.13.0, but once they upgraded to 4.29.0 it broke.

  • Affected MQTT CLI version(s): 4.29.0
  • Used JVM version: 11, 23

Metadata

Metadata

Assignees

Labels

tls🔒Is in context with TLS

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions