ietf-corpus

rfc-4616

The PLAIN Simple Authentication and Security Layer (SASL) Mechanism

K. Zeilenga (Editor)
date2006-08 streamIETF areasec wgsasl statusPROPOSED STANDARD pages11 canonicalhttps://www.rfc-editor.org/rfc/rfc4616 doi10.17487/RFC4616 errataview
This document defines a simple clear-text user/password Simple Authentication and Security Layer (SASL) mechanism called the PLAIN mechanism. The PLAIN mechanism is intended to be used, in combination with data confidentiality services provided by a lower layer, in protocols that lack a simple password authentication command. [STANDARDS-TRACK]

updated by

updates

Extracted elements (20)

design-rationale §1

Clear-text, multiple-use passwords are chosen because they interoperate with almost all existing operating system authentication databases and facilitate a smooth transition to more secure mechanisms, despite the drawback of being unacceptable over unencrypted connections.

security

design-rationale §2

SASLprep is recommended but not mandatory so that servers may employ other preparation algorithms (including none) when necessary, for example to interoperate with an external authentication system that uses a different scheme.

security

interoperability-note §A

The ABNF grammar (updated from RFC 2595) allows LINE FEED (U+000A) and CARRIAGE RETURN (U+000D) in authzid, authcid, and passwd productions, but whether they may actually be used depends on applicable string preparation rules; for passwd and authcid, control characters are prohibited.

security

interoperability-note §1

The PLAIN mechanism is intended for use in protocols that lack a simple password authentication command (e.g., ACAP, SMTP-AUTH) and is not a replacement for protocols that already have such a command.

security

normative-requirement §1 SHOULD

By default, implementations SHOULD advertise and make use of the PLAIN mechanism only when adequate data security services are in place (e.g., TLS).

security, tls

normative-requirement §2 REQUIRED

Regardless of the preparation algorithm used, if preparation fails or results in an empty string, verification SHALL fail.

security

normative-requirement §2 MUST

Regardless of the preparation algorithm used, if the output of a non-invertible function (e.g., hash) of the expected string is stored, the string MUST be prepared before input to that function.

security, crypto

normative-requirement §2 MUST

Servers MUST be capable of accepting authzid, authcid, and passwd productions up to and including 255 octets. Note that a single Unicode character may encode to up to 4 UTF-8 octets.

security

normative-requirement §1 MUST

Specifications for IETF protocols that indicate PLAIN is an applicable authentication mechanism MUST mandate that implementations support a strong data security service such as TLS.

security, tls

normative-requirement §2 REQUIRED

The authzid, authcid, passwd, and NUL delimiters SHALL be transferred as UTF-8 encoded strings of Unicode characters.

security

normative-requirement §2 MUST NOT

The NUL (U+0000) character MUST NOT appear in the authzid, authcid, or passwd productions because it is used as the field delimiter.

security

normative-requirement §2 RECOMMENDED

The SASLPrep profile of StringPrep is the RECOMMENDED preparation algorithm for both presented and stored authentication identity and password strings before verification.

security

protocol-element §2

SASLprep preparation is applied differently to presented strings (treated as 'query' strings — unassigned code points allowed) versus database strings (treated as 'stored' strings — unassigned code points prohibited).

security

protocol-element §2

The authorization identity (authzid) is optional; when absent, the server derives the authorization identity from the prepared representation of the authentication identity (authcid). The authzid form is specific to the application-level SASL profile.

security

protocol-element §2

The PLAIN SASL mechanism is a single-message mechanism: the client sends one message to the server containing authzid, authcid, and passwd; the server verifies the credentials and the authorization identity, then authenticates the user if both checks succeed.

security

registry §6

The IANA SASL Mechanism registry entry for PLAIN has been updated to reference RFC 4616 as the technical specification, with intended usage COMMON and IESG as author/change controller.

registry, security

security-consideration §5

General SASL security considerations, as well as Unicode, UTF-8, and StringPrep security considerations, all apply to the PLAIN mechanism.

security

security-consideration §5 SHOULD NOT

The PLAIN mechanism provides no integrity or confidentiality protections itself. By default, implementations SHOULD NOT advertise and SHOULD NOT make use of PLAIN unless adequate data security services (e.g., TLS) are in place.

security, tls

security-consideration §5

When the PLAIN mechanism is used, the server gains the ability to impersonate the user to all services sharing the same password, regardless of any TLS encryption. Clients are encouraged to have an operational mode where all mechanisms that reveal the user's password to the server are disabled.

security, privacy

wire-format §2

The PLAIN mechanism client message consists of an optional authzid, a NUL (U+0000) delimiter, the authcid, another NUL delimiter, and the passwd — all UTF-8 encoded Unicode strings. ABNF: message = [authzid] UTF8NUL authcid UTF8NUL passwd.

security, crypto