The PLAIN Simple Authentication and Security Layer (SASL) Mechanism
RFC 4616

Document Type RFC - Proposed Standard (August 2006; Errata)
Updates RFC 2595
Author Kurt Zeilenga 
Last updated 2015-10-14
Stream Internent Engineering Task Force (IETF)
Formats plain text html pdf htmlized (tools) htmlized bibtex
Stream WG state (None)
Document shepherd No shepherd assigned
IESG IESG state RFC 4616 (Proposed Standard)
Action Holders
Consensus Boilerplate Unknown
Telechat date
Responsible AD Sam Hartman
Send notices to (None)
Network Working Group                                   K. Zeilenga, Ed.
Request for Comments: 4616                           OpenLDAP Foundation
Updates: 2595                                                August 2006
Category: Standards Track

  The PLAIN Simple Authentication and Security Layer (SASL) Mechanism

Status of This Memo

   This document specifies an Internet standards track protocol for the
   Internet community, and requests discussion and suggestions for
   improvements.  Please refer to the current edition of the "Internet
   Official Protocol Standards" (STD 1) for the standardization state
   and status of this protocol.  Distribution of this memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (2006).


   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

Zeilenga                    Standards Track                     [Page 1]
RFC 4616                The PLAIN SASL Mechanism             August 2006

1.  Introduction

   Clear-text, multiple-use passwords are simple, interoperate with
   almost all existing operating system authentication databases, and
   are useful for a smooth transition to a more secure password-based
   authentication mechanism.  The drawback is that they are unacceptable
   for use over network connections where data confidentiality is not

   This document defines the PLAIN Simple Authentication and Security
   Layer ([SASL]) mechanism for use in protocols with no clear-text
   login command (e.g., [ACAP] or [SMTP-AUTH]).  This document updates
   RFC 2595, replacing Section 6.  Changes since RFC 2595 are detailed
   in Appendix A.

   The name associated with this mechanism is "PLAIN".

   The PLAIN SASL mechanism does not provide a security layer.

   The PLAIN mechanism should not be used without adequate data security
   protection as this mechanism affords no integrity or confidentiality
   protections itself.  The mechanism is intended to be used with data
   security protections provided by application-layer protocol,
   generally through its use of Transport Layer Security ([TLS])

   By default, implementations SHOULD advertise and make use of the
   PLAIN mechanism only when adequate data security services are in
   place.  Specifications for IETF protocols that indicate that this
   mechanism is an applicable authentication mechanism MUST mandate that
   implementations support an strong data security service, such as TLS.

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   document are to be interpreted as described in [Keywords].

2.  PLAIN SASL Mechanism

   The mechanism consists of a single message, a string of [UTF-8]
   encoded [Unicode] characters, from the client to the server.  The
   client presents the authorization identity (identity to act as),
   followed by a NUL (U+0000) character, followed by the authentication
   identity (identity whose password will be used), followed by a NUL
   (U+0000) character, followed by the clear-text password.  As with
   other SASL mechanisms, the client does not provide an authorization
   identity when it wishes the server to derive an identity from the
   credentials and use that as the authorization identity.

Zeilenga                    Standards Track                     [Page 2]
RFC 4616                The PLAIN SASL Mechanism             August 2006

   The formal grammar for the client message using Augmented BNF [ABNF]

   message   = [authzid] UTF8NUL authcid UTF8NUL passwd
   authcid   = 1*SAFE ; MUST accept up to 255 octets
   authzid   = 1*SAFE ; MUST accept up to 255 octets
   passwd    = 1*SAFE ; MUST accept up to 255 octets
   UTF8NUL   = %x00 ; UTF-8 encoded NUL character

   SAFE      = UTF1 / UTF2 / UTF3 / UTF4
               ;; any UTF-8 encoded Unicode character except NUL

   UTF1      = %x01-7F ;; except NUL
   UTF2      = %xC2-DF UTF0
   UTF3      = %xE0 %xA0-BF UTF0 / %xE1-EC 2(UTF0) /
               %xED %x80-9F UTF0 / %xEE-EF 2(UTF0)
   UTF4      = %xF0 %x90-BF 2(UTF0) / %xF1-F3 3(UTF0) /
               %xF4 %x80-8F 2(UTF0)
   UTF0      = %x80-BF

   The authorization identity (authzid), authentication identity
   (authcid), password (passwd), and NUL character deliminators SHALL be
   transferred as [UTF-8] encoded strings of [Unicode] characters.  As
   the NUL (U+0000) character is used as a deliminator, the NUL (U+0000)
   character MUST NOT appear in authzid, authcid, or passwd productions.

   The form of the authzid production is specific to the application-
   level protocol's SASL profile [SASL].  The authcid and passwd
Show full document text