BUG#: 4728
[tpot/pegasus/.git] / src / Unsupported / slp_client / doc / draft-day-svrloc-exclusion-03.nr.txt
1 .\"-----------------------------------------------------------------
2 .\" Registers to store heading levels as variables
3 .\"-----------------------------------------------------------------
4 .nr head1 0 1
5 .nr head2 0 1
6 .nr head3 0 1 
7 .nr head4 0 1
8 .nr head5 0 1
9 .nr head6 0 1
10
11 .\"-----------------------------------------------------------------
12 .\" Return to header level 1, 2, etc. 
13 .\" resets the level registers and indent
14 .\"-----------------------------------------------------------------
15 .de RETURN_HDR_1
16 .nr head2 0 1
17 .nr head3 0 1 
18 .nr head4 0 1
19 .nr head5 0 1
20 .nr head6 0 1
21 .in 0 
22 \.HDR_1 \\$1 
23 ..
24
25 .de RETURN_HDR_2
26 .nr head3 0 1 
27 .nr head4 0 1
28 .nr head5 0 1
29 .nr head6 0 1
30 .in 0 
31 \.HDR_2 \\$1
32 ..
33  
34 .de RETURN_HDR_3
35 .nr head4 0 1
36 .nr head5 0 1
37 .nr head6 0 1
38 .in 0 
39 \.HDR_3 \\$1
40 ..
41
42 .de RETURN_HDR_4
43 .nr head5 0 1
44 .nr head6 0 1
45 .in 0 
46 \.HDR_4 \\$1
47 ..
48
49 .de RETURN_HDR_5
50 .nr head6 0 1
51 .in 0 
52 \.HDR_5 \\$1
53 ..
54
55 .\"-----------------------------------------------------------------
56 .\" Create a level 1, 2, etc,.  heading 
57 .\" resets indent, creates a TOC entry
58 .\" Parameter is the title of the heading
59 .\"-----------------------------------------------------------------
60 .de HDR_1
61 .sp 1
62 .in 0 
63 \\n+[head1]\\  \\$1
64 .XS
65 \\n[head1]\\  \\$1
66 .XE
67 .in 3
68 .. 
69
70
71 .de HDR_2
72 .sp 1
73 .in 0 
74 \\n[head1]\\.\\n+[head2]\\ \\$1
75 .XS
76 \\n[head1]\\.\\n[head2]\\ \\$1
77 .XE
78 .in 3
79 .. 
80
81 .de HDR_3
82 .sp 1
83 .in 0 
84 \\n[head1]\\.\\n[head2]\\.\\n+[head3]\\ \\$1
85 .XS
86 \\n[head1]\\.\\n[head2]\\.\\n[head3]\\ \\$1
87 .XE
88 .in 3
89 .. 
90
91 .de HDR_4
92 .sp 1
93 .in 0 
94 \\n[head1]\\.\\n[head2]\\.\\n[head3]\\.\\n+[head4]\\ \\$1
95 .XS
96 \\n[head1]\\.\\n[head2]\\.\\n[head3]\\.\\n[head4]\\ \\$1
97 .XE
98 .in 3
99 .. 
100
101 .de HDR_5
102 .sp 1
103 .in 0 
104 \\n[head1]\\.\\n[head2]\\.\\n[head3]\\.\\n[head4]\\.\\n+[head5]\\ \\$1
105 .XS
106 \\n[head1]\\.\\n[head2]\\.\\n[head3]\\.\\n[head4]\\.\\n[head5]\\ \\$1
107 .XE
108 .in 3
109 .. 
110
111 .de HDR_6
112 .sp 1
113 .in 0 
114 \\n[head1]\\.\\n[head2]\\.\\n[head3]\\.\\n[head4]\\.\\n[head5]\\.\\n+[head6]\\ \\$1
115 .XS
116 \\n[head1]\\.\\n[head2]\\.\\n[head3]\\.\\n[head4]\\.\\n[head5]\\.\\n[head6]\\ \\$1
117 .in 3
118 .XE
119 .. 
120
121 .\"-----------------------------------------------------------------
122 .\" END MACRO DEFINITIONS
123 .\"-----------------------------------------------------------------
124
125 .pl 58
126 .po 0
127 .ll 72
128 .lt 72
129 .ds LF Day 
130 .ds RF FORMFEED[Page %]^
131 .ds CF 
132 .ds LH INTERNET DRAFT
133 .ds CH SLP Exclusion Directive
134 .ds RH Exp. June 2003  
135 .hy 0
136 .ad l
137 .in 0
138
139    
140 Internet Engineering Task Force                            Michael Day
141 INTERNET DRAFT                                                     IBM
142 07 January 2003                                  Expires in six months
143
144 .ce 1000
145 Exclusion Extension for Service Location Protocol v2
146 draft-day-svrloc-exclusion-03.txt
147 .ce 0
148 .sp 5
149
150 .in 0
151 Status of This Memo
152 .in 3
153 This document is an Internet-Draft and is subject to
154 all provisions of Section 10 of RFC2026.
155
156 Internet-Drafts are working documents of the Internet Engineering
157 Task Force (IETF), its areas, and its working groups.  Note that
158 other groups may also distribute working documents as
159 Internet-Drafts.
160
161 Internet-Drafts are draft documents valid for a maximum of six
162 months and may be updated, replaced, or obsoleted by other
163 documents at any time.  It is inappropriate to use Internet-
164 Drafts as reference material or to cite them other than as
165 "work in progress."
166
167 The list of current Internet-Drafts can be accessed at
168 http://www.ietf.org/1id-abstracts.html
169
170 The list of Internet-Draft Shadow Directories can be accessed at
171 http://www.ietf.org/shadow.html
172
173 This document is an individual contribution to the Internet
174 Engineering Task Force (IETF). Comments should be submitted to the
175 srvloc@srvloc.org mailing list.
176
177 Distribution of this memo is unlimited.
178         
179 .bp
180 .HDR_1 Introduction 
181
182 The Service Location Protocol, Version 2 [1] allows the use of
183 multicast and broadcast discovery requests.  The SLP exclusion
184 directive is an extension to SLP that optimizes the use of
185 multicasting and broadcasting to find services on an intranet. This
186 document hereafter refers to multicast discovery but all its contents
187 apply to broadcast discovery as well.
188
189 .HDR_2 "Present SLPv2 Multicast Behavior"
190
191 Multicast discovery requests allow an SLP User Agent to discover
192 services with no prior configuration. Multicast discovery requests are
193 not sent reliably and must be retransmitted in order to find all
194 services of the desired type on the network.
195
196 When SLP v2 SrvRqst, SrvTypeRqst, and AttrRqst messages are multicast,
197 they contain a <PRList> of previous respondents. Initially the
198 <PRList> is empty. When these requests are unicast, the <PRList> is
199 always empty.
200
201 Any DA or SA which sees its address in the <PRList> does not respond
202 to the request (as specified in RFC 2608).
203
204 The User Agent then retransmits the discovery request until the
205 <PRList> causes no further responses to be elicited or the previous
206 responder list and the request will not fit into a single datagram or
207 until CONFIG_MC_MAX seconds elapse[1].
208
209 The PR list is an effective mechanism for suppressing duplicate
210 responses in smaller environments. However, because of the way PR
211 lists are encoded with the SLP v2 header, the PR List has a limit of
212 as few as 90 IPv4 addressees, and even fewer IPv6 addresses. This
213 means in most environments a User Agent may suppress duplicate
214 responses from approximately 90 host addresses at best.
215
216 .HDR_2 Optimizations\ Made\ by\ Exclusion\ Directive
217
218 The Exclusion Directive extension presented in this document allows a
219 User Agent (UA) to direct those Directory Agents (DAs) and Service
220 Agents (SAs) from which it has already received responses not to
221 respond to retransmissions of a particular query. Hence subsequent
222 retransmissions only generate responses from agents from which the
223 requester has not already received a response.
224
225 This extension can be used in conjunction with the SLP v2 PR list.
226 SAs and DAs which do not understand the Exclusion Directive extension
227 will ignore it. With the use of the Exclusion Directive extension, SLP
228 v2 User Agents may perform multicast discovery with a high degree of
229 success and efficiency, even when the number of respondents reaches
230 into the thousands. .
231
232 .HDR_2 Terminology
233
234 In this document, the key words "MAY", "MUST, "MUST NOT", "optional",
235 "recommended", "SHOULD", and "SHOULD NOT", are to be interpreted as
236 described in RFC 2119 [2].
237
238 .bp
239 .RETURN_HDR_1 Exclusion\ Extension\ Format
240
241 The fields in an Exclusion extension form an Exclusion Directive that
242 tells receiving agents not to respond to a specific request from a
243 specific host for a specific time interval.
244
245 Each Exclusion Directive is     fully  contained within one  SLP    v2
246 extension block. However, a single SLP v2  request message may contain
247 multiple Exclusion Directives.  For example, a single Service  Request
248 may  contain three Exclusion  Directives  within three distinct SLP v2
249 extension blocks.
250
251 .KS
252 .HDR_2 Exclusion\ Extension\ Fields
253
254 The Exclusion extension has the following format:
255 .DS L
256
257
258    0             1                   2                   3
259    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
260    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
261    |  Extension ID = 0x000?        |     Next Extension Offset     |
262    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
263    | Offset, contd.|     size      |        Exclusion XID          |
264    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
265    |                             Nonce                             |
266    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
267    |  Exclusion Interval           |    Number of Entries          |
268    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
269    |                     Exclusion Entries                         |
270    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
271    | # auth blocks                 | authentication block (if any) |
272    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
273
274 .DE
275 .KE 
276 .HDR_3 Size\ Field
277
278 The size field specifies the size, in bytes, of each address entry. A
279 size value of 4 bytes MUST be encoded as an IP v4 address in network
280 byte order. A size value of 16 bytes MUST be encoded as an IP v6
281 address in network byte order. Other address sizes are assumed to be
282 opaque data and will not be interoperable among different
283 implementations
284
285 .HDR_4 Using\ the\ Size\ Field\ to\ Calculate\ Length\ of\ Entries
286
287 The size of the Exclusion Entries field MUST be calculated by
288 multiplying the value of the Size field by the value of the Number of
289 Entries field. 
290
291 .RETURN_HDR_3 Exclusion\ XID
292
293 The Exclusion XID identifies the SLP request to which the enclosing
294 Exclusion Directive applies. An Exclusion Directive always applies to
295 exactly one specific XID from exactly one host IP address.
296
297 It is possible that the value of XID field in the Exclusion Directive
298 and the XID in the SLP header of the message containing the Exclusion
299 Directive will be different. This is a subtle but important point: the
300 SLP v2 header XID and the Exclusion XID are not equivalent. See
301 section 3.0 for details of how the exclusion XID works.
302
303 .HDR_3 Nonce
304
305 The Nonce adds a unique value to each Exclusion Directive that makes
306 it difficult to mount a denial of service attack by replaying
307 Exclusion Directives. The Nonce is a 128-bit field which MUST contain
308 a cryptographic-quality random unique value; or alternatively must be
309 filled with zero bytes. (If the Nonce is filled with zero bytes, it is
310 ignored.)
311
312 The usage of the Nonce is explained further in section 4.3.
313
314 .HDR_3 Exclusion\ Interval
315
316 The Exclusion Interval indicates the lifetime, in seconds, of the
317 containing Exclusion Directive. The interval begins when the SA or DA
318 receives the Exclusion Directive. Exclusion Directives SHOULD have an
319 interval from one to several seconds. However, the Exclusion Interval
320 may need to be increased for unusually large networks or media with
321 high latency characteristics, such as satellite links. 
322
323 .HDR_3  Exclusion\ Entries
324
325 The Exclusion Entries field is the list of host IP addresses that are
326 subject to the containing Exclusion Directive. The length of the Exclusion
327 Entries field is the number of IP addresses in the list multiplied by
328 the size of each IP address.
329
330 The size of each IP address is determined by the value of the size
331 field. Each Exclusion Directive therefore may only contain IPv4
332 addresses or IPv6 addresses, but not both.
333
334 .HDR_4 Dual-stack\ IP\ Environments
335
336 In environments using both IPv4 and IPv6 addresses it may be necessary
337 to deliver two Exclusion Directives where otherwise one would be
338 sufficient. E.g., one Directive containing IPv4 addresses and another
339 Directive containing IPv6 addresses. One way to accomplish this is to
340 pack two separate Exclusion Directives into a single SLP
341 request. Another way involves using dummy request messages to deliver
342 Exclusion Directives. Dummy request messages are covered in section
343 3.1 below.
344
345 .RETURN_HDR_3 Authentication\ Blocks
346
347 The Number of Auth Blocks indicates how many authentication blocks
348 are contained in the containing Exclusion Directive. The format of the
349 authentication block is covered in section 4 below.
350
351 .KS
352 .RETURN_HDR_2 Exclusion\ Directive\ Functionality
353
354 The purpose of the Exclusion Directive is to cause SAs or DAs to
355 silently discard specific SLP requests that originate from specific IP
356 addresses. This purpose aids in the use of multicasting to discover
357 services in large network environments. The Exclusion Directive makes
358 multicast discovery  more reliable and efficient by: 
359
360 .nr PI 5
361 .nr step 1 1
362 .RS
363 .IP \n[step]. 3
364 Providing a more compact mechanism to silence previous responders.
365 .IP \n+[step].
366 Magnifying the effect of the silencing mechanism by specifying a quiet interval.
367 .RE
368 .KE
369
370 .HDR_3 Exclusion\ Directive\ State\ Table\ (EDST)
371
372 When the Exclusion Directive is present in an SLP request, the
373 receiving agent uses the directive to create and maintain state
374 information that causes the receiving agent to ignore and discard
375 matching requests (possibly including the request containing the
376 Exclusion Directive).
377
378 The Exclusion Directive State Table (EDST) is the collection of
379 information describing all current Exclusion Directives received by
380 the agent. EDST entries are a record with five fields: Source Address,
381 Source Port, exclusion XID , exclusion nonce value, and expiration
382 time. (The nonce value MAY be zero filled.)
383
384 The Exclusion Directive only applies to SLP v2 messages that have the
385 multicast flag set. The SA or DA MUST respond to SLP v2 messages that
386 do not have the multicast flag set as specified in [1].
387
388 If the incoming request message matches a current record in the
389 receiving agent's EDST, and if the incoming request's Multicast flag
390 is set in the SLP header, the DA or SA MUST silently discard the
391 message. 
392
393 When the Exclusion Interval of an Exclusion Directive has expired, the
394 SA or DA MUST delete the corresponding record in its EDST and resume
395 processing SLP v2 multicast request as if that Exclusion Directive
396 was never received.
397
398 If an incoming request does not contain an Exclusion Directive, the
399 receiving agent MUST process that request without regard to the local
400 EDST. (In other words, process the request normally.)
401
402
403 .RETURN_HDR_1  Exclusion\ Directives\ in\ SLP\ v2\ Request\ Messages
404
405 An SA or DA may encounter the Exclusion Directive in Service Request,
406 Attribute Request, and Service Type Request messages. In each case,
407 the request may also contain a PR list as described in [1].
408
409 A UA MUST NOT include an Exclusion Directive in a unicast SLP v2
410 request message. DAs and SAs MUST ignore Exclusion Directives that
411 are erroneously included in unicast request messages.
412
413 .KS
414 If the SA or DA supports the Exclusion Directive, it MUST perform the
415 following steps when processing an SLP v2 Request message.
416 .nr PI 5
417 .RS
418 .nr step 1 1
419 .IP \n[step]. 3
420 If the request message is unicast or if the receiving agent does not
421 recognize the Exclusion Directive, go to step 6 below.
422 .IP \n+[step].
423 If the incoming request does not have an Exclusion Directive,
424 proceed to step 6.
425 .IP \n+[step].
426 Extract the Exclusion Directive from the request. Search the
427 Directive's Exclusion Entries list for the receiving agent's IP
428 address. If not found, proceed to step 6.
429 .IP \n+[step].
430 Extract the source address and port from the UDP header and the
431 Exclusion XID and nonce from the Exclusion Directive. The receiving
432 agent MUST ensure that its EDST contains a record for this directive,
433 creating a new EDST record if necessary. (This step is also a
434 convenient time to delete expired entries from the EDST.)
435 .IP \n+[step].
436 Extract the source address and port from the incoming request's UDP
437 header. Extract the XID from the request's SLP v2 header. Extract the 
438 nonce from the Exclusion directive. 
439
440 Search the EDST for an entry containing matching values for these data
441 (Optionally ignoring the nonce from the EDST entry if the incoming
442 request does not contain an exclusion directive). Upon finding a
443 matching EDST entry, silently discard the request. Otherwise continue.
444 .IP \n+[step].
445 If the SA or DA has not discarded the request up to this point,
446 evaluate the request normally as outlined in [1].
447 .RE
448 .KE
449 .in 3
450
451 It is worth repeating that the Exclusion Directive only applies to
452 SLP v2 request messages that have the R (Request Multicast) flag
453 turned on in the SLP v2 header. Agents MUST NOT silently discard
454 unicast request messages regardless of exclusion directives or EDST
455 entries.
456
457 Note that additional steps may be necessary if the Exclusion
458 directive contains one or more authentication blocks. These
459 steps are outlined in section 4.
460
461 .KS 
462 .HDR_2 Dummy\ Service\ Request\ Message\ with\ Exclusion\ Directive 
463
464 A "dummy" request message is one that has zero-length fields
465 for the entire request body, exclusive of the SLP v2 header and the
466 Exclusion directive.
467
468 Using a dummy SLP request message for the sole purpose of transporting
469 an Exclusion Directive may be helpful in two cases:
470 .nr PI 5
471 .RS
472 .nr step 1 1
473 .IP \n[step]. 3
474 The Exclusion Directive is too large to fit within a single request
475 datagram alongside the SLP header, service type, predicate, and other request
476 data. However, it will fit in a datagram with just itself and the SLP
477 header. 
478 .IP \n+[step].
479 The Exclusion Directive is larger than the sum of the network MTU
480 and the SLP Header. The agent can divide the Exclusion Entries list
481 across two or more Exclusion Directives and transport those Directives
482 within a corresponding number of dummy SLP request messages.
483
484 This method can support Exclusion Entry lists that contain thousands
485 of addresses. 
486 .RE
487 .in 3
488 .sp 1
489 When an SA or DA receives a dummy SLP request that contains an
490 Exclusion Directive, the receiving agent MUST extract the Exclusion
491 Directive from the dummy request and ensure that the local EDST
492 contains a record corresponding to the Exclusion Directive. This is
493 described in section 3, step 4 above. 
494
495
496 A Dummy request message MUST have the R (Request Multicast) flag
497 turned on in the SLP v2 header. This causes SLP v2 SAs and DAs that
498 are unaware of the Exclusion Directive to silently discard dummy
499 request messages due to a parsing error (instead of responding to the
500 sending agent with an error code).
501 .KE 
502 .KS
503
504 .HDR_3 Format\ of\ Dummy\ Service\ Request
505 .DS L
506    0                   1                   2                   3
507    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
508    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
509    | Service Location Header (R flag on) (function = SrvRqst = 1)  |
510    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
511    |    length of <PRList> = 0     | length of <service-type> = 0  |
512    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
513    |   length of <scope-list> = 0  |   length of <predicate> = 0   |
514    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
515    |    length of <SLP SPI > = 0   |   Extension ID = Exclusion    |
516    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
517    |         Next Extension Offset                 |     size      |
518    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
519    |     Exclusion XID             |   Nonce                       |
520    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
521    |          Nonce, cont'd.       |       Exclusion Interval      |
522    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
523    |        Number of Entries      |          Exclusion Entries    \\
524    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
525    \\ # auth blocks                 |  authentication block (if any)\\
526    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
527 .DE
528 .KE
529 .HDR_3 Processing\ the\ Dummy\ Service\ Request
530
531 Dummy Service Request messages MUST be processed as outlined in
532 section 3 above. The result is that the receiving agents which support
533 the Exclusion Directive will process the Directive, while all other
534 agents will silently discard the message due to a parsing error.
535
536 After processing the Exclusion Directive, the receiving agent will
537 produce a parse error. Because the service request has the multicast
538 flag set, the receiving agent will not send an error response to the
539 originating agent.
540
541 Note that if the Exclusion Directive contains an authentication
542 block, the SA or DA SHOULD validate the signature of the Exclusion
543 Directive. Authentication of Exclusion Directives is covered in
544 section 4.
545
546 .KS
547 .HDR_3 Using\ the\ Exclusion\ Directive\ and\ PR\ List\ Together
548
549 The steps below show how to use the
550 Exclusion Directive in combination with the SLP PR list to perform
551 multicast discovery (substitute actual XIDs in real usage):
552 .nr PI 5
553 .RS
554 .nr step 1 1
555 .IP \n[step]. 3
556 Send a new Service Request with no PR list and no Exclusion Directive;
557 process the replies and remember the respondents as RL1. 
558 .IP \n+[step].
559 Build an exclusion list and remember it as list EL1.
560 .IP \n+[step].
561 Immediately re-transmit the Service Request from (1) with no PR list
562 but with an Exclusion Directive that contains Exclusion List EL1;
563 process the replies and remember the respondents as RL2.
564 .IP \n+[step].
565 The intersection of EL1 and RL2 are agents that do not support the
566 Exclusion Directive. Create PRL1 = EL1 n RL2. Build EL2 = RL2 - PRL1.
567 .IP \n+[step].
568 Immediately re-transmit the Service Request from (3) including PRL1 in
569 the SLP header and substituting EL2 for EL1 in the Exclusion
570 Directive. If no responses the discovery cycle is complete. 
571 .IP \n+[step].
572 Repeat the previous thre steps n times using ELn-1, RLn, PRLn-1, and ELn until the
573 UA receives no responses for the configured timeout period. 
574 .RE
575 .in 3
576 .sp 1
577 In steps 1 - 6 above, it is important that each Service Request (steps
578 1, 3, and 5) have the same XID in the SLP Header ; and equally that
579 each Exclusion Directive also has the same value in the XID field.
580 .KE
581 .KS
582
583 .RETURN_HDR_1 Authenticating\ Exclusion\ Directives
584
585 To prevent denial of service attacks against UAs, all agents that
586 recognize the Exclusion Directive SHOULD support authentication of
587 the Exclusion Directive.
588
589 Authenticating Exclusion Directives places the additional burden upon
590 the User Agent of signing data. In standard SLP v2, UAs only need to
591 verify signatures. The additional ability to generate signatures
592 means that UAs must be issued private key material.
593
594 .HDR_2 The\ Exclusion\ Directive\ Authentication\ Block
595
596 The format of the Exclusion Directive Authentication Block is the same
597 as that used by SLP v2 [1].
598
599 .DS L
600    0                   1                   2                     3
601    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
602    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
603    |  Block Structure Descriptor   |  Authentication Block Length  |
604    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
605    |                           Timestamp                           |
606    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
607    |     SLP SPI String Length     |         SLP SPI String        \\
608    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
609    \\                Structured Authentication Block...            \\
610    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
611 .DE
612 .KE
613 .KS
614 .HDR_2 Exclusion\ Directive\ Authentication\ Rules
615
616 To sign or verify the signature of an Exclusion Directive, the SLP
617 agent MUST use the following components of the Exclusion Directive as
618 if they were a single continuous byte-aligned buffer:
619 .nr PI 5
620 .RS
621 .IP \[bu] 3 
622 16-bit Exclusion XID
623 .IP \[bu] 
624 32-bit Nonce
625 .IP \[bu] 
626 16-bit Exclusion Interval
627 .IP \[bu] 
628 8-bit Exclusion Entry size
629 .IP \[bu] 
630 16-bit Number of Entries
631 .IP \[bu] 
632 Variable-length Exclusion Entries.
633 .RE
634 .KE
635
636 .RETURN_HDR_1 Using\ the\ NONCE\ Value\ to\ Prevent\ Replay\ Attacks
637
638 Despite the use of signatures to authenticate Exclusion Directives,
639 UAs may still be vulnerable to a replay denial of service attack.  To
640 prevent this possibility, SLP Agents that recognize the Exclusion
641 directive SHOULD make use of the nonce value as described in this
642 section.
643
644 Every Exclusion Directive contains a 128-bit nonce field, which MUST
645 contain a 128-bit cryptographicly random value or be filled with
646 zeros. If the nonce is filled with zeroes, the UA is open to a
647 denial-of service attack. 
648
649 Because the nonce field is included in signature generation and
650 validation, each signed Exclusion Directive can be cryptographically
651 unique. Unsigned Exclusion Directives can also be cryptographically
652 unique but their source can be spoofed.
653
654 .KS
655 By using the nonce correctly, Exclusion Directives can be specific
656 to:
657 .nr PI 5
658 .RS
659 .nr step 1 1
660 .IP \n[step]. 3
661 The source address and port of the requesting UA.
662 .IP \n+[step].
663 The XID of the request.
664 .IP \n+[step].
665 A cryptographically unique value for each and every request. To make
666 this work, SAs and DAs MUST include the nonce value, along with the UA
667 source address and the request XID when deciding whether or not an
668 Exclusion Directive applies to a request message.  
669 .RE 
670 .KE 
671
672 .HDR_2 UA\ Use\ of\ the\ Nonce\ to\ Prevent\ Denial\ of\ Service\ Attack
673
674 The UA is the SLP component vulnerable to a denial of service attack
675 so it is responsible for using an appropriate algorithm to generate a
676 nonce with the requisite random characteristics. 
677
678 .KS
679 For each Exclusion Directive:
680 .nr PI 5
681 .RS
682 .nr step 1 1
683 .IP \n[step]. 3
684 Generate a random 128-bit integer to use as the nonce.
685 .IP \n+[step].
686 Initialize an Exclusion Directive, including the XID of the
687 request that is subject to response suppression.
688 .IP \n+[step].
689 Insert the nonce value from (1) into the Exclusion Directive.
690 .IP \n+[step].
691 Optionally sign the Exclusion Directive as outlined in the section on
692 Authentication above. 
693 .IP \n+[step].
694 Use a Exclusion Directive containing the nonce in all
695 requests and dummy Service Requests for the XID in step (2).
696 .IP \n+[step].
697 IMPORTANT - use a DIFFERENT, cryptographically generated nonce
698 for each request XID for which you are issuing an Exclusion
699 directive.
700 .RE
701 .KE
702 .KS
703 .HDR_2 DA\ and\ SA\ Use\ of\ the\ Nonce
704
705 SA's DAs that recognize the Exclusion Directive MUST use the nonce
706 value to initialize EDST entries and to evaluate Exclusion Directives
707 in request messages. 
708
709 .HDR_3 Zero-filled\ Nonce
710
711 UAs that don't have the ability to generate unique
712 nonce values MUST fill the nonce field of the Exclusion Directive
713 with zeros. This opens the agent up to a denial of service attack,
714 however. (See below).
715
716 .RETURN_HDR_2 Theory\ Behind\ the\ Nonce 
717 The nonce is a simple mechanism to make it as difficult as possible
718 for an attacker to predict the composition of SLP service
719 requests that a particular UA may issue in the near future. 
720
721 Most UA's use the XID field in the SLP 2 header as a sequential
722 counter. Hence an attacker that has a copy of a recent SLP request can
723 guess the XID of the next request the agent will make. Using the
724 Exclusion Directive, an attacker can cause DA's and SA's not to
725 respond to subsequent SLP requests made by the attacked agent. 
726
727 However, the inclusion of the nonce value in the Exclusion Directive
728 makes it infeasible for an attacker to guess the composition of future
729 requests made by the UA. This is true because the nonce, unlike the
730 XID, is a random value. Also, the nonce is large enough to make
731 guessing its value in the next request too difficult for the attacker.
732 .KE
733 .RETURN_HDR_1 Security\ Considerations
734
735 Implementing the Exclusion Directive without using the nonce value
736 opens SLP v2 UAs up to a trivial denial of service attack, which would
737 nullify the ability of the UA to perform discovery.
738
739 Implementing the Exclusion Directive with authentication but without
740 using the nonce value may leave the UA open to a more sophisticated
741 replay attack using previously signed and multicast request messages.
742
743 UAs that support the Exclusion Directive SHOULD authenticate their
744 requests as outlined in section 4 and SHOULD include the nonce value
745 in all Exclusion Directives.
746
747 SAs and DAs that support the Exclusion Directive SHOULD be able to
748 verify signed Exclusion Directives and MUST store the nonce value in
749 the EDST entry for that directive.
750
751 Nonce values generated by UAs MUST  be cryptographically unique and
752 random values if they are to provide any safeguard against a replay
753 attack.
754
755 .HDR_1 Acknowledgements
756
757 Erik Guttman has provided a great deal of feedback and improvements
758 to this document. The srvloc working group also contributed to the
759 development of this document, especialy Kevin Arnold, James Kempf,
760 Ira McDonald, Evan Hughes, Terry Lambert, and others. Thomas Narten
761 recommended some important changes during the review process.
762 .KS
763 .HDR_1 References
764 .nr PI 5
765 .RS
766 .nr step 1 1
767 .IP \n[step]. 3 
768 Guttman, E., Perkins, C., Veizades, J., and M. Day, "Service
769 Location Protocol Version 2", RFC 2608, June 1999.
770 .IP \n+[step].
771 Bradner, S,. "Key Words for Use in RFCs to Indicate Requirements
772 Levels", BCP 14, RFC 2119, March 1997
773 .RE
774 .KE
775 .KS
776 .HDR_1 Author's\ Contact\ Information
777
778 Michael Day
779 IBM
780 3039 Cornwallis Road
781 Research Triangle Park, NC 27709
782
783 Phone:  919 543-4283
784
785 Email:  mdday@us.ibm.com
786 .KE
787 .KS
788 .HDR_1 Full\ Copyright\ Statement
789
790 Copyright (C) The Internet Society (2000-2002).  All Rights Reserved.
791
792 This document and translations of it may be copied and furnished to
793 others, and derivative works that comment on or otherwise explain it
794 or assist in its implementation may be prepared, copied, published and
795 distributed, in whole or in part, without restriction of any kind,
796 provided that the above copyright notice and this paragraph are
797 included on all such copies and derivative works.  However, this
798 document itself may not be modified in any way, such as by removing
799 the copyright notice or references to the Internet Society or other
800 Internet organizations, except as needed for the purpose of developing
801 Internet standards in which case the procedures for copyrights defined
802 in the Internet Standards process must be followed, or as required to
803 translate it into languages other than English.
804
805 The limited permissions granted above are perpetual and will not be
806 revoked by the Internet Society or its successors or assigns.
807
808 This document and the information contained herein is provided on an
809 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
810 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
811 NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN
812 WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
813 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE."
814 .KE
815
816 .TC