RFC 5803
Lightweight Directory Access Protocol (LDAP) Schema for Storing Salted Challenge Response Authentication Mechanism (SCRAM) Secrets
Okay bestie, let's get into it! π
- RFC number: 5803 π¦
- Authors: A. Melnikov, from Isode Limited π
- Category: Informational πΈ
- Date: July 2010 π
- ISSN: 2070-1721
- Obsoletes / Updates: the header doesn't list either one, so this doc doesn't obsolete or update anything π
Lightweight Directory Access Protocol (LDAP) Schema for Storing Salted Challenge Response Authentication Mechanism (SCRAM) Secrets β¨
Abstract π
Okay so this memo explains how the "authPassword" Lightweight Directory Access Protocol (LDAP) attribute can be used to store the secrets that the Salted Challenge Response Authentication Mechanism (SCRAM) uses, inside the Simple Authentication and Security Layer (SASL) framework. It's giving organized storage for auth secrets π
Status of This Memo π
Quick heads up: this document is not an Internet Standards Track specification. It's published just for informational purposes β¨
This doc is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community, it got public review, and the Internet Engineering Steering Group (IESG) approved it for publication. Not every document the IESG approves is a candidate for any level of Internet Standard, so check Section 2 of RFC 5741 for that π§
If you want info on the current status of this document, any errata, or how to send feedback, go to http://www.rfc-editor.org/info/rfc5803 π
Copyright Notice π¦
Copyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved. π
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as they stand on the publication date. Read these carefully, bestie, because they spell out your rights and restrictions for this doc π
Code Components pulled out of this document must include the Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions. They come with no warranty, as the Simplified BSD License describes π
Table of Contents π§
1. Overview ........................................................2
2. Conventions Used in This Document ...............................3
3. Security Considerations .........................................3
4. Acknowledgements ................................................4
5. Normative References ............................................4
1. Overview β¨
Okay so this doc is all about how the authPassword LDAP attribute [AUTHPASS] can store the secrets that [SCRAM] Simple Authentication and Security Layer [RFC4422] Mechanisms use. It's lowkey the whole point π₯
The "scheme" part of the authPassword attribute is the SCRAM mechanism name, always without the "-PLUS" suffix, e.g., "SCRAM-SHA-1". See [SCRAM] for the exact syntax of SCRAM mechanism names.
The "authInfo" part of the authPassword attribute is the iteration count (iter-count in the ABNF below), followed by ":" and base64-encoded [BASE64] salt.
The "authValue" part of the authPassword attribute is the base64-encoded [BASE64] StoredKey [SCRAM], followed by ":" and base64-encoded [BASE64] ServerKey [SCRAM].
The syntax can be written in ABNF [RFC5234] π Non-terminal references in the ABNF below are defined in [AUTHPASS], [RFC4422], or [RFC5234]. Here's the ABNF:
scram-mech = "SCRAM-SHA-1" / scram-mech-ext
; Complies with ABNF for <scheme>
; defined in [AUTHPASS].
scram-authInfo = iter-count ":" salt
; Complies with ABNF for <authInfo>
; defined in [AUTHPASS].
scram-authValue = stored-key ":" server-key
; Complies with ABNF for <authValue>
; defined in [AUTHPASS].
iter-count = %x31-39 *DIGIT
; SCRAM iteration count.
; A positive number without leading zeros.
salt = <base64-encoded value>
stored-key = <base64-encoded value>
; See definition in [SCRAM].
server-key = <base64-encoded value>
; See definition in [SCRAM].
scram-mech-ext = "SCRAM-" 1*9mech-char
; Other SCRAM mechanisms registered
; in the IANA registry for SASL
; mechanism names.
mech-char = <Defined in RFC 4422>
Also, a lil detail to note π The authPassword attribute is multivalued! So it can hold multiple SCRAM hashes for different hashing algorithms πΈ
2. Conventions Used in This Document π¦
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. Those are the BCP 14 key words, so pay attention to them π
3. Security Considerations π
Okay this section is SERIOUS, so read it carefully π This document defines how the authPassword attribute can be used to store SCRAM secrets. So the security considerations for [SCRAM] and the hash functions used with it are also relevant here π
General security considerations for the authPassword attribute (as specified in [AUTHPASS]) also apply to using authPassword the way this document describes. Most importantly, the values of authPassword SHOULD be protected as if they were cleartext passwords π¨ If a read of this attribute isn't protected by a privacy layer (like IPsec or TLS), an attacker can see it, and that's bad news in two ways:
- An attacker who can use the intercepted value to impersonate the user to every server that offers SCRAM access, using the same hash function, password, iteration count, and salt, can do real damage π±
- An attacker who can run an offline dictionary or brute-force attack can recover the user's password π
Servers MUST validate the format of the authPassword attribute before using it for a SCRAM authentication exchange π«Ά It's possible that an attacker compromised the LDAP server, or got access to the entry that holds the attribute, to exploit a vulnerability in the subsystem doing the SCRAM exchange. Big iteration counts and invalid base64 encoding are two possible exploits (but not the only ones) in the format this document specifies π
4. Acknowledgements π
The author gratefully acknowledges the feedback from Chris Newman, Kurt Zeilenga, Chris Lonvick, Peter Saint-Andre, Barry Leiba, and Chris Ridd. Thank you, besties π«Άπ
5. Normative References π
[AUTHPASS] Zeilenga, K., "LDAP Authentication Password Schema",
RFC 3112, May 2001.
[BASE64] Josefsson, S., "The Base16, Base32, and Base64 Data
Encodings", RFC 4648, October 2006.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC4422] Melnikov, A. and K. Zeilenga, "Simple Authentication and
Security Layer (SASL)", RFC 4422, June 2006.
[RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234, January 2008.
[SCRAM] Menon-Sen, A., Newman, C., Melnikov, A., and N. Williams,
"Salted Challenge Response Authentication Message (SCRAM)
SASL Mechanisms", RFC 5802, July 2010.
Author's Address π§
Alexey Melnikov
Isode Limited
5 Castle Business Village
36 Station Road
Hampton, Middlesex TW12 2BX
UK
EMail: alexey.melnikov@isode.com
URI: http://www.melnikov.ca/
That's the whole RFC, bestie! Iconic work πβ¨π
π¦ where this page comes from
- ietf: rfc5803 2010-07
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms