RFC 4514: Lightweight Directory Access Protocol (LDAP): String Representation of Distinguished Names

2026-05-06

RFC: RFC 4514

Published: 2006

Authors: Kurt D. Zeilenga (Editor)

Every time you inspect a TLS certificate and see something like CN=example.com,O=Example Inc,L=San Francisco,ST=California,C=US, you are looking at an LDAP Distinguished Name in its RFC 4514 string form. Most engineers read these strings every week without ever consulting the grammar that defines them — and that grammar has more sharp edges than people expect.

The problem it solves. LDAP (and X.500 before it) represents directory entries as a tree, where each node has a Relative Distinguished Name (RDN) like CN=Alice. A full Distinguished Name is the path from a node up to the root. Internally, DNs are structured ASN.1 — a sequence of sequences of attribute/value pairs. RFC 4514 specifies a single canonical text serialization so tools, logs, certificates, ACLs, and configuration files can all agree on what a DN looks like.

Key design decisions.

What it replaced. RFC 4514 obsoletes RFC 2253, which obsoleted RFC 1779. Each revision tightened ambiguities around Unicode handling, whitespace, and how strict parsers should be. RFC 4514 was part of the larger 2006 LDAP rewrite (RFCs 4510–4519) that finally turned LDAP from a sprawling pile of drafts into a coherent suite.

Why it matters today. You probably touch RFC 4514 every day:

The security gotcha. Because parsers differ, naïve string comparison of DNs is dangerous. A certificate with CN=admin\,O=Evil can look very different to two libraries: one sees a single CN containing a comma, another sees two RDNs. This has produced real CVEs. RFC 4514 is clear that DN matching must happen on the structured form, not on the string — advice that gets ignored regularly.

Why it matters: RFC 4514 is the silent grammar behind every TLS certificate Subject line and every LDAP bind, and getting its escaping rules wrong is a recurring source of authentication bypasses.

All newsletters