RFC 1464
Using the Domain Name System To Store Arbitrary String Attributes
RFC 1464: Using the Domain Name System To Store Arbitrary String Attributes ๐ฆ
okay bestie, this is RFC 1464 ๐ from May 1993. It came out of the Network Working Group and was written by R. Rosenbaum (signing off as Rich Rosenbaum in the address section) at Digital Equipment Corporation ๐ผ. The category is an Experimental Protocol ๐งช, so it's a "try it and tell us" kinda vibe. The header doesn't list anything it obsoletes or updates, so no drama there ๐.
Status of this Memo โจ
This memo defines an Experimental Protocol for the Internet community ๐งช. They're literally asking for discussion and suggestions for improvement, so speak up! For the standardization state and status of this protocol, check the current edition of the "IAB Official Protocol Standards" ๐. Distribution of this memo is unlimited ๐.
Abstract ๐
okay so the Domain Name System (DNS) [2,3] is mostly used to store predefined stuff, like addresses of hosts ๐ . but it's totally possible to use it for info nobody has classified yet ๐. this paper describes a simple way to attach arbitrary string info (ASCII text) to attributes the DNS hasn't defined. it uses DNS TXT resource records to store the info, and it needs zero changes to current DNS implementations ๐ .
1. Introduction โจ
the Domain Name System is built to hold stuff with a predefined type and structure, like IP addresses of hosts and names of mail exchangers ๐ฌ. it would be super useful to tap into the DNS's widespread use and scaleability to store info that hasn't been defined before ๐ธ.
this paper proposes using the DNS TXT resource record (defined in STD 13, RFC 1035) to hold new types of info ๐. the main perk is that it needs no change to most existing DNS servers ๐. it is not trying to replace the process for defining and implementing new resource records ๐ซถ.
2. Format of TXT record ๐
okay so the TXT record uses a structured format in its TXT-DATA field ๐ง . it's the attribute name, then the value of the attribute, and the two are split by an equals sign (=) โ๏ธ.
here are some TXT records using attributes like that ๐
host.widgets.com IN TXT "printer=lpr5"
sam.widgets.com IN TXT "favorite drink=orange juice"
the general syntax is:
<owner> <class> <ttl> TXT "<attribute name>=<attribute value>"
Attribute Names
any printable ASCII character is allowed in the attribute name ๐ค. if an equals sign is embedded in the attribute name, it MUST be quoted with a preceding grave accent (or backquote: `) ๐
. and a backquote MUST also be quoted with an additional ` ๐
.
Attribute Name Matching Rules
the attribute name is case-insensitive ๐. so a lookup for "Favorite Drink" would match a TXT record containing "favorite drink=Earl Grey tea" ๐ซ.
during lookups, TXT records without an unquoted "=" get ignored ๐. TXT records that seem to have a null attribute name (so the TXT-DATA starts with the character "=") also get ignored ๐ซ.
leading and trailing whitespace (spaces and tabs) in the attribute name gets ignored unless it's quoted (with a `) โจ. for example, "abc" matches " abc<tab>" but does not match "` abc" ๐
.
heads up though: most DNS server implementations want a backslash (\) or double quote (") in a text string quoted with a preceding backslash ๐. that's why accent grave (`) got picked as the quoting character here: to avoid confusion with \ and skip the need for messy strings like \\\\ ๐งน.
Attribute Values
all printable ASCII characters are allowed in the attribute value ๐จ. no characters need quoting with a ` ๐. so the first unquoted equals sign in the TXT record is the name/value delimiter, and everything after it is part of the value ๐.
once again, in most implementations the backslash is an active quoting character (and MUST, itself, be quoted) ๐.
all whitespace in the attribute value gets returned to the requestor, and it's up to the application to decide if it matters ๐คท.
Examples
<sp> means a space character ๐ซง.
Attribute Attribute Internal Form External Form
Name Value (server to resolver) (TXT record)
color blue color=blue "color=blue"
equation a=4 equation=a=4 "equation=a=4"
a=a true a`=a=true "a`=a=true"
a\=a false a\`=a=false "a\\`=a=false"
= \= `==\= "`==\\="
string "Cat" string="Cat" "string=\"Cat\""
string2 `abc` string2=``abc`` "string2=``abc``"
novalue novalue= "novalue="
a b c d a b=c d "a b=c d"
abc<sp> 123<sp> abc` =123<sp> "abc` =123 "
3. Application Usage ๐ ๏ธ
the attributes can be reached through the standard resolver library, but it is RECOMMENDED that you use a library routine built specially for this attribute format ๐. that routine might give you something like gethostbyname:
getattributebyname(objectname, name of object
attributename, name of attribute
attributevalue, pointer to buffer
attributevaluelen) length of buffer
this routine would strip out all the quoting characters before handing the info back to the caller ๐งน. a fancier routine could return attributes with multiple values, or several different attributes at once ๐.
4. Attribute Name Registration ๐
to make interop easier and cut down on naming conflicts, a registration process for well-known attribute names might get set up ๐ค. it could be a periodically updated list of names, and/or follow other name registration mechanisms, like published object identifiers ๐๏ธ. this paper does not cover attribute name registration ๐ .
5. Restrictions ๐ง
some DNS server implementations put limits on the size or number of TXT records tied to a particular owner ๐. certain implementations MAY not support TXT records at all ๐.
6. REFERENCES and BIBLIOGRAPHY ๐
here are all the citations, bestie ๐ซถ:
- [1] Stahl, M., "Domain Administrators Guide", RFC 1032, Network Information Center, SRI International, November 1987.
- [2] Mockapetris, P., "Domain Names - Concepts and Facilities", STD 13, RFC 1034, USC/Information Sciences Institute, November 1987.
- [3] Mockapetris, P., "Domain Names - Implementation and Specification", STD 13, RFC 1035, USC/Information Sciences Institute, November 1987.
- [4] Mockapetris, P., "DNS Encoding of Network Names and Other Types", RFC 1101, USC/Information Sciences Institute, April 1989.
7. Security Considerations ๐
security issues are not discussed in this memo ๐. bestie, that's the whole section, so don't go assuming it covers anything it doesn't. this one is serious business ๐ญ.
8. Author's Address ๐ฎ
Rich Rosenbaum
Digital Equipment Corporation
550 King Street, LKG2-2/Z7
Littleton, MA 01460-1289
Phone: 508-486-5922
Email: rosenbaum@lkg.dec.com
๐ฆ where this page comes from
- ietf: rfc1464 1993-05
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms