Implement basic IRCv3 SASL PLAIN authentication#501
Open
tsautier wants to merge 1 commit intodrftpd-ng:masterfrom
Open
Implement basic IRCv3 SASL PLAIN authentication#501tsautier wants to merge 1 commit intodrftpd-ng:masterfrom
tsautier wants to merge 1 commit intodrftpd-ng:masterfrom
Conversation
Author
ad3c594 to
9ad0876
Compare
9ad0876 to
50d39c4
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
SiteBot could not connect to modern IRC networks that require IRCv3 SASL authentication. The existing IRC client implementation lacked CAP negotiation and SASL support.
Solution
Implement IRCv3 SASL PLAIN authentication in the SiteBot module without a full library rewrite.
Changes Made
1. Configuration (ServerConfig.java)
_saslUsernameand_saslPasswordfieldsgetSaslUsername()andgetSaslPassword()2. Config Parsing (SiteBotConfig.java)
readProperties()to parseserver.X.sasl.usernameandserver.X.sasl.password3. Connection Logic (SiteBot.java)
CAP LS 302command on connection when SASL credentials are configuredCAP REQ :sasl,CAP ACK,CAP NAK)AUTHENTICATE PLAINwith Base64-encoded credentials903= Success → sendCAP END904/905= Failure → log error and disconnect4. Configuration Template (irc.conf.dist)
Added example configuration:
Usage
server.1.sasl.usernameandserver.1.sasl.passwordinirc.confSITE RELOADFixes: #57