#10 Add MQTT authentication #140

Closed
b25marem wants to merge 0 commits from #10-mqtt-login into team_2_week_1
Collaborator

Implemmented MQTT authentication in the Mosquitto container

changes made:
disabled anonymous access
added password_file to mosquitto configuration
created a user automatically during container startup
updated mosquitto-init to use eclipse-mosquitto

Current credentails:
username: mqttuser, password: mqttpassword

Tested:
Mosquitto starts successfully with authentication enabled
Anonymous MQTT connections are rejected with NotAuthorized
Existing services fail until they are updated to provide credentials

Note:
Other services are not yet updated to use authentication. it will be handled in a separate task.

Implemmented MQTT authentication in the Mosquitto container changes made: disabled anonymous access added password_file to mosquitto configuration created a user automatically during container startup updated mosquitto-init to use eclipse-mosquitto Current credentails: username: mqttuser, password: mqttpassword Tested: Mosquitto starts successfully with authentication enabled Anonymous MQTT connections are rejected with NotAuthorized Existing services fail until they are updated to provide credentials Note: Other services are not yet updated to use authentication. it will be handled in a separate task.
b25marem changed title from WIP: #10 Add MQTT authentication to #10 Add MQTT authentication 2026-04-07 07:54:35 +00:00
Collaborator

assign me

assign me
Collaborator

All the changes for MQTT authentication look right, they do what they are supposed to do. I have noticed in relation to this change that all other MQTT clients that connect anonymously will most likely fail. I have checked both readTempSensorMockup and middleware and they will likely not work after the change as I cannot see any authentication. So both those files will have to be updated as well in another issue.

All the changes for MQTT authentication look right, they do what they are supposed to do. I have noticed in relation to this change that all other MQTT clients that connect anonymously will most likely fail. I have checked both readTempSensorMockup and middleware and they will likely not work after the change as I cannot see any authentication. So both those files will have to be updated as well in another issue.
Collaborator

A question also: "chmod 0700 /mosquitto/config/passwd" should this be 0600 instead since this is a password file and doesn't need execute permissions?

A question also: "chmod 0700 /mosquitto/config/passwd" should this be 0600 instead since this is a password file and doesn't need execute permissions?
Collaborator

A question: Now the credentials are hardcoded in the file. Is this a safe way or should they be stored in a safer space ( e.g environment variables)?

A question: Now the credentials are hardcoded in the file. Is this a safe way or should they be stored in a safer space ( e.g environment variables)?
Collaborator

New pr was created.

New pr was created.
c24elipe closed this pull request 2026-04-10 07:18:22 +00:00
a24timsv deleted branch #10-mqtt-login 2026-04-17 12:41:31 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K!140
No description provided.