/[suikacvs]/webroot/www/2004/id/draft-ietf-urn-dns-rds-00.txt
Suika

Contents of /webroot/www/2004/id/draft-ietf-urn-dns-rds-00.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Jun 15 08:04:06 2004 UTC (20 years, 10 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/plain
New

1
2 Network Working Group M. Mealling
3 Internet Draft Network Solutions, Inc.
4 draft-ietf-urn-dns-rds-00.txt R. Daniel
5 Category: Standards Track DATAFUSION, Inc.
6 Expires: May, 1999
7
8
9 Resolution of Uniform Resource Identifiers
10 using the Domain Name System
11
12 Status of this Memo
13 ===================
14
15 This document is an Internet-Draft. Internet-Drafts are working
16 documents of the Internet Engineering Task Force (IETF), its
17 areas, and its working groups. Note that other groups may also
18 distribute working documents as Internet-Drafts.
19
20 Internet-Drafts are draft documents valid for a maximum of six
21 months and may be updated, replaced, or obsoleted by other
22 documents at any time. It is inappropriate to use Internet-
23 Drafts as reference material or to cite them other than as
24 "work in progress."
25
26 To view the entire list of current Internet-Drafts, please check
27 the "1id-abstracts.txt" listing contained in the Internet-Drafts
28 Shadow Directories on ftp.is.co.za (Africa), ftp.nordu.net
29 (Northern Europe), ftp.nis.garr.it (Southern Europe),
30 munnari.oz.au (Pacific Rim), ftp.ietf.org (US East Coast), or
31 ftp.isi.edu (US West Coast).
32
33 Abstract:
34 =========
35
36 The architectural principles laid out in RFC2276 [15] defines the
37 concept of a "resolver discovery service". This document describes
38 an immediately-deployable RDS. It is implemented by a new DNS Resource
39 Record, NAPTR (Naming Authority PoinTeR) [16], that provides a method
40 for encoding incrementally discovered rules within DNS. By using
41 these incrementally discovered rules to re-map parts of a URI, we
42 can change the host that is contacted to resolve a URI. This will
43 allow a more graceful handling of URLs over long time periods, and
44 forms the foundation for a new proposal for Uniform Resource Names.
45
46
47
48 Mealling & Daniel [Page 1]
49
50 RFC nnnn Resolution of URIs Using the DNS November 1998
51
52 In addition to locating resolvers, the NAPTR provides for other
53 naming systems to be grandfathered into the URN world, provides
54 independence between the name assignment system and the resolution
55 protocol system, and allows multiple services (Identifier to
56 Location, Identifier to Description, Identifier to Resource, ...)
57 to be offered. In conjunction with the SRV RR, the NAPTR record
58 allows those services to be replicated for the purposes of fault
59 tolerance and load balancing.
60
61 Introduction:
62 =============
63
64 Uniform Resource Locators have been a significant advance in
65 retrieving Internet-accessible resources. However, their brittle
66 nature over time has been recognized for several years. The Uniform
67 Resource Identifier working group proposed the development of Uniform
68 Resource Names to serve as persistent, location-independent
69 identifiers for Internet resources in order to overcome most of the
70 problems with URLs. RFC-1737 [1] sets forth requirements on URNs.
71
72 During the lifetime of the URI-WG, a number of URN proposals were
73 generated. The developers of several of those proposals met in a
74 series of meetings, resulting in a compromise known as the Knoxville
75 framework. The major principle behind the Knoxville framework is
76 that the resolution system must be separate from the way names are
77 assigned. This is in marked contrast to most URLs, which identify the
78 host to contact and the protocol to use. Readers are referred to [2]
79 for background on the Knoxville framework and for additional
80 information on the context and purpose of this proposal.
81
82 Separating the way names are resolved from the way they are
83 constructed provides several benefits. It allows multiple naming
84 approaches and resolution approaches to compete, as it allows
85 different protocols and resolvers to be used. There is just one
86 problem with such a separation - how do we resolve a name when it
87 can't give us directions to its resolver?
88
89 For the short term, DNS is the obvious candidate for the resolution
90 framework, since it is widely deployed and understood. However, it is
91 not appropriate to use DNS to maintain information on a per-resource
92 basis. First of all, DNS was never intended to handle that many
93 records. Second, the limited record size is inappropriate for catalog
94 information. Third, domain names are not appropriate as URNs.
95
96 Therefore our approach is to use DNS to locate "resolvers" that can
97 provide information on individual resources, potentially including
98 the resource itself. To accomplish this, we "rewrite" the URI into a
99 domain name following the rules found in NAPTR records. Rewrite
100 rules provide considerable power, which is important when trying to
101 meet the goals listed above. However, collections of rules can become
102 difficult to understand. To lessen this problem, the NAPTR rules are
103 *always* applied to the original URI, *never* to the output of
104 previous rules.
105
106
107
108 Mealling & Daniel [Page 2]
109
110 RFC nnnn Resolution of URIs Using the DNS November 1998
111
112 Terminology
113 ===========
114
115 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
116 NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
117 "OPTIONAL" in this document are to be interpreted as described in
118 RFC 2119.
119
120 Overview of the NAPTR Record
121 ============================
122
123 The NAPTR record is defined in RFCXXXX [16]. To summarize, the key
124 fields in the NAPTR RR are Order, Preference, Service, Flags, Regexp,
125 and Replacement:
126
127 * The order field specifies the order in which records MUST be
128 processed when multiple NAPTR records are returned in response to a
129 single query. A naming authority may have delegated a portion of
130 its namespace to another agency. Evaluating the NAPTR records in
131 the correct order is necessary for delegation to work properly.
132
133 * The preference field specifies the order in which records SHOULD be
134 processed when multiple NAPTR records have the same value of
135 "order". This field lets a service provider specify the order in
136 which resolvers are contacted, so that more capable machines are
137 contacted in preference to less capable ones.
138
139 * The service field specifies the resolution protocol and resolution
140 service(s) that will be available if the rewrite specified by the
141 regexp or replacement fields is applied. Resolution protocols are
142 the protocols used to talk with a resolver. They will be specified
143 in other documents, such as [5]. Resolution services are operations
144 such as I2R (URI to Resource), I2L (URI to URL), I2C (URI to URC),
145 etc. These are specified in the URI Resolution Services
146 document[6], and their behavior in a particular resolution protocol
147 will be given in the specification for that protocol (see [5] for a
148 concrete example).
149
150 * The flags field contains modifiers that affect what happens in the
151 next DNS lookup, typically for optimizing the process. Flags may
152 also affect the interpretation of the other fields in the record,
153 therefore, clients MUST skip NAPTR records which contain an unknown
154 flag value.
155
156 * The regexp field is one of two fields used for the rewrite rules,
157 and is the core concept of the NAPTR record. The regexp field is a
158 String containing a sed-like substitution expression. (The actual
159 grammar for the substitution expressions is given later in this
160 draft). The substitution expression is applied to the original URN
161 to determine the next domain name to be queried. The regexp field
162 should be used when the domain name to be generated is conditional
163 on information in the URI. If the next domain name is always known,
164 which is anticipated to be a common occurrence, the replacement
165 field should be used instead.
166
167
168
169 Mealling & Daniel [Page 3]
170
171 RFC nnnn Resolution of URIs Using the DNS November 1998
172
173 * The replacement field is the other field that may be used for the
174 rewrite rule. It is an optimization of the rewrite process for the
175 case where the next domain name is fixed instead of being
176 conditional on the content of the URI. The replacement field is a
177 domain name (subject to compression if a DNS sender knows that a
178 given recipient is able to decompress names in this RR type's RDATA
179 field). If the rewrite is more complex than a simple substitution
180 of a domain name, the replacement field should be set to . and the
181 regexp field used.
182
183 Note that the client applies all the substitutions and performs all
184 lookups, they are not performed in the DNS servers. Note also that it
185 is the belief of the developers of this document that regexps should
186 rarely be used. The replacement field seems adequate for the vast
187 majority of situations. Regexps are only necessary when portions of a
188 namespace are to be delegated to different resolvers. Finally, note
189 that the regexp and replacement fields are, at present, mutually
190 exclusive. However, developers of client software should be aware
191 that a new flag might be defined which requires values in both
192 fields.
193
194 The Distinction between URNs and URLs
195 =====================================
196
197 From the point of view of this system, there is no theoretical
198 difference between resolving URIs in the general case and URNs
199 in the specific case. Operationally however, there is a difference
200 that stems from the unknown case of URI resolution not becoming
201 widespread. If URN resolution is collapsed into generic URI
202 resolution, URNs may suffer by the lack of adoption of URI resolution.
203 The technically correct solution however should discourage
204 such a case.
205
206 The solution is to allow for shortcutting for URN resolution. In
207 the following specification generic URI resolution starts by
208 inserting rules for known URI shemes into the 'uri.net' registry.
209 For URN resolution one of the rules would be for the 'urn' URI
210 scheme. This rule would simply delegate to the 'urn.net' zone
211 for additional NAPTRS based on the URN namespace.
212
213 Since this rule is the basis for the entire URN RDS, it can be
214 shortcutted by simply starting URN resolution at the 'urn.net'
215 registry. This the distinction between the 'uri.net' and 'urn.net'
216 well known keys seen below.
217
218 The DNS RDS Algorithm
219 =====================
220
221 Since the general RDS framework was the basis for the original NAPTR
222 algorithm, the two match very well. The only pieces missing from the
223 general NAPTR specification are the original key, protocols and
224 services.
225
226
227
228
229 Mealling & Daniel [Page 4]
230
231 RFC nnnn Resolution of URIs Using the DNS November 1998
232
233 The First Known Key
234 -------------------
235
236 In the generic URI case, the first known key is created by taking
237 the URI scheme and appending 'uri.net' to the end. In the specific,
238 shortcutted URN case, the first known key is created by taking
239 the Namespace Identifier and appending 'urn.net' to the end.
240
241 URI Example
242 -----------
243 http://www.foo.com/ would have a first known key of 'http.uri.net'.
244
245 URN Example
246 -----------
247 urn:foo:12345 would have a first known key of 'foo.urn.net'.
248
249 Services
250 --------
251
252 The services that make sense for URI resolution are generic for
253 both URI and URN resolution since the input value types itself
254 based on the URI scheme. Some valid services are defined in
255 RFCXXXX (draft-ietf-urn-resolution-services-07.txt).
256
257 Examples of some of these services are:
258
259 I2L: given a URI return one URL that identifies a location where the
260 original URI can be found
261
262 I2Ls: given a URI return one or more URLs that identify multiple
263 locations where the original URI can be found
264
265 I2R: given a URI return one instance of the resource identified by
266 that URI.
267
268 I2Rs: given a URI return one or more instances of the resources
269 identified by that URI.
270
271 I2C: given a URI return one instance of a description of that
272 resource.
273
274 I2N: given a URI return one URN that names the resource
275 (Caution: equality with respect to URNs is non-trivial. See
276 [15] for examples of why.)
277
278
279 Protocols
280 ---------
281
282 The protocols used in the Services field are currently limited to
283 THTTP [5]. Simply specifying any protocol in the services field
284 is insufficient since there are additional semantics surrounding URI
285 resolution that are not specified within the protocols.
286
287
288
289 Mealling & Daniel [Page 5]
290
291 RFC nnnn Resolution of URIs Using the DNS November 1998
292
293 For example, if Z39.50 were to be specified as a valid protocol it
294 would have to define how it would encode requests for specific
295 services, how the URI is encoded, and what information is returned.
296
297 Thus, for this document the only valid value used in the examples is
298 'thttp'.
299
300 Examples
301 ========
302
303 Example 1
304 ---------
305
306 Consider a URN that uses the hypothetical DUNS namespace. DUNS
307 numbers are identifiers for approximately 30 million registered
308 businesses around the world, assigned and maintained by Dunn and
309 Bradstreet. The URN might look like:
310
311 urn:duns:002372413:annual-report-1997
312
313 The first step in the resolution process is to find out about the
314 DUNS namespace. The namespace identifier [3], "duns", is extracted
315 from the URN, prepended to urn.net, and the NAPTRs for duns.urn.net
316 looked up. It might return records of the form:
317
318 duns.urn.net
319 ;; order pref flags service regexp replacement
320 IN NAPTR 100 10 "s" "dunslink+I2L+I2C" "" dunslink.udp.isi.dandb.com
321 IN NAPTR 100 20 "s" "rcds+I2C" "" rcds.udp.isi.dandb.com
322 IN NAPTR 100 30 "s" "thttp+I2L+I2C+I2R" "" thttp.tcp.isi.dandb.com
323
324 The order field contains equal values, indicating that no name
325 delegation order has to be followed. The preference field indicates
326 that the provider would like clients to use the special dunslink
327 protocol, followed by the RCDS protocol, and that HTTP is offered as
328 a last resort. All the records specify the "s" flag, which will be
329 explained momentarily. The service fields say that if we speak
330 dunslink, we will be able to issue either the I2L or I2C requests to
331 obtain a URL or a URC (description) of the resource. The Resource
332 Cataloging and Distribution Service (RCDS)[7] could be used to get a
333 URC for the resource, while HTTP could be used to get a URL, URC, or
334 the resource itself. All the records supply the next domain name to
335 query, none of them need to be rewritten with the aid of regular
336 expressions.
337
338 The general case might require multiple NAPTR rewrites to locate a
339 resolver, but eventually we will come to the "terminal NAPTR". Once
340 we have the terminal NAPTR, our next probe into the DNS will be for a
341 SRV or A record instead of another NAPTR. Rather than probing for a
342 non-existent NAPTR record to terminate the loop, the flags field is
343 used to indicate a terminal lookup. If it has a value of "s", the
344 next lookup should be for SRV RRs, "a" denotes that A records should
345 sought. A "p" flag is also provided to indicate that the next action
346 is Protocol-specific, but that looking up another NAPTR will not be
347 part of it.
348
349 Mealling & Daniel [Page 6]
350
351 RFC nnnn Resolution of URIs Using the DNS November 1998
352
353 Since our example RR specified the "s" flag, it was terminal.
354 Assuming our client does not know the dunslink protocol, our next
355 action is to lookup SRV RRs for rcds.udp.isi.dandb.com, which will
356 tell us hosts that can provide the necessary resolution service. That
357 lookup might return:
358
359 ;; Pref Weight Port Target
360 rcds.udp.isi.dandb.com IN SRV 0 0 1000 defduns.isi.dandb.com
361 IN SRV 0 0 1000 dbmirror.com.au
362 IN SRV 0 0 1000 ukmirror.com.uk
363
364 telling us three hosts that could actually do the resolution, and
365 giving us the port we should use to talk to their RCDS server. (The
366 reader is referred to the SRV proposal [4] for the interpretation of
367 the fields above).
368
369 There is opportunity for significant optimization here. We can return
370 the SRV records as additional information for terminal NAPTRs (and
371 the A records as additional information for those SRVs). While this
372 recursive provision of additional information is not explicitly
373 blessed in the DNS specifications, it is not forbidden, and BIND does
374 take advantage of it [8]. This is a significant optimization. In
375 conjunction with a long TTL for *.urn.net records, the average number
376 of probes to DNS for resolving DUNS URNs would approach one.
377 Therefore, DNS server implementors SHOULD provide additional
378 information with NAPTR responses. The additional information will be
379 either SRV or A records. If SRV records are available, their A
380 records should be provided as recursive additional information.
381
382 Note that the example NAPTR records above are intended to represent
383 the reply the client will see. They are not quite identical to what
384 the domain administrator would put into the zone files. For one
385 thing, the administrator should supply the trailing '.' character on
386 any FQDNs.
387
388 Also note that there could have been an additional first step where
389 the URN was resolved as a generic URI by looking up urn.uri.net.
390 The resulting rule would have specified that the NID be extracted
391 from the URN and 'urn.net' appended to it resulting in the
392 new key 'duns.urn.net' which is the first step from above.
393
394 Example 2
395 ---------
396
397 Consider a URN namespace based on MIME Content-Ids. The URN might
398 look like this:
399
400 urn:cid:199606121851.1@mordred.gatech.edu
401
402 (Note that this example is chosen for pedagogical purposes, and does
403 not conform to the CID URL scheme.)
404
405
406
407
408
409 Mealling & Daniel [Page 7]
410
411 RFC nnnn Resolution of URIs Using the DNS November 1998
412
413 The first step in the resolution process is to find out about the CID
414 namespace. The namespace identifier, cid, is extracted from the URN,
415 prepended to urn.net, and the NAPTR for cid.urn.net looked up. It
416 might return records of the form:
417
418 cid.urn.net
419 ;; order pref flags service regexp replacement
420 IN NAPTR 100 10 "" "" "/urn:cid:.+@([^\.]+\.)(.*)$/\2/i" .
421
422 We have only one NAPTR response, so ordering the responses is not a
423 problem. The replacement field is empty, so we check the regexp
424 field and use the pattern provided there. We apply that regexp to the
425 entire URN to see if it matches, which it does. The \2 part of the
426 substitution expression returns the string "gatech.edu". Since the
427 flags field does not contain "s" or "a", the lookup is not terminal
428 and our next probe to DNS is for more NAPTR records:
429 lookup(query=NAPTR, "gatech.edu").
430
431 Note that the rule does not extract the full domain name from the
432 CID, instead it assumes the CID comes from a host and extracts its
433 domain. While all hosts, such as mordred, could have their very own
434 NAPTR, maintaining those records for all the machines at a site as
435 large as Georgia Tech would be an intolerable burden. Wildcards are
436 not appropriate here since they only return results when there is no
437 exactly matching names already in the system.
438
439 The record returned from the query on "gatech.edu" might look like:
440
441 gatech.edu IN NAPTR
442 ;; order pref flags service regexp replacement
443 IN NAPTR 100 50 "s" "z3950+I2L+I2C" "" z3950.tcp.gatech.edu
444 IN NAPTR 100 50 "s" "rcds+I2C" "" rcds.udp.gatech.edu
445 IN NAPTR 100 50 "s" "thttp+I2L+I2C+I2R" "" thttp.tcp.gatech.edu
446
447 Continuing with our example, we note that the values of the order and
448 preference fields are equal in all records, so the client is free to
449 pick any record. The flags field tells us that these are the last
450 NAPTR patterns we should see, and after the rewrite (a simple
451 replacement in this case) we should look up SRV records to get
452 information on the hosts that can provide the necessary service.
453
454 Assuming we prefer the Z39.50 protocol, our lookup might return:
455
456 ;; Pref Weight Port Target
457 z3950.tcp.gatech.edu IN SRV 0 0 1000 z3950.gatech.edu
458 IN SRV 0 0 1000 z3950.cc.gatech.edu
459 IN SRV 0 0 1000 z3950.uga.edu
460
461 telling us three hosts that could actually do the resolution, and
462 giving us the port we should use to talk to their Z39.50 server.
463
464
465
466
467
468
469 Mealling & Daniel [Page 8]
470
471 RFC nnnn Resolution of URIs Using the DNS November 1998
472
473 Recall that the regular expression used \2 to extract a domain name
474 from the CID, and \. for matching the literal '.' characters
475 seperating the domain name components. Since '\' is the escape
476 character, literal occurances of a backslash must be escaped by
477 another backslash. For the case of the cid.urn.net record above, the
478 regular expression entered into the zone file should be
479 "/urn:cid:.+@([^\\.]+\\.)(.*)$/\\2/i". When the client code actually
480 receives the record, the pattern will have been converted to
481 "/urn:cid:.+@([^.]+\.)(.*)$/\2/i".
482
483 Example 3
484 ---------
485
486 Even if URN systems were in place now, there would still be a
487 tremendous number of URLs. It should be possible to develop a URN
488 resolution system that can also provide location independence for
489 those URLs. This is related to the requirement in [1] to be able to
490 grandfather in names from other naming systems, such as ISO Formal
491 Public Identifiers, Library of Congress Call Numbers, ISBNs, ISSNs,
492 etc.
493
494 The NAPTR RR could also be used for URLs that have already been
495 assigned. Assume we have the URL for a very popular piece of
496 software that the publisher wishes to mirror at multiple sites around
497 the world:
498
499 http://www.foo.com/software/latest-beta.exe
500
501 We extract the prefix, "http", and lookup NAPTR records for
502 http.uri.net. This might return a record of the form
503
504 http.uri.net IN NAPTR
505 ;; order pref flags service regexp replacement
506 100 90 "" "" "!http://([^/:]+)!\1!i" .
507
508 This expression returns everything after the first double slash and
509 before the next slash or colon. (We use the '!' character to delimit
510 the parts of the substitution expression. Otherwise we would have to
511 use backslashes to escape the forward slashes, and would have a
512 regexp in the zone file that looked like
513 "/http:\\/\\/([^\\/:]+)/\\1/i".).
514
515 Applying this pattern to the URL extracts "www.foo.com". Looking up
516 NAPTR records for that might return:
517
518 www.foo.com
519 ;; order pref flags service regexp replacement
520 IN NAPTR 100 100 "s" "thttp+L2R" "" thttp.tcp.foo.com
521 IN NAPTR 100 100 "s" "ftp+L2R" "" ftp.tcp.foo.com
522
523 Looking up SRV records for thttp.tcp.foo.com would return information
524 on the hosts that foo.com has designated to be its mirror sites. The
525 client can then pick one for the user.
526
527
528
529 Mealling & Daniel [Page 9]
530
531 RFC nnnn Resolution of URIs Using the DNS November 1998
532
533
534 Notes:
535 ======
536
537 - Registration procedures for the urn.net and uri.net DNS zones
538 is specified in "Assignment Procedures for the URI Resolution
539 using DNS (RFC2168)" [17]
540
541 - A client MUST process multiple NAPTR records in the order
542 specified by the "order" field, it MUST NOT simply use the first
543 record that provides a known protocol and service combination.
544
545
546 Mealling & Daniel [Page 11]
547
548 RFC nnnn Resolution of URIs Using the DNS November 1998
549
550 - If a record at a particular order matches the URI, but the
551 client doesn't know the specified protocol and service, the
552 client SHOULD continue to examine records that have the same
553 order. The client MUST NOT consider records with a higher value
554 of order. This is necessary to make delegation of portions of
555 the namespace work. The order field is what lets site
556 administrators say "all requests for URIs matching pattern x go
557 to server 1, all others go to server 2".
558 (A match is defined as:
559 1) The NAPTR provides a replacement domain name
560 or
561 2) The regular expression matches the URN
562 )
563
564 - When multiple RRs have the same "order", the client should use
565 the value of the preference field to select the next NAPTR to
566 consider. However, because of preferred protocols or services,
567 estimates of network distance and bandwidth, etc. clients may
568 use different criteria to sort the records.
569 - If the lookup after a rewrite fails, clients are strongly
570 encouraged to report a failure, rather than backing up to pursue
571 other rewrite paths.
572 - When a namespace is to be delegated among a set of resolvers,
573 regexps must be used. Each regexp appears in a separate NAPTR
574 RR. Administrators should do as little delegation as possible,
575 because of limitations on the size of DNS responses.
576 - Note that SRV RRs impose additional requirements on clients.
577
578 Acknowledgments:
579 =================
580
581 The editors would like to thank Keith Moore for all his consultations
582 during the development of this draft. We would also like to thank
583 Paul Vixie for his assistance in debugging our implementation, and
584 his answers on our questions. Finally, we would like to acknowledge
585 our enormous intellectual debt to the participants in the Knoxville
586 series of meetings, as well as to the participants in the URI and URN
587 working groups.
588
589 References:
590 ===========
591
592 [1] Sollins, Karen and Larry Masinter, "Functional Requirements
593 for Uniform Resource Names", RFC-1737, Dec. 1994.
594
595 [2] The URN Implementors, Uniform Resource Names: A Progress Report,
596 http://www.dlib.org/dlib/february96/02arms.html, D-Lib Magazine,
597 February 1996.
598
599 [3] Moats, Ryan, "URN Syntax", RFC-2141, May 1997.
600
601 [4] Gulbrandsen, A. and P. Vixie, "A DNS RR for specifying
602 the location of services (DNS SRV)", RFC-2052, October 1996.
603
604
605
606 Mealling & Daniel [Page 12]
607
608 RFC nnnn Resolution of URIs Using the DNS November 1998
609
610 [5] Daniel, Jr., Ron, "A Trivial Convention for using HTTP in URN
611 Resolution", RFC-2169, June 1997.
612
613 [6] URN-WG, "URN Resolution Services", Work in Progress. RFCXXXX
614
615 [7] Moore, Keith, Shirley Browne, Jason Cox, and Jonathan Gettler,
616 Resource Cataloging and Distribution System, Technical Report
617 CS-97-346, University of Tennessee, Knoxville, December 1996
618
619 [8] Paul Vixie, personal communication.
620
621 [9] Orth, Charles and Bill Arms; Handle Resolution Protocol
622 Specification, http://www.handle.net/docs/client_spec.html
623
624 [10] Williamson, S., M. Kosters, D. Blacka, J. Singh, K. Zeilstra,
625 "Referral Whois Protocol (RWhois)", RFC-2167, June 1997.
626
627 [11] Information Retrieval (Z39.50): Application Service Definition
628 and Protocol Specification, ANSI/NISO Z39.50-1995, July 1995.
629
630 [12] IEEE Standard for Information Technology - Portable Operating
631 System Interface (POSIX) - Part 2: Shell and Utilities (Vol. 1);
632 IEEE Std 1003.2-1992; The Institute of Electrical and
633 Electronics Engineers; New York; 1993. ISBN:1-55937-255-9
634
635 [13] Braden, R., "Requirements for Internet Hosts - Application and
636 and Support", RFC-1123, Oct. 1989.
637
638 [14] Sollins, Karen, "Architectural Principles of Uniform Resource
639 Name Resolution", RFC2276. January 1998.
640
641 [15] Mealling, Michael, Daniel, Jr., Ron. "The Naming Authority
642 Pointer (NAPTR) DNS Resource Record",
643 (draft-urn-naptr-rr-00.txt), November 1998.
644
645 [16] Mealling, Michael. "Assignment Procedures for the URI Resolution
646 using DNS (RFC2168)", (draft-ietf-urn-urn.net-procedures-01.txt),
647 November 1998.
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663 Mealling & Daniel [Page 13]
664
665 RFC nnnn Resolution of URIs Using the DNS November 1998
666
667 IANA Considerations
668 ===================
669
670 The use of the "urn.net" and "uri.net" zones requires registration
671 policies and procedures to be followed and for the operation of
672 those DNS zones to be maintained. These policies and procedures
673 are spelled out in a "Assignment Procedures for the URI Resolution
674 using DNS (RFC2168)" [17]. The operation of those zones imposes
675 operational and adminstrative responsibilities on the IANA.
676
677 The registration methods used for specifying values for the Services
678 (both protocols and services) and Flags fields that are specific to
679 URI resolution is for a specification to be published as an RFC
680 and approved by the IESG.
681
682 The registration policies for URLs and URNs are also specified
683 elsewhere and thus those impacts on the IANA are spelled out there.
684
685 Security Considerations
686 =======================
687
688 The use of "urn.net" and "uri.net" as the registry for namespaces
689 is subject to denial of service attacks, as well as other DNS
690 spoofing attacks. The interactions with DNSSEC are currently being
691 studied. It is expected that NAPTR records will be signed with
692 SIG records once the DNSSEC work is deployed.
693
694 The rewrite rules make identifiers from other namespaces subject to
695 the same attacks as normal domain names. Since they have not been
696 easily resolvable before, this may or may not be considered a
697 problem.
698
699 Regular expressions should be checked for sanity, not blindly passed
700 to something like PERL.
701
702 This document has discussed a way of locating a resolver, but has not
703 discussed any detail of how the communication with the resolver takes
704 place. There are significant security considerations attached to the
705 communication with a resolver. Those considerations are outside the
706 scope of this document, and must be addressed by the specifications
707 for particular resolver communication protocols.
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724 Mealling & Daniel [Page 14]
725
726 RFC nnnn Resolution of URIs Using the DNS November 1998
727
728 Author Contact Information:
729 ===========================
730
731 Michael Mealling
732 Network Solutions
733 505 Huntmar Park Drive
734 Herndon, VA 22070
735 voice: (703) 742-0400
736 fax: (703) 742-9552
737 email: michaelm@internic.net
738 URL: http://www.netsol.com/
739
740 Ron Daniel Jr.
741 DATAFUSION, Inc.
742 139 Townsend Street, Ste. 100
743 San Francisco, CA 94107
744 415.222.0100 fax 415.222.0150
745 rdaniel@datafusion.net
746 http://www.datafusion.net
747
748
749 Appendix A -- Psuedo Code
750 =====
751
752 For the edification of implementers, pseudocode for a client routine
753 using NAPTRs is given below. This code is provided merely as a
754 convience, it does not have any weight as a standard way to process
755 NAPTR records. Also, as is the case with pseudocode, it has never
756 been executed and may contain logical errors. You have been warned.
757
758 //
759 // findResolver(URN)
760 // Given a URN, find a host that can resolve it.
761 //
762 findResolver(string URN) {
763 // prepend prefix to urn.net
764 sprintf(key, "%s.urn.net", extractNS(URN));
765 do {
766 rewrite_flag = false;
767 terminal = false;
768 if (key has been seen) {
769 quit with a loop detected error
770 }
771 add key to list of "seens"
772 records = lookup(type=NAPTR, key); // get all NAPTR RRs for 'key'
773
774 discard any records with an unknown value in the "flags" field.
775 sort NAPTR records by "order" field and "preference" field
776 (with "order" being more significant than "preference").
777 n_naptrs = number of NAPTR records in response.
778 curr_order = records[0].order;
779 max_order = records[n_naptrs-1].order;
780
781 // Process current batch of NAPTRs according to "order" field.
782 for (j=0; j < n_naptrs && records[j].order <= max_order; j++) {
783 if (unknown_flag) // skip this record and go to next one
784 continue;
785 newkey = rewrite(URN, naptr[j].replacement, naptr[j].regexp);
786 if (!newkey) // Skip to next record if the rewrite didn't
787 match continue;
788 // We did do a rewrite, shrink max_order to current value
789 // so that delegation works properly
790 max_order = naptr[j].order;
791 // Will we know what to do with the protocol and services
792 // specified in the NAPTR? If not, try next record.
793 if(!isKnownProto(naptr[j].services)) {
794 continue;
795 }
796 if(!isKnownService(naptr[j].services)) {
797 continue;
798 }
799
800 // At this point we have a successful rewrite and we will
801 // know how to speak the protocol and request a known
802 // resolution service. Before we do the next lookup, check
803 // some optimization possibilities.
804 if (strcasecmp(flags, "S")
805 || strcasecmp(flags, "P"))
806 || strcasecmp(flags, "A")) {
807 terminal = true;
808 services = naptr[j].services;
809 addnl = any SRV and/or A records returned as additional
810 info for naptr[j].
811 }
812 key = newkey;
813 rewriteflag = true;
814 break;
815 }
816 } while (rewriteflag && !terminal);
817
818 // Did we not find our way to a resolver?
819 if (!rewrite_flag) {
820 report an error
821 return NULL;
822 }
823
824
825 // Leave rest to another protocol?
826 if (strcasecmp(flags, "P")) {
827 return key as host to talk to;
828 }
829
830 // If not, keep plugging
831 if (!addnl) { // No SRVs came in as additional info, look them up
832 srvs = lookup(type=SRV, key);
833 }
834
835 sort SRV records by preference, weight, ...
836 foreach (SRV record) { // in order of preference
837 try contacting srv[j].target using the protocol and one of the
838 resolution service requests from the "services" field of the
839 last NAPTR record.
840 if (successful)
841 return (target, protocol, service);
842 // Actually we would probably return a result, but this
843 // code was supposed to just tell us a good host to talk to.
844 }
845 die with an "unable to find a host" error;
846 }
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882 Mealling & Daniel [Page 15]
883

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24