Page MenuHomePhabricator

wikibugs should authenticate using SASL
Closed, ResolvedPublic

Description

I'm not aware of any instances where we failed to auth to nickserv, but SASL will make that impossible. It'll also make sure we don't send any messages until we've successfully authed.

See also discussion on {T275594}.

Event Timeline

We use a server password to login, cf. https://freenode.net/kb/answer/registration#logging-in. The login sequence looks like this:

2021-02-22 06:02:06,165 - irc3.wikibugs - ERROR - [Errno 104] Connection reset by peer
[...]
2021-02-22 06:02:09,357 - irc3.wikibugs - INFO - Connected
2021-02-22 06:02:09,358 - irc3.wikibugs - DEBUG - > PASS pywikibugs:<REMOVED>
2021-02-22 06:02:09,358 - irc3.wikibugs - DEBUG - > USER wikibugs2 irc.freenode.net irc.freenode.net :Wikibugs v2.1, https://tools.wmflabs.org/wikibugs/ ,running on tools-sgeexec-0916.tools.eqiad.wmflabs^M
NICK wikibugs
2021-02-22 06:02:09,358 - irc3.wikibugs - DEBUG - CONNECT ping-pong ()
2021-02-22 06:02:16,333 - irc3.wikibugs - INFO - Trying to join #wikimedia-cloud
2021-02-22 06:02:16,333 - irc3.wikibugs - DEBUG - > JOIN #wikimedia-cloud

i.e. even though we don't use SASL, we authenticate before we even send the USER command. I'm not 100% sure what happens in case authentication fails, but presumably the entire connection then fails.

I'm not 100% sure what happens in case authentication fails, but presumably the entire connection then fails.

The connection will succeed, but the bot will not be logged in:

:weber.freenode.net NOTICE * :*** Looking up your hostname...
:weber.freenode.net NOTICE * :*** Checking Ident
:weber.freenode.net NOTICE * :*** Found your hostname
:weber.freenode.net NOTICE * :*** No Ident response
PASS stwalkerster:notmypassword
USER test * * :test
NICK stwalkerster_
:weber.freenode.net 001 stwalkerster_ :Welcome to the freenode Internet Relay Chat Network stwalkerster_
[...]
:NickServ!NickServ@services. NOTICE stwalkerster_ :Invalid password for stwalkerster.