ServerlessIRCd Docs

Docs home

ADR-006: SASL mechanism scope (PLAIN always; EXTERNAL mTLS-conditional)

Date: 2025-01-20 (Phase 1) · revised 2025-07-27 (TICKET-079) Status: Superseded (TICKET-079) Supersedes: — Superseded by: —

Context

IRCv3 SASL (CAP sasl) lets a client authenticate during registration, before the welcome sequence. The server advertises supported mechanisms in the sasl cap value (e.g. sasl=PLAIN,EXTERNAL). Each mechanism has different infrastructure requirements:

Decision

The server ships SASL PLAIN as the always-available mechanism and SASL EXTERNAL as an mTLS-conditional mechanism:

This means EXTERNAL advertisement and functionality are driven entirely by whether mTLS is configured — operators enable EXTERNAL by configuring edge mTLS, with no code change required. The saslCapValue(hasMtls) helper in caps/capabilities.ts and the supportedMechs(ctx) helper in commands/sasl.ts are the single sources of truth for the advertised value.

AccountStore is a port in irc-core consumed by the SASL reducer. The verify(mechanism, payload) method is synchronous — adapters pre-load credentials at boot so the reducer stays pure (ADR-001). PLAIN verification decodes the base64 payload, extracts username + password, and matches against the store. EXTERNAL verification resolves the cert subject via the MtlsIdentityProvider and matches it against the store.

Consequences

Positive:

Negative:

References