-
-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
coretasks, irc: implement CertFP / SASL EXTERNAL authentication #2100
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nits.
Is there a sane way in stock sopel to have a conversation through the bot? Notably, to command the bot to PRIVMSG NickServ :CERT ADD
for enrollment without needing to configure a regular client or ZNC as the bot to do that. I've always just loaded a hackjob .exec
plugin.
References: |
@half-duplex re: sending commands as Sopel, the |
Heh, this isn't the first time this has come up, I guess it is needed.
|
Actually, thinking about it... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docstrings for auth_target
and server_auth_sasl_mech
should also have EXTERNAL
added as a valid option. Maybe an example in configuration.rst too?
@half-duplex Both of those comments should be addressed by the newest push. |
Well, here's a fun one: |
Hmm, I should probably just leave only the single-stage examples for CertFP.
This is something Exi and I talked about fairly recently. At some point, it would make a ton of sense to rewrite Sopel's auth system to be a bit more flexible. The context was more about adding pluggability, but I imagine that simplification of the settings would come along with it. No one's going to promise that for any particular timeframe, though, so I think it's best to ship CertFP as-is once we iron out the doc details. True, this doesn't fix the confusing auth crap, but it also doesn't make things appreciably worse. |
Description
Tin. Followed Libera's instructions for generating a certificate and added its fingerprint to our official Sopel bot's account in NickServ, then stuck around in my human-operated client to observe. Flawless victory:
Checklist
make qa
(runsmake quality
andmake test
)Note to self
@dgw pls update IRCv3 support info for Sopel when this is merged
Future plans
This lays some groundwork for expanding into SCRAM challenges, as implied by a new TODO comment, but implementing those will take some more research. I had some pseudocode for it in there, but obviously removed it before committing (otherwise linting would probably fail).
As far as actually getting SCRAM into Sopel goes, the options are:
scramp
ortinysasl
(no kidding; the whole library is ~110 lines of code), but I've barely searched for alternativesUsing a library could be our first excuse to give Sopel setuptools extras. (
pip install sopel[scram]
, anyone?)Meanwhile, CertFP is what was explicitly requested on May 29 (May 30 UTC) in our IRC channel, and it turns out that was fairly easy to get done, so it might as well get reviewed and merged without waiting for SCRAM nonsense.