RFC 3088
OpenLDAP Root Service An experimental LDAP referral service
OpenLDAP Root Service ๐
RFC 3088: An experimental LDAP referral service ๐ฆ Network Working Group Author: K. Zeilenga (OpenLDAP Foundation) ๐ Category: Experimental ๐งช Date: April 2001 ๐ This header has no Obsoletes or Updates line, so this doc doesn't replace or update anything. ๐
Status of this Memo ๐
okay so this memo defines an Experimental Protocol for the Internet community ๐งช It is NOT an Internet standard of any kind, and feedback and suggestions for improvement are literally requested ๐ซถ Distribution of this memo is unlimited โจ
Copyright Notice ยฉ๏ธ
Copyright (C) The Internet Society (2001). All Rights Reserved. ๐
Abstract ๐ธ
The OpenLDAP Project runs an experimental LDAP (Lightweight Directory Access Protocol) referral service called the "OpenLDAP Root Service" ๐ฆ An automated system makes referrals from service location info published in DNS SRV RRs (Domain Name System location of services resource records) โจ This doc explains how the service works ๐
1. Background ๐ง
LDAP [RFC2251] directories use a hierarchical naming scheme that was inherited from X.500 [X500] ๐ณ Traditionally, X.500 deployments used a geo-political naming scheme, like CN=Jane Doe,OU=Engineering,O=Example,ST=CA,C=US ๐บ๏ธ But the registration infrastructure and location services in lots of parts of the naming hierarchy are inadequate or just don't exist ๐
Building a global directory needs a robust registration infrastructure and location service ๐ Using Internet domain-based naming [RFC2247] (for example, UID=jdoe,DC=eng,DC=example,DC=net) lets LDAP directory services piggyback on the existing DNS [RFC1034] registration infrastructure ๐ And DNS SRV [RFC2782] resource records can be used to find services [LOCATE] ๐ฅ main character energy for DNS, honestly.
1.1. The Glue ๐งท
Most existing LDAP implementations don't support locating directory services with DNS SRV resource records ๐ญ But most servers do support generating referrals to "superior" server(s) ๐ This service is a "root" LDAP service that servers can use as their superior referral service ๐ซถ
Clients can also use the service directly to find services associated with an arbitrary Distinguished Name [RFC2253] inside the domain-based hierarchy ๐ง
Notice: The mechanisms used by this service are experimental ๐งช The descriptions in this document are not definitive. Definitive mechanisms shall be published in Standard Track document(s). ๐จ
2. Generating Referrals based upon DNS SRV RRs ๐
This service returns referrals that are generated from DNS SRV resource records [RFC2782] โจ
2.1. DN to Domain Name Mapping ๐บ๏ธ
The service maps a DN [RFC2253] to a fully qualified domain name using the algorithm below ๐
domain = null;
foreach RDN left-to-right // [1]
{
if not multi-valued RDN and
RDN.type == domainComponent
{
if ( domain == null || domain == "." )
{ // start
domain = "";
}
else
{ // append separator
domain .= ".";
}
if ( RDN.value == "." )
{ // root
domain = ".";
}
else
{ // append domainComponent
domain .= RDN.value;
}
continue;
}
domain = null;
}
Examples ๐
Distinguished Name Domain
----------------------------- ------------
DC=example,DC=net example.net
UID=jdoe,DC=example,DC=net example.net
DC=. . [2]
DC=example,DC=net,DC=. . [3]
DC=example,DC=.,DC=net net [4]
DC=example.net example.net [5]
CN=Jane Doe,O=example,C=US null
UID=jdoe,DC=example,C=US null
DC=example,O=example,DC=net net
DC=example+O=example,DC=net net
DC=example,C=US+DC=net null
Notes ๐
- A later incarnation will use a Standard Track mechanism. ๐
- A later incarnation of this service may use a right-to-left algorithm. โฉ๏ธ
- RFC 2247 doesn't say how you map the domain that represents the root of the domain tree to a DN ๐คทโโ๏ธ We suggest mapping the root of the domain tree to "DC=." and that this be reversable.
- RFC 2247 says that domain "example.net" should map to the DN "DC=example,DC=net", not to "DC=example,DC=net,DC=." ๐ โโ๏ธ Since it's not our intent to introduce or support an alternative domain-to-DN mapping, the algorithm ignores domainComponents to the left of "DC=.".
- RFC 2247 says that domain "example.net" should map to the DN "DC=example,DC=net", not to "DC=example,DC=.,DC=net" ๐ Same deal: no alternative mappings from us, so the algorithm ignores domainComponents to the left of "DC=." and "DC=." itself if more domainComponents show up on the right.
- RFC 2247 says the value of a DC attribute type is a domain component, so it shouldn't contain multiple domain components ๐ซ A later incarnation of this service may map this domain to null or be coded to return an invalid DN error.
If the domain is null or ".", the service stops further processing and returns noSuchObject ๐ A later incarnation of this service may stop processing if the resulting domain is a top-level domain. ๐
2.2. Locating LDAP services ๐
The root service finds services for a given fully qualified domain name by asking the Domain Name System for LDAP SRV resource records ๐งญ For the domain example.net, the service would issue an SRV query for the domain "_ldap._tcp.example.net" ๐จ A successful query returns one or more resource records that look like this:
_ldap._tcp.example.net. IN SRV 0 0 389 ldap.example.net.
If no LDAP SRV resource records come back, or any DNS error happens, the service stops further processing and returns noSuchObject ๐ฌ Later incarnations of this service will handle transient errors better. ๐ซ
2.3. Constructing an LDAP Referrals ๐งฉ
For each DNS SRV resource record returned for the domain, an LDAP URL [RFC2255] gets built ๐ ๏ธ For the resource record above, the URL would be:
ldap://ldap.example.net:389/
These URLs are then returned in the referral ๐ Right now the URLs get returned in resolver order, which means the server itself doesn't use the priority or weight info in the SRV resource records โ๏ธ A later incarnation of this service may do that. ๐
3. Protocol Operations ๐ฌ
This section explains how the service performs basic LDAP operations ๐ The service supports operations that are extended through certain controls, described in a later section โจ
3.1. Basic Operations ๐งฑ
Basic operations (add, compare, delete, modify, rename, search) return a referral result if the target (or base) DN can be mapped to a set of LDAP URLs as described above ๐ฏ Otherwise, a noSuchObject response or some other appropriate response is returned. ๐
3.2. Bind Operation ๐
The service accepts "anonymous" binds that specify version 2 or version 3 of the protocol ๐ Every other bind request returns a non-successful resultCode ๐ โโ๏ธ In particular, clients that submit clear text credentials get sent an unwillingToPerform resultCode, along with cautionary text about giving passwords to strangers ๐ซฃ bestie, don't hand your password to random servers.
Because this service is read-only, LDAPv3 authentication [RFC2829] is not supported. ๐
3.3. Unbind Operations ๐
When an unbind request is received, the server abandons all outstanding requests made by the client and disconnects. ๐ช
3.4. Extended Operations โจ
The service currently doesn't recognize any extended operation ๐คทโโ๏ธ Later incarnations of the service may support Start TLS [RFC2830] and other operations. ๐
3.5. Update Operations โ๏ธ
A later incarnation of this service may return unwillingToPerform for all update operations, since this is an unauthenticated service. ๐
4. Controls ๐๏ธ
The service supports the ManageDSAit control. Unsupported controls are handled per RFC 2251. ๐
4.1. ManageDSAit Control ๐
The server recognizes and honors the ManageDSAit control [NAMEDREF] when it's provided with operations ๐ซถ
If DNS location information is available for the base DN itself, the service returns unwillingToPerform for non-search operations ๐ซ For search operations, an entry is returned if it's within scope and matches the provided filter. Here's an example:
c: searchRequest {
base="DC=example,DC=net"
scope=base
filter=(objectClass=*)
ManageDSAit
}
s: searchEntry {
dn: DC=example,DC=net
objectClass: referral
objectClass: extensibleObject
dc: example
ref: ldap://ldap.example.net:389/
associatedDomain: example.net
}
s: searchResult {
success
}
If DNS location information is available for the DC portion of a subordinate entry, the service returns noSuchObject with the matchedDN set to the DC portion of the base, for search and update operations ๐ง
c: searchRequest {
base="CN=subordinate,DC=example,DC=net"
scope=base
filter=(objectClass=*)
ManageDSAit
}
s: searchResult {
noSuchObject
matchedDN="DC=example,DC=net"
}
5. Using the Service ๐ท
Servers may be configured to refer superior requests to <ldap://root.openldap.org:389> ๐
Clients can use the service directly, but that's not encouraged ๐ โโ๏ธ Clients should use a local service and only use this one when they're referred to it. ๐ซถ
The service supports LDAPv3 and LDAPv2+ [LDAPv2+] clients over TCP/IPv4 ๐ Future incarnations of this service may support TCP/IPv6 or other transport/internet protocols. ๐ฎ
6. Lessons Learned ๐
6.1. Scaling / Reliability ๐๏ธ
This service currently runs on a single host ๐ฅ๏ธ That host and its associated network resources aren't exhausted yet ๐ช If they do get exhausted, the authors believe they can easily scale to meet demand through common distributed load balancing technics. The service can also easily be duplicated locally. ๐งฌ
6.2. Protocol interoperability ๐ค
This service has been able to avoid known interoperability issues while supporting variants of LDAP ๐ฅฐ
6.2.1. LDAPv3 ๐
The server implements all features of LDAPv3 [RFC2251] that are necessary to provide the service. โ
6.2.2. LDAPv2 ๐ฐ๏ธ
LDAPv2 [RFC1777] doesn't support returning referrals, so it may not be referred to this service ๐ โโ๏ธ An LDAPv2 client could connect and send requests to this service, but it would treat any referral returned to it as an unknown error. ๐
6.2.3. LDAPv2+ ๐ง
LDAPv2+ [LDAPv2+] adds a bunch of extensions to LDAPv2, including referrals โจ Like LDAPv3, LDAPv2+ doesn't require a bind operation before issuing other operations ๐ Since the referral representation differs between LDAPv2+ and LDAPv3, the service returns LDAPv3 referrals in this case. Still, commonly deployed LDAPv2+ clients issue bind requests (for compatibility with LDAPv2 servers), so this hasn't caused any interoperability issues (yet). ๐ค
A future incarnation of this service may drop support for LDAPv2+ (and LDAPv2). ๐
6.2.4. CLDAP ๐
CLDAP [RFC1798] doesn't support returning referrals, so it isn't supported here. ๐ซ
7. Security Considerations ๐โจ
Okay bestie, this is the section where things get real ๐ญ The service gives info to "anonymous" clients ๐ซถ, and that info comes from the public directories, aka the Domain Name System ๐ธ
Authentication would make clients hand info over to the service. That would be an unnecessary invasion of privacy ๐ so no thanks.
No encryption means anyone can eavesdrop on client requests and responses ๐. A later version may support encryption, like via Start TLS [RFC2830] ๐
The service doesn't provide information integrity protection ๐ฌ It's exposed to various forms of DNS spoofing and attacks. LDAP session or operation integrity would give a false sense of security about DNS info, and ngl that's a trap ๐ชค. A later version may support DNSSEC and provide integrity protection (via SASL, TLS, or IPSEC) ๐ฆ
The service is open to a variety of denial of service attacks ๐จ It can block access based on a number of factors, but that capability hasn't been used yet and would likely be ineffective against sophisticated attacks ๐ . Later versions will likely need much better protection from these attacks ๐
8. Conclusions ๐
DNS is good glue ๐ง By leveraging the Domain Name System, global LDAP directories may be built without needing a protocol-specific registration infrastructure.
Also, using DNS service location means global directories can be built "ad hoc" ๐ Anyone with a domain name can participate. There is no requirement that the superior domain participate.
9. Additional Information ๐
More info about the OpenLDAP Project and the OpenLDAP Root Service is at <http://www.openldap.org/> ๐
10. Author's Address ๐
Kurt Zeilenga
OpenLDAP Foundation
EMail: kurt@openldap.org
11. Acknowledgments ๐ซถ
Internet hosting for this experiment is provided by the Internet Software Consortium <http://www.isc.org/>. Computing resources came from Net Boolean Incorporated <http://www.boolean.net/>. This experiment would not have been possible without tons of volunteers from the open source community ๐ป The mechanisms described here are based on the ones introduced in [RFC2247] and [LOCATE] โจ
References ๐
- [RFC1034] Mockapetris, P., "Domain Names - Concepts and Facilities", STD 13, RFC 1034, November 1987.
- [RFC1777] Yeong, W., Howes, T. and S. Kille, "Lightweight Directory Access Protocol", RFC 1777, March 1995.
- [RFC1798] Young, A., "Connection-less Lightweight Directory Access Protocol", RFC 1798, June 1995.
- [RFC2119] Bradner, S., "Key Words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
- [RFC2247] Kille, S., Wahl, M., Grimstad, A., Huber, R. and S. Sataluri, "Using Domains in LDAP/X.500 Distinguished Names", RFC 2247, January 1998.
- [RFC2251] Wahl, M., Howes, T. and S. Kille, "Lightweight Directory Access Protocol (v3)", RFC 2251, December 1997.
- [RFC2253] Wahl, M., Kille, S. and T. Howes, "Lightweight Directory Access Protocol (v3): UTF-8 String Representation of Distinguished Names", RFC 2253, December 1997.
- [RFC2255] Howes, T. and M. Smith, "The LDAP URL Format", RFC 2255, December 1997.
- [RFC2782] Gulbrandsen, A., Vixie, P. and L. Esibov, "A DNS RR for specifying the location of services (DNS SRV)", RFC 2782, February 2000.
- [RFC2829] Wahl, M., Alvestrand, H., Hodges, J. and R. Morgan, "Authentication Methods for LDAP", RFC 2829, May 2000.
- [RFC2830] Hodges, J., Morgan, R. and M. Wahl, "Lightweight Directory Access Protocol (v3): Extension for Transport Layer Security", RFC 2830, May 2000.
- [LOCATE] IETF LDAPext WG, "Discovering LDAP Services with DNS", Work in Progress.
- [LDAPv2+] University of Michigan LDAP Team, "Referrals within the LDAPv2 Protocol", August 1996.
- [NAMEDREF] Zeilenga, K. (editor), "Named Subordinate References in LDAP Directories", Work in Progress.
- [X500] ITU-T Rec. X.500, "The Directory: Overview of Concepts, Models and Service", 1993.
Full Copyright Statement โ๏ธ
Copyright (C) The Internet Society (2001). All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards (in which case the procedures for copyrights defined in the Internet Standards process must be followed), or as required to translate it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgement ๐
Funding for the RFC Editor function is currently provided by the Internet Society ๐
๐ฆ where this page comes from
- ietf: rfc3088 2001-04
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms