Add the SASL PLAIN verification exchange

fedserv now handles the SASL exchange an ircd relays over ENCAP (modes H/S/C/D):
on PLAIN it answers the empty challenge, decodes the client payload, and verifies
the credentials against the account store, replying D S or D F. Wiring the
account login on success and advertising the mechanism list to the ircd are the
remaining integration steps.
This commit is contained in:
Jean Chevronnet 2026-07-11 21:18:42 +00:00
parent 18a28ed49b
commit 63028d99e5
No known key found for this signature in database
5 changed files with 96 additions and 1 deletions

View file

@ -14,6 +14,8 @@ pub enum NetEvent {
Quit { uid: String },
// An ircd relaying an IRCv3 account-registration request to us as the authority.
AccountRequest { reqid: String, origin: String, kind: String, account: String, p2: String, p3: String },
// An ircd relaying a SASL exchange step to us (the SASL agent). mode = H/S/C/D.
Sasl { client: String, agent: String, mode: String, data: Vec<String> },
Unknown { line: String },
}
@ -27,6 +29,8 @@ pub enum NetAction {
Privmsg { from: String, to: String, text: String },
Notice { from: String, to: String, text: String },
AccountResponse { reqid: String, kind: String, account: String, status: String, code: String, message: String },
// A SASL exchange step back to the ircd, sourced from our SASL agent. mode = C/D.
Sasl { agent: String, client: String, mode: String, data: Vec<String> },
Raw(String),
}