User Tools

Site Tools


why_escape_wildcard_in_dns_aduc_refs

Why are asterisks escaped for wildcards in Martinet DNs/ADUC references?

Distinguished names (DNs) in a directory service allow literal unescaped asterisks in the DN string. For instance, the following could be the DN of an object in the University's Active Directory system:

CN=jbn adsadasda2,OU=*,OU=test\,\+\"\;\<\>,OU=J.B. Nicholson,OU=FC Computers,OU=Field Consulting,OU=Delegated,OU=TechServices,OU=Urbana,DC=ad,DC=uillinois,DC=edu

The deepest-level OU is named * (OU=*) and that asterisk is listed in the DN without being escaped. This is consistent with RFC 2253 section 2.4, the standard description of a distinguished name concerning escaping characters in the DN string. The standard allows, but does not require, escaping asterisks (“Implementations MAY escape other characters.”).1)

Martinet extends DNs via a simple and terse wildcard syntax so that IT Professionals can quickly match multiple directory service objects in certain sections (such as group sections). Thus Martinet needs a way to distinguish between a literal asterisk and an asterisk wildcard. Therefore, Martinet uses a literal asterisk when that doesn't conflict (such as Active Directory Users & Computers (ADUC) references and DNs with asterisks in a directory object name) and an escaped asterisk where a conflict exists (sections that take ADUC references and DNs where one wants to indicate multiple directory service objects):

Martinet syntax Reference type Meaning
CN=jbn adsadasda2,OU=*,OU=test\,\+\"\;\<\>,OU=J.B. Nicholson,OU=FC Computers,OU=Field Consulting,OU=Delegated,OU=TechServices,OU=Urbana,DC=ad,DC=uillinois,DC=edu Distinguished name (DN) reference A literal DN with an OU named *.
ad.uillinois.edu/Urbana/TechServices/Delegated/Field Consulting/FC Computers/J.B. Nicholson/test,+“;<>/*/jbn adsadasda2 Active Directory Users & Computers (ADUC) reference
CN=jbn ad\*,OU=*,OU=test\,\+\"\;\<\>,OU=J.B. Nicholson,OU=FC Computers,OU=Field Consulting,OU=Delegated,OU=TechServices,OU=Urbana,DC=ad,DC=uillinois,DC=edu Distinguished name (DN) reference A wildcard syntax that might match multiple object canonical names beginning with jbn ad.
ad.uillinois.edu/Urbana/TechServices/Delegated/Field Consulting/FC Computers/J.B. Nicholson/test,+”;<>/*/jbn ad\* Active Directory Users & Computers (ADUC) reference

Internally, Martinet translates Active Directory Users & Computers (ADUC) references into DNs. Therefore ADUC asterisks representing wildcards must also be escaped.

1)
Quoting RFC 2253:

“If the UTF-8 string does not have any of the following characters which need escaping, then that string can be used as the string representation of the value.
  • a space or ”#“ character occurring at the beginning of the string
  • a space character occurring at the end of the string
  • one of the characters ”,“, ”+“, ”"“, “\”, ”<“, ”>“ or ”;“
Implementations MAY escape other characters. If a character to be escaped is one of the list shown above, then it is prefixed by a backslash ('\' ASCII 92). Otherwise the character to be escaped is replaced by a backslash and two hex digits, which form a single byte in the code of the character.”
why_escape_wildcard_in_dns_aduc_refs.txt · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki