-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All MQTT connections have usernames and passwords
Previously, only connections coming from Relays had usernames and passwords associated with them; any connection from Cog itself had neither. We would distinguish between them by examining which host the connection was coming from; if it was 127.0.0.1, we treated it like it was a Cog connection, and like a Relay connection (which needed to be authenticated) otherwise. This would cause Cog to crash if a Relay process was running on the same host as Cog, and if it tried to connect prior to being registered with Cog. Now, _all_ connections have a username and password associated with them. All Cog-initiated connections have a username of `COG_INTERNAL`, and use a randomly-generated password that is generated at Cog startup, allowing us to properly distinguish between Cog connections and Relay connections. Fixes #1034
- Loading branch information
1 parent
70ccc40
commit 8827428
Showing
4 changed files
with
51 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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