Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mosquitto » SSL/TLS or Username and Password Authentication
SSL/TLS or Username and Password Authentication [message #1859702] Thu, 22 June 2023 21:20 Go to next message
MC Potgieter is currently offline MC PotgieterFriend
Messages: 2
Registered: June 2023
Junior Member
I have some devices that needs to authenticate with a certificate but does not have a username or password.

Then I have devices that needs to authenticate with a Username and Password but does not have a certificate.

I'm not sure what is the correction configuration to achieve this.

This is my current configuration:

password_file PathToPasswordFile
cafile PathToCAFile
certfile PathToCertFile
keyfile PathToKeyFile
require_certificate false
use_identity_as_username false
Re: SSL/TLS or Username and Password Authentication [message #1859747 is a reply to message #1859702] Sat, 24 June 2023 16:03 Go to previous message
MC Potgieter is currently offline MC PotgieterFriend
Messages: 2
Registered: June 2023
Junior Member
It seems like the Mosquitto broker does not allow this:

https://github.com/eclipse/mosquitto/issues/1839#issuecomment-707656348

So the next best option will be to run two listeners on the same broker. Each listener having its own authentication configuration. I still need to verify that my message handler can subscribe to messages published from both types of devices. But I guess this should work since it is on the same broker.

Here is my working configuration:

# SSL/TLS with certificate authentication
listener port
use_identity_as_username true
require_certificate true
cafile pathtocafile
certfile pathtocertfile
keyfile pathtokeyfile

# Username and Password authentication
listener port
per_listener_settings true
password_file pathtopasswordfile

[Updated on: Sat, 24 June 2023 16:03]

Report message to a moderator

Previous Topic:QOS 0 question
Next Topic:no stable connection with client
Goto Forum:
  


Current Time: Fri May 03 02:30:49 GMT 2024

Powered by FUDForum. Page generated in 0.02902 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top