idnits 2.17.1 draft-ietf-radext-dtls-10.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. -- The document date (16 April 2014) is 3662 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 5077 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6347 (Obsoleted by RFC 9147) -- Obsolete informational reference (is this intentional?): RFC 6982 (Obsoleted by RFC 7942) Summary: 3 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group Alan DeKok 3 INTERNET-DRAFT FreeRADIUS 4 Category: Experimental 5 6 Expires: October 15, 2015 7 16 April 2014 9 DTLS as a Transport Layer for RADIUS 10 draft-ietf-radext-dtls-10 12 Abstract 14 The RADIUS protocol defined in RFC 2865 has limited support for 15 authentication and encryption of RADIUS packets. The protocol 16 transports data in the clear, although some parts of the packets can 17 have obfuscated content. Packets may be replayed verbatim by an 18 attacker, and client-server authentication is based on fixed shared 19 secrets. This document specifies how the Datagram Transport Layer 20 Security (DTLS) protocol may be used as a fix for these problems. It 21 also describes how implementations of this proposal can co-exist with 22 current RADIUS systems. 24 Status of this Memo 26 This Internet-Draft is submitted to IETF in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF), its areas, and its working groups. Note that 31 other groups may also distribute working documents as Internet- 32 Drafts. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 The list of current Internet-Drafts can be accessed at 40 http://www.ietf.org/ietf/1id-abstracts.txt. 42 The list of Internet-Draft Shadow Directories can be accessed at 43 http://www.ietf.org/shadow.html. 45 This Internet-Draft will expire on October 15, 2014 47 Copyright Notice 48 Copyright (c) 2014 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (http://trustee.ietf.org/license-info/) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the Simplified BSD License. 61 Table of Contents 63 1. Introduction ............................................. 4 64 1.1. Terminology ......................................... 4 65 1.2. Requirements Language ............................... 5 66 1.3. Document Status ..................................... 5 67 2. Building on Existing Foundations ......................... 7 68 2.1. Changes to RADIUS ................................... 7 69 2.2. Similarities with RADIUS/TLS ........................ 8 70 2.2.1. Changes from RADIUS/TLS to RADIUS/DTLS ......... 8 71 3. Interaction with RADIUS/UDP .............................. 9 72 3.1. DTLS Port and Packet Types .......................... 10 73 3.2. Server Behavior ..................................... 10 74 4. Client Behavior .......................................... 11 75 5. Session Management ....................................... 11 76 5.1. Server Session Management ........................... 12 77 5.1.1. Session Opening and Closing .................... 12 78 5.2. Client Session Management ........................... 14 79 6. Implementation Guidelines ................................ 15 80 6.1. Client Implementations .............................. 16 81 6.2. Server Implementations .............................. 17 82 7. Diameter Considerations .................................. 17 83 8. IANA Considerations ...................................... 17 84 9. Implementation Status .................................... 18 85 9.1. Radsecproxy ......................................... 18 86 9.2. jradius ............................................. 18 87 10. Security Considerations ................................. 19 88 10.1. Crypto-Agility ..................................... 19 89 10.2. Legacy RADIUS Security ............................. 20 90 10.3. Resource Exhaustion ................................ 21 91 10.4. Client-Server Authentication with DTLS ............. 21 92 10.5. Network Address Translation ........................ 22 93 10.6. Wildcard Clients ................................... 23 94 10.7. Session Closing .................................... 23 95 10.8. Client Subsystems .................................. 23 96 11. References .............................................. 24 97 11.1. Normative references ............................... 24 98 11.2. Informative references ............................. 25 100 1. Introduction 102 The RADIUS protocol as described in [RFC2865], [RFC2866], [RFC5176], 103 and others has traditionally used methods based on MD5 [RFC1321] for 104 per-packet authentication and integrity checks. However, the MD5 105 algorithm has known weaknesses such as [MD5Attack] and [MD5Break]. 106 As a result, some specifications such as [RFC5176] have recommended 107 using IPSec to secure RADIUS traffic. 109 While RADIUS over IPSec has been widely deployed, there are 110 difficulties with this approach. The simplest point against IPSec is 111 that there is no straightforward way for an application to control or 112 monitor the network security policies. That is, the requirement that 113 the RADIUS traffic be encrypted and/or authenticated is implicit in 114 the network configuration, and cannot be enforced by the RADIUS 115 application. 117 This specification takes a different approach. We define a method 118 for using DTLS [RFC6347] as a RADIUS transport protocol. This 119 approach has the benefit that the RADIUS application can directly 120 monitor and control the security policies associated with the traffic 121 that it processes. 123 Another benefit is that RADIUS over DTLS continues to be a User 124 Datagram Protocol (UDP) based protocol. The change from RADIUS/UDP 125 is largely only to add TLS support. This allows implementations to 126 remain UDP based, without changing to a TCP architecture. 128 This specification does not, however, solve all of the problems 129 associated with RADIUS/UDP. The DTLS protocol does not add reliable 130 or in-order transport to RADIUS. DTLS also does not support 131 fragmentation of application-layer messages, or of the DTLS messages 132 themselves. This specification therefore shares with traditional 133 RADIUS the issues of order, reliability, and fragmentation. These 134 issues are dealt with in RADIUS/TCP [RFC6613] and RADIUS/TLS 135 [RFC6614]. 137 1.1. Terminology 139 This document uses the following terms: 141 RADIUS/DTLS 142 This term is a short-hand for "RADIUS over DTLS". 144 RADIUS/DTLS client 145 This term refers both to RADIUS clients as defined in [RFC2865], 146 and to Dynamic Authorization clients as defined in [RFC5176], that 147 implement RADIUS/DTLS. 149 RADIUS/DTLS server 150 This term refers both to RADIUS servers as defined in [RFC2865], 151 and to Dynamic Authorization servers as defined in [RFC5176], that 152 implement RADIUS/DTLS. 154 RADIUS/UDP 155 RADIUS over UDP, as defined in [RFC2865]. 157 RADIUS/TLS 158 RADIUS over TLS, as defined in [RFC6614]. 160 silently discard 161 This means that the implementation discards the packet without 162 further processing. 164 1.2. Requirements Language 166 In this document, several words are used to signify the requirements 167 of the specification. The key words "MUST", "MUST NOT", "REQUIRED", 168 "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", 169 and "OPTIONAL" in this document are to be interpreted as described in 170 [RFC2119]. 172 1.3. Document Status 174 This document is an Experimental RFC. 176 It is one out of several approaches to address known cryptographic 177 weaknesses of the RADIUS protocol, such as [RFC6614]. This 178 specification does not fulfill all recommendations on a AAA transport 179 profile as per [RFC3539]; however unlike [RFC6614], it is based on 180 UDP, does not have head-of-line blocking issues. 182 If this specification is indeed selected for advancement to Standards 183 Track, certificate verification options ([RFC6614] Section 2.3, point 184 2) needs to be refined. 186 Another experimental characteristic of this specification is the 187 question of key management between RADIUS/DTLS peers. RADIUS/UDP 188 only allowed for manual key management, i.e., distribution of a 189 shared secret between a client and a server. RADIUS/DTLS allows 190 manual distribution of long-term proofs of peer identity as well (by 191 using TLS-PSK ciphersuites, or identifying clients by a certificate 192 fingerprint), but as a new feature enables use of X.509 certificates 193 in a PKIX infrastructure. It remains to be seen if one of these 194 methods will prevail or if both will find their place in real-life 195 deployments. The authors can imagine pre-shared keys (PSK) to be 196 popular in small-scale deployments (Small Office, Home Office (SOHO) 197 or isolated enterprise deployments) where scalability is not an issue 198 and the deployment of a Certification Authority (CA) is considered 199 too much of a hassle; however, the authors can also imagine large 200 roaming consortia to make use of PKIX. Readers of this specification 201 are encouraged to read the discussion of key management issues within 202 [RFC6421] as well as [RFC4107]. 204 It has yet to be decided whether this approach is to be chosen for 205 Standards Track. One key aspect to judge whether the approach is 206 usable on a large scale is by observing the uptake, usability, and 207 operational behavior of the protocol in large-scale, real-life 208 deployments. 210 2. Building on Existing Foundations 212 Adding DTLS as a RADIUS transport protocol requires a number of 213 changes to systems implementing standard RADIUS. This section 214 outlines those changes, and defines new behaviors necessary to 215 implement DTLS. 217 2.1. Changes to RADIUS 219 The RADIUS packet format is unchanged from [RFC2865], [RFC2866], and 220 [RFC5176]. Specifically, all of the following portions of RADIUS 221 MUST be unchanged when using RADIUS/DTLS: 223 * Packet format 224 * Permitted codes 225 * Request Authenticator calculation 226 * Response Authenticator calculation 227 * Minimum packet length 228 * Maximum packet length 229 * Attribute format 230 * Vendor-Specific Attribute (VSA) format 231 * Permitted data types 232 * Calculations of dynamic attributes such as CHAP-Challenge, 233 or Message-Authenticator. 234 * Calculation of "obfuscated" attributes such as User-Password 235 and Tunnel-Password. 237 In short, the application creates a RADIUS packet via the usual 238 methods, and then instead of sending it over a UDP socket, sends the 239 packet to a DTLS layer for encapsulation. DTLS then acts as a 240 transport layer for RADIUS, hence the names "RADIUS/UDP" and 241 "RADIUS/DTLS". 243 The requirement that RADIUS remain largely unchanged ensures the 244 simplest possible implementation and widest interoperability of this 245 specification. 247 We note that the DTLS encapsulation of RADIUS means that RADIUS 248 packets have an additional overhead due to DTLS. Implementations 249 MUST support sending and receiving encapsulated RADIUS packets of 250 4096 octets in length, with a corresponding increase in the maximum 251 size of the encapsulated DTLS packets. This larger packet size may 252 cause the packet to be larger than the Path MTU (PMTU), where a 253 RADIUS/UDP packet may be smaller. See Section 5.2, below, for more 254 discussion. 256 The only changes made from RADIUS/UDP to RADIUS/DTLS are the 257 following two items: 259 (1) The Length checks defined in [RFC2865] Section 3 MUST use the 260 length of the decrypted DTLS data instead of the UDP packet 261 length. They MUST treat any decrypted DTLS data octets outside 262 the range of the Length field as padding, and ignore it on 263 reception. 265 (2) The shared secret secret used to compute the MD5 integrity 266 checks and the attribute encryption MUST be "radius/dtls". 268 All other aspects of RADIUS are unchanged. 270 2.2. Similarities with RADIUS/TLS 272 While this specification can be thought of as RADIUS/TLS over UDP 273 instead of the Transmission Control Protocol (TCP), there are some 274 differences between the two methods. The bulk of [RFC6614] applies 275 to this specification, so we do not repeat it here. 277 This section explains the differences between RADIUS/TLS and 278 RADIUS/DTLS, as semantic "patches" to [RFC6614]. The changes are as 279 follows: 281 * We replace references to "TCP" with "UDP" 283 * We replace references to "RADIUS/TLS" with "RADIUS/DTLS" 285 * We replace references to "TLS" with "DTLS" 287 Those changes are sufficient to cover the majority of the differences 288 between the two specifications. The next section reviews some more 289 detailed changes from [RFC6614], giving additional commentary only 290 where necessary. 292 2.2.1. Changes from RADIUS/TLS to RADIUS/DTLS 294 This section describes where this specification is similar to 295 [RFC6614], and where it differs. 297 Section 2.1 applies to RADIUS/DTLS, with the exception that the 298 RADIUS/DTLS port is UDP/2083. 300 Section 2.2 applies to RADIUS/DTLS. Servers and clients need to be 301 preconfigured to use RADIUS/DTLS for a given endpoint. 303 Most of Section 2.3 applies also to RADIUS/DTLS. Item (1) should be 304 interpreted as applying to DTLS session initiation, instead of TCP 305 connection establishment. Item (2) applies, except for the 306 recommendation that implementations "SHOULD" support 307 TLS_RSA_WITH_RC4_128_SHA. This recommendation is a historical 308 artifact of RADIUS/TLS, and does not apply to RADIUS/DTLS. Item (3) 309 applies to RADIUS/DTLS. Item (4) applies, except that the fixed 310 shared secret is "radius/dtls", as described above. 312 Section 2.4 applies to RADIUS/DTLS. Client identities SHOULD be 313 determined from DTLS parameters, instead of relying solely on the 314 source IP address of the packet. 316 Section 2.5 does not apply to RADIUS/DTLS. The relationship between 317 RADIUS packet codes and UDP ports in RADIUS/DTLS is unchanged from 318 RADIUS/UDP. 320 Sections 3.1, 3.2, and 3.3 apply to RADIUS/DTLS. 322 Section 3.4 item (1) does not apply to RADIUS/DTLS. Each RADIUS 323 packet is encapsulated in one DTLS packet, and there is no "stream" 324 of RADIUS packets inside of a TLS session. Implementors MUST enforce 325 the requirements of [RFC2865] Section 3 for the RADIUS Length field, 326 using the length of the decrypted DTLS data for the checks. This 327 check replaces the RADIUS method of using the length field from the 328 UDP packet. 330 Section 3.4 items (2), (3), (4), and (5) apply to RADIUS/DTLS. 332 Section 4 does not apply to RADIUS/DTLS. Protocol compatibility 333 considerations are defined in this document. 335 Section 6 applies to RADIUS/DTLS. 337 3. Interaction with RADIUS/UDP 339 Transitioning to DTLS is a process which needs to be done carefully. 340 A poorly handled transition is complex for administrators, and 341 potentially subject to security downgrade attacks. It is not 342 sufficient to just disable RADIUS/UDP and enable RADIUS/DTLS. RADIUS 343 has no provisions for protocol negotiation, so simply disabling 344 RADIUS/UDP would result in timeouts, lost traffic, and network 345 instabilities. 347 The end result of this specification is that nearly all RADIUS/UDP 348 implementations should transition to using a secure alternative. In 349 some cases, RADIUS/UDP may remain where IPSec is used as a transport, 350 or where implementation and/or business reasons preclude a change. 351 However, we do not recommend long-term use of RADIUS/UDP outside of 352 isolated and secure networks. 354 This section describes how clients and servers should use 355 RADIUS/DTLS, and how it interacts with RADIUS/UDP. 357 3.1. DTLS Port and Packet Types 359 The default destination port number for RADIUS/DTLS is UDP/2083. 360 There are no separate ports for authentication, accounting, and 361 dynamic authorization changes. The source port is arbitrary. The 362 text above in [RFC6614] Section 3.4 describes issues surrounding the 363 use of one port for multiple packet types. We recognize that 364 implementations may allow the the use of RADIUS/DTLS over non- 365 standard ports. In that case, the references to UDP/2083 in this 366 document should be read as applying to any port used for transport of 367 RADIUS/DTLS traffic. 369 3.2. Server Behavior 371 When a server receives packets on UDP/2083, all packets MUST be 372 treated as being DTLS. RADIUS/UDP packets MUST NOT be accepted on 373 this port. 375 Servers MUST NOT accept DTLS packets on the old RADIUS/UDP ports. 376 Early drafts of this specification permitted this behavior. It is 377 forbidden here, as it depended on behavior in DTLS which may change 378 without notice. 380 As RADIUS has no provisions for capability signalling, there is no 381 way for a RADIUS server to indicate to a client that it should 382 transition to using DTLS. This action has to be taken by the 383 administrators of the two systems, using a method other than RADIUS. 384 This method will likely be out of band, or manual configuration. 386 Some servers maintain a list of allowed clients per destination port. 387 Others maintain a global list of clients, which are permitted to send 388 packets to any port. Where a client can send packets to multiple 389 ports, the server MUST maintain a "DTLS Required" flag per client. 391 This flag indicates whether or not the client is required to use 392 DTLS. When set, the flag indicates that the only traffic accepted 393 from the client is over UDP/2083. When packets are received from a 394 client on non-DTLS ports, for which DTLS is required, the server MUST 395 silently discard these packets, as there is no RADIUS/UDP shared 396 secret available. 398 This flag will often be set by an administrator. However, if a 399 server receives DTLS traffic from a client, it SHOULD notify the 400 administrator that DTLS is available for that client. It MAY mark 401 the client as "DTLS Required". 403 Allowing RADIUS/UDP and RADIUS/DTLS from the same client exposes the 404 traffic to downbidding attacks, and is NOT RECOMMENDED. 406 4. Client Behavior 408 When a client sends packets to the assigned RADIUS/DTLS port, all 409 packets MUST be DTLS. RADIUS/UDP packets MUST NOT be sent to this 410 port. 412 RADIUS/DTLS clients SHOULD NOT probe servers to see if they support 413 DTLS transport. Instead, clients SHOULD use DTLS as a transport 414 layer only when administratively configured. If a client is 415 configured to use DTLS and the server appears to be unresponsive, the 416 client MUST NOT fall back to using RADIUS/UDP. Instead, the client 417 should treat the server as being down. 419 RADIUS clients often had multiple independent RADIUS implementations 420 and/or processes that originate packets. This practice was simple to 421 implement, but the result is that each independent subsystem must 422 independently discover network issues or server failures. It is 423 therefore RECOMMENDED that clients with multiple internal RADIUS 424 sources use a local proxy as described in Section 6.1, below. 426 Clients may implement "pools" of servers for fail-over or load- 427 balancing. These pools SHOULD NOT mix RADIUS/UDP and RADIUS/DTLS 428 servers. 430 5. Session Management 432 Where [RFC6614] can rely on the TCP state machine to perform session 433 tracking, this specification cannot. As a result, implementations of 434 this specification may need to perform session management of the DTLS 435 session in the application layer. This section describes logically 436 how this tracking is done. Implementations may choose to use the 437 method described here, or another, equivalent method. 439 We note that [RFC5080] Section 2.2.2 already mandates a duplicate 440 detection cache. The session tracking described below can be seen as 441 an extension of that cache, where entries contain DTLS sessions 442 instead of RADIUS/UDP packets. 444 [RFC5080] section 2.2.2 describes how duplicate RADIUS/UDP requests 445 result in the retransmission of a previously cached RADIUS/UDP 446 response. Due to DTLS sequence window requirements, a server MUST 447 NOT retransmit a previously sent DTLS packet. Instead, it should 448 cache the RADIUS response packet, and re-process it through DTLS to 449 create a new RADIUS/DTLS packet, every time it is necessary to 450 retransmit a RADIUS response. 452 5.1. Server Session Management 454 A RADIUS/DTLS server MUST track ongoing DTLS sessions for each based 455 the following 4-tuple: 457 * source IP address 458 * source port 459 * destination IP address 460 * destination port 462 Note that this 4-tuple is independent of IP address version (IPv4 or 463 IPv6). 465 Each 4-tuple points to a unique session entry, which usually contain 466 the following information: 468 DTLS Session 469 Any information required to maintain and manage the DTLS session. 471 Last Taffic 472 A variable containing a timestamp which indicates when this session 473 last received valid traffic. If "Last Traffic" is not used, this 474 variable may not exist. 476 DTLS Data 477 An implementation-specific variable which may information about the 478 active DTLS session. This variable may be empty or non existent. 480 This data will typically contain information such as idle timeouts, 481 session lifetimes, and other implementation-specific data. 483 5.1.1. Session Opening and Closing 485 Session tracking is subject to Denial of Service (DoS) attacks due to 486 the ability of an attacker to forge UDP traffic. RADIUS/DTLS servers 487 SHOULD use the stateless cookie tracking technique described in 488 [RFC6347] Section 4.2.1. DTLS sessions SHOULD NOT be tracked until a 489 ClientHello packet has been received with an appropriate Cookie 490 value. Server implementation SHOULD have a way of tracking partially 491 setup DTLS sessions. Servers SHOULD limit both the number and impact 492 on resources of partial sessions. 494 Sessions (both 4-tuple and entry) MUST be deleted when a TLS Closure 495 Alert ([RFC5246] Section 7.2.1) or a fatal TLS Error Alert ([RFC5246] 496 Section 7.2.2) is received. When a session is deleted due to it 497 failing security requirements, the DTLS session MUST be closed, and 498 any TLS session resumption parameters for that session MUST be 499 discarded, and all tracking information MUST be deleted. 501 Sessions MUST also be deleted when a RADIUS packet fails validation 502 due to a packet being malformed, or when it has an invalid Message- 503 Authenticator, or invalid Request Authenticator. There are other 504 cases when the specifications require that a packet received via a 505 DTLS session be "silently discarded". In those cases, 506 implementations MAY delete the underlying session as described above. 507 There are few reasons to communicate with a NAS which is not 508 implementing RADIUS. 510 A session MUST be deleted when non-RADIUS traffic is received over 511 it. This specification is for RADIUS, and there is no reason to 512 allow non-RADIUS traffic over a RADIUS/DTLS session. A session MUST 513 be deleted when RADIUS traffic fails to pass security checks. There 514 is no reason to permit insecure networks. A session SHOULD NOT be 515 deleted when a well-formed, but "unexpected" RADIUS packet is 516 received over it. Future specifications may extend RADIUS/DTLS, and 517 we do not want to forbid those specifications. 519 The goal of the above requirements is to ensure security, while 520 maintaining flexibility. Any security related issue causes the 521 connection to be closed. After the security restrictions have been 522 applied, any unexpected traffic may be safely ignored, as it cannot 523 cause a security issue. There is no need to close the session for 524 unexpected but valid traffic, and the session can safely remain open. 526 Once a DTLS session is established, a RADIUS/DTLS server SHOULD use 527 DTLS Heartbeats [RFC6520] to determine connectivity between the two 528 servers. A server SHOULD also use watchdog packets from the client 529 to determine that the session is still active. 531 As UDP does not guarantee delivery of messages, RADIUS/DTLS servers 532 which do not implement an application-layer watchdog MUST also 533 maintain a "Last Traffic" timestamp per DTLS session. The 534 granularity of this timestamp is not critical, and could be limited 535 to one second intervals. The timestamp SHOULD be updated on 536 reception of a valid RADIUS/DTLS packet, or a DTLS Heartbeat, but no 537 more than once per interval. The timestamp MUST NOT be updated in 538 other situations. 540 When a session has not received a packet for a period of time, it is 541 labelled "idle". The server SHOULD delete idle DTLS sessions after 542 an "idle timeout". The server MAY cache the TLS session parameters, 543 in order to provide for fast session resumption. 545 This session "idle timeout" SHOULD be exposed to the administrator as 546 a configurable setting. It SHOULD NOT be set to less than 60 547 seconds, and SHOULD NOT be set to more than 600 seconds (10 minutes). 548 The minimum value useful value for this timer is determined by the 549 application-layer watchdog mechanism defined in the following 550 section. 552 RADIUS/DTLS servers SHOULD also monitor the total number of open 553 sessions. They SHOULD have a "maximum sessions" setting exposed to 554 administrators as a configurable parameter. When this maximum is 555 reached and a new session is started, the server MUST either drop an 556 old session in order to open the new one, or instead not create a new 557 session. 559 RADIUS/DTLS servers SHOULD implement session resumption, preferably 560 stateless session resumption as given in [RFC5077]. This practice 561 lowers the time and effort required to start a DTLS session with a 562 client, and increases network responsiveness. 564 Since UDP is stateless, the potential exists for the client to 565 initiate a new DTLS session using a particular 4-tuple, before the 566 server has closed the old session. For security reasons, the server 567 MUST keep the old session active until either it has received secure 568 notification from the client that the session is closed, or when the 569 server decides to close the session based on idle timeouts. Taking 570 any other action would permit unauthenticated clients to perform a 571 DoS attack, by re-using a 4-tuple, and thus causing the server to 572 close an active (and authenticated) DTLS session. 574 As a result, servers MUST ignore any attempts to re-use an existing 575 4-tuple from an active session. This requirement can likely be 576 reached by simply processing the packet through the existing session, 577 as with any other packet received via that 4-tuple. Non-compliant, 578 or unexpected packets will be ignored by the DTLS layer. 580 The above requirement is mitigated by the suggestion in Section 6.1, 581 below, that the client use a local proxy for all RADIUS traffic. 582 That proxy can then track the ports which it uses, and ensure that 583 re-use of 4-tuples is avoided. The exact process by which this 584 tracking is done is outside of the scope of this document. 586 5.2. Client Session Management 588 Clients SHOULD use PMTU discovery [RFC6520] to determine the PMTU 589 between the client and server, prior to sending any RADIUS traffic. 590 Once a DTLS session is established, a RADIUS/DTLS client SHOULD use 591 DTLS Heartbeats [RFC6520] to determine connectivity between the two 592 systems. RADIUS/DTLS clients SHOULD also use the application-layer 593 watchdog algorithm defined in [RFC3539] to determine server 594 responsiveness. The Status-Server packet defined in [RFC5997] SHOULD 595 be used as the "watchdog packet" in any application-layer watchdog 596 algorithm. 598 RADIUS/DTLS clients SHOULD pro-actively close sessions when they have 599 been idle for a period of time. Clients SHOULD close a session when 600 the DTLS Heartbeat algorithm indicates that the session is no longer 601 active. Clients SHOULD close a session when no traffic other than 602 watchdog packets and (possibly) watchdog responses have been sent for 603 three watchdog timeouts. This behavior ensures that clients do not 604 waste resources on the server by causing it to track idle sessions. 606 When client fails to implement both DTLS heartbeats and watchdog 607 packets, it has no way of knowing that a DTLS session has been 608 closed. There is therefore the possibility that the server closes 609 the session without the client knowing. When that happens, the 610 client may later transmit packets in a session, and those packets 611 will be ignored by the server. The client is then forced to time out 612 those packets and then the session, leading to delays and network 613 instabilities. 615 For these reasons, it is RECOMMENDED that all DTLS sessions are 616 configured to use DTLS heartbeats and/or watchdog packets. 618 DTLS sessions MUST also be deleted when a RADIUS packet fails 619 validation due to a packet being malformed, or when it has an invalid 620 Message-Authenticator, or invalid Response Authenticator. There are 621 other cases when the specifications require that a packet received 622 via a DTLS session be "silently discarded". In those cases, 623 implementations MAY delete the underlying DTLS session. 625 RADIUS/DTLS clients should not send both RADIUS/UDP and RADIUS/DTLS 626 packets to different servers from the same source socket. This 627 practice causes increased complexity in the client application, and 628 increases the potential for security breaches due to implementation 629 issues. 631 RADIUS/DTLS clients SHOULD implement session resumption, preferably 632 stateless session resumption as given in [RFC5077]. This practice 633 lowers the time and effort required to start a DTLS session with a 634 server, and increases network responsiveness. 636 6. Implementation Guidelines 638 The text above describes the protocol. In this section, we give 639 additional implementation guidelines. These guidelines are not part 640 of the protocol, but may help implementors create simple, secure, and 641 inter-operable implementations. 643 Where a TLS pre-shared key (PSK) method is used, implementations MUST 644 support keys of at least 16 octets in length. Implementations SHOULD 645 support key lengths of 32 octets, and SHOULD allow for longer keys. 647 The key data MUST be capable of being any value (0 through 255, 648 inclusive). Implementations MUST NOT limit themselves to using 649 textual keys. It is RECOMMENDED that the administration interface 650 allows for the keys to be entered as humanly readable strings in hex 651 format. 653 When creating keys, it is RECOMMENDED that keys be derived from a 654 cryptographically secure pseudo-random number generator (CSPRNG) 655 instead of allowing administrators to invent "secure" keys on theur 656 own. If managing keys is too complicated, a certificate-based TLS 657 method SHOULD be used instead. 659 6.1. Client Implementations 661 RADIUS/DTLS clients should use connected sockets where possible. Use 662 of connected sockets means that the underlying kernel tracks the 663 sessions, so that the client subsystem does not need to multiple 664 multiple sessions on one socket. 666 RADIUS/DTLS clients should use a single source (IP + port) when 667 sending packets to a particular RADIUS/DTLS server. Doing so 668 minimizes the number of DTLS session setups. It also ensures that 669 information about the home server state is discovered only once. 671 In practice, this means that RADIUS/DTLS clients with multiple 672 internal RADIUS sources should use a local proxy which arbitrates all 673 RADIUS traffic between the client and all servers. The proxy should 674 accept traffic only from the authorized subsystems on the client 675 machine, and should proxy that traffic to known servers. Each 676 authorized subsystem should include an attribute which uniquely 677 identifies that subsystem to the proxy, so that the proxy can apply 678 origin-specific proxy rules and security policies. We suggest using 679 NAS-Identifier for this purpose. 681 The local proxy should be able to interact with multiple servers at 682 the same time. There is no requirement that each server have its own 683 unique proxy on the client, as that would be inefficient. 685 The suggestion to use a local proxy means that there is only one 686 process which discovers network and/or connectivity issues with a 687 server. If each client subsystem communicated directly with a 688 server, issues with that server would have to be discovered 689 independently by each subsystem. The side effect would be increased 690 delays in re-routing traffic, error reporting, and network 691 instabilities. 693 Each client subsystem can include a subsystem-specific NAS-Identifier 694 in each request. The format of this attribute is implementation- 695 specific. The proxy should verify that the request originated from 696 the local system, ideally via a loopback address. The proxy MUST 697 then re-write any subsystem-specific NAS-Identifier to a NAS- 698 Identifier which identifies the client as a whole. Or, remove NAS- 699 Identifier entirely and replace it with NAS-IP-Address or NAS- 700 IPv6-Address. 702 In traditional RADIUS, the cost to set up a new "session" between a 703 client and server was minimal. The client subsystem could simply 704 open a port, send a packet, wait for the response, and the close the 705 port. With RADIUS/DTLS, the connection setup is significantly more 706 expensive. In addition, there may be a requirement to use DTLS in 707 order to communicate with a server, as RADIUS/UDP may not be 708 supported by that server. The knowledge of what protocol to use is 709 best managed by a dedicated RADIUS subsystem, rather than by each 710 individual subsystem on the client. 712 6.2. Server Implementations 714 RADIUS/DTLS servers should not use connected sockets to read DTLS 715 packets from a client. This recommendation is because a connected 716 UDP socket will accept packets only from one source IP address and 717 port. This limitation would prevent the server from accepting 718 packets from multiple clients on the same port. 720 7. Diameter Considerations 722 This specification defines a transport layer for RADIUS. It makes no 723 other changes to the RADIUS protocol. As a result, there are no 724 Diameter considerations. 726 8. IANA Considerations 728 No new RADIUS attributes or packet codes are defined. IANA is 729 requested to update the "Service Name and Transport Protocol Port 730 Number Registry". The entry corresponding to port service name 731 "radsec", port number "2083", and transport protocol "UDP" should be 732 updated as follows: 734 o Assignee: change "Mike McCauley" to "IESG". 736 o Contact: change ""Mike McCauley" to "IETF Chair" 738 o Reference: Add this document as a reference 740 o Assignment Notes: add the text "The UDP port 2083 was already 741 previously assigned by IANA for "RadSec", an early implementation 742 of RADIUS/TLS, prior to issuance of this RFC." 744 9. Implementation Status 746 This section records the status of known implementations of 747 RADIUS/DTLS at the time of posting of this Internet- Draft, and is 748 based on a proposal described in [RFC6982]. 750 The description of implementations in this section is intended to 751 assist the IETF in its decision processes in progressing drafts to 752 RFCs. 754 9.1. Radsecproxy 756 Organization: Radsecproxy 758 URL: https://software.uninett.no/radsecproxy/ 760 Maturity: Widely-used software based on early drafts of this 761 document. 762 The use of the DTLS functionality is not clear. 764 Coverage: The bulk of this specification is implemented, based on 765 earlier versions of this document. Exact revisions 766 which were implemented are unknown. 768 Licensing: Freely distributable with acknowledgement 770 Implementation experience: No comments from implementors. 772 9.2. jradius 774 Organization: Coova 776 URL: http://www.coova.org/JRadius/RadSec 778 Maturity: Production software based on early drafts of this 779 document. 780 The use of the DTLS functionality is not clear. 782 Coverage: The bulk of this specification is implemented, based on 783 earlier versions of this document. Exact revisions 784 which were implemented are unknown. 786 Licensing: Freely distributable with requirement to 787 redistribute source. 789 Implementation experience: No comments from implementors. 791 10. Security Considerations 793 The bulk of this specification is devoted to discussing security 794 considerations related to RADIUS. However, we discuss a few 795 additional issues here. 797 This specification relies on the existing DTLS, RADIUS/UDP, and 798 RADIUS/TLS specifications. As a result, all security considerations 799 for DTLS apply to the DTLS portion of RADIUS/DTLS. Similarly, the 800 TLS and RADIUS security issues discussed in [RFC6614] also apply to 801 this specification. Most of the security considerations for RADIUS 802 apply to the RADIUS portion of the specification. 804 However, many security considerations raised in the RADIUS documents 805 are related to RADIUS encryption and authorization. Those issues are 806 largely mitigated when DTLS is used as a transport method. The 807 issues that are not mitigated by this specification are related to 808 the RADIUS packet format and handling, which is unchanged in this 809 specification. 811 This specification also suggests that implementations use a session 812 tracking table. This table is an extension of the duplicate 813 detection cache mandated in [RFC5080] Section 2.2.2. The changes 814 given here are that DTLS-specific information is tracked for each 815 table entry. Section 5.1.1, above, describes steps to mitigate any 816 DoS issues which result from tracking additional information. 818 The fixed shared secret given above in Section 2.2.1 is acceptible 819 only when DTLS is used with an non-null encryption method. When a 820 DTLS session uses a null encryption method due to misconfiguration or 821 implementation error, all of the RADIUS traffic will be readable by 822 an observer. Implementations therefore MUST NOT use null encryption 823 methods for RADIUS/DTLS. 825 For systems which perform protocol-based firewalling and/or 826 filtering, it is RECOMMENDED that they be configured to permit only 827 DTLS over the RADIUS/DTLS port. Where deep packet inspection is 828 possible, there should be further restrictions to allow only RADIUS 829 packets inside of the DTLS session. 831 10.1. Crypto-Agility 833 Section 4.2 of [RFC6421] makes a number of recommendations about 834 security properties of new RADIUS proposals. All of those 835 recommendations are satisfied by using DTLS as the transport layer. 837 Section 4.3 of [RFC6421] makes a number of recommendations about 838 backwards compatibility with RADIUS. Section 3, above, addresses 839 these concerns in detail. 841 Section 4.4 of [RFC6421] recommends that change control be ceded to 842 the IETF, and that interoperability is possible. Both requirements 843 are satisfied. 845 Section 4.5 of [RFC6421] requires that the new security methods apply 846 to all packet types. This requirement is satisfied by allowing DTLS 847 to be used for all RADIUS traffic. In addition, Section 3, above, 848 addresses concerns about documenting the transition from legacy 849 RADIUS to crypto-agile RADIUS. 851 Section 4.6 of [RFC6421] requires automated key management. This 852 requirement is satisfied by using DTLS key management. 854 10.2. Legacy RADIUS Security 856 We reiterate here the poor security of the legacy RADIUS protocol. 857 We suggest that RADIUS clients and servers implement either this 858 specification, or [RFC6614]. New attacks on MD5 have appeared over 859 the past few years, and there is a distinct possibility that MD5 may 860 be completely broken in the near future. Such a break would mean 861 that RADIUS/UDP was completely insecure. 863 The existence of fast and cheap attacks on MD5 could result in a loss 864 of all network security which depends on RADIUS. Attackers could 865 obtain user passwords, and possibly gain complete network access. We 866 cannot overstate the disastrous consequences of a successful attack 867 on RADIUS. 869 We also caution implementors (especially client implementors) about 870 using RADIUS/DTLS. It may be tempting to use the shared secret as 871 the basis for a TLS pre-shared key (PSK) method, and to leave the 872 user interface otherwise unchanged. This practice MUST NOT be used. 873 The administrator MUST be given the option to use DTLS. Any shared 874 secret used for RADIUS/UDP MUST NOT be used for DTLS. Re-using a 875 shared secret between RADIUS/UDP and RADIUS/DTLS would negate all of 876 the benefits found by using DTLS. 878 RADIUS/DTLS client implementors MUST expose a configuration that 879 allows the administrator to choose the cipher suite. Where 880 certificates are used, RADIUS/DTLS client implementors MUST expose a 881 configuration which allows an administrator to configure all 882 certificates necessary for certificate-based authentication. These 883 certificates include client, server, and root certificates. 885 TLS-PSK methods are susceptible to dictionary attacks. Section 6, 886 above, recommends deriving TLS-PSK keys from a Cryptographically 887 Secure Pseudo-Random Number Generator (CSPRNG), which makes 888 dictionary attacks significantly more difficult. Servers SHOULD 889 track failed client connections by TLS-PSK ID, and block TLS-PSK IDs 890 which seem to be attempting brute-force searchs of the keyspace. 892 The historic RADIUS practice of using shared secrets (here, PSKs) 893 that are minor variations of words is NOT RECOMMENDED, as it would 894 negate all of the security of DTLS. 896 10.3. Resource Exhaustion 898 The use of DTLS allows DoS attacks, and resource exhaustion attacks 899 which were not possible in RADIUS/UDP. These attacks are the similar 900 to those described in [RFC6614] Section 6, for TCP. 902 Session tracking as described in Section 5.1 can result in resource 903 exhaustion. Servers MUST therefore limit the absolute number of 904 sessions that they track. When the total number of sessions tracked 905 is going to exceed the configured limit, servers MAY free up 906 resources by closing the session which has been idle for the longest 907 time. Doing so may free up idle resources which then allow the 908 server to accept a new session. 910 Servers MUST limit the number of partially open DTLS sessions. These 911 limits SHOULD be exposed to the administrator as configurable 912 settings. 914 10.4. Client-Server Authentication with DTLS 916 We expect that the initial deployment of DTLS will be follow the 917 RADIUS/UDP model of statically configured client-server 918 relationships. The specification for dynamic discovery of RADIUS 919 servers is under development, so we will not address that here. 921 Static configuration of client-server relationships for RADIUS/UDP 922 means that a client has a fixed IP address for a server, and a shared 923 secret used to authenticate traffic sent to that address. The server 924 in turn has a fixed IP address for a client, and a shared secret used 925 to authenticate traffic from that address. This model needs to be 926 extended for RADIUS/DTLS. 928 When DTLS is used, the fixed IP address model can be relaxed. As 929 discussed earlier in Section 2.2.1, client identities should be 930 determined from TLS parameters. Any authentication credentials for 931 that client are then determined solely from the client identity, and 932 not from an IP address. See [RFC6614] Section 2.4 for a discussion 933 of how to match a certificate to a client identity. 935 However, servers SHOULD use IP address filtering to minimize the 936 possibility of attacks. That is, they SHOULD permit clients only 937 from a particular IP address range or ranges. They SHOULD silently 938 discard all traffic from outside of those ranges. 940 Since the client-server relationship is static, the authentication 941 credentials for that relationship should also be statically 942 configured. That is, a client connecting to a DTLS server SHOULD be 943 pre-configured with the servers credentials (e.g. PSK or 944 certificate). If the server fails to present the correct 945 credentials, the DTLS session MUST be closed. 947 The above requirement can be met by using a private Certificate 948 Authority (CA) for certificates used in RADIUS/DTLS environments. If 949 a client were configured to use a public CA, then it could accept as 950 valid any server which has a certificate signed by that CA. While 951 the traffic would be secure from third-party observers, the server 952 would, howrver, have unrestricted access to all of the RADIUS 953 traffic, including all user credentials and passwords. 955 Therefore, clients SHOULD NOT be pre-configured with a list of known 956 public CAs by the vendor or manufacturer. Instead, the clients 957 SHOULD start off with an empty CA list. The addition of a CA SHOULD 958 be done only when manually configured by an administrator. 960 This scenario is the opposite of web browsers, where they are pre- 961 configured with many known CAs. The goal there is security from 962 third-party observers, but also the ability to communicate with any 963 unknown site which presents a signed certificate. In contrast, the 964 goal of RADIUS/DTLS is both security from third-party observers, and 965 the ability to communicate with only a small set of well-known 966 servers. 968 This requirement does not prevent clients from using hostnames 969 instead of IP addresses for locating a particular server. Instead, 970 it means that the credentials for that server should be 971 preconfigured, and strongly tied to that hostname. This requirement 972 does suggest that in the absence of a specification for dynamic 973 discovery, clients SHOULD use only those servers which have been 974 manually configured by an administrator. 976 10.5. Network Address Translation 978 Network Address Translation (NAT) is fundamentally incompatible with 979 RADIUS/UDP. RADIUS/UDP uses the source IP address to determine the 980 shared secret for the client, and NAT hides many clients behind one 981 source IP address. 983 In addition, port re-use on a NAT gateway means that packets from 984 different clients may appear to come from the same source port on the 985 NAT. That is, a RADIUS server may receive a RADIUS/DTLS packet from 986 a client IP/port combination, followed by the reception of a 987 RADIUS/UDP packet from that same client IP/port combination. If this 988 behavior is allowed, then the client would have an inconsistent 989 security profile, allowing an attacker to choose the most insecure 990 method. 992 As a result, RADIUS/UDP clients SHOULD NOT be located behind a NAT 993 gateway. If clients are located behind a NAT gateway, then a secure 994 transport such as DTLS MUST be used. As discussed below, a method 995 for uniquely identifying each client MUST be used. 997 10.6. Wildcard Clients 999 Some RADIUS server implementations allow for "wildcard" clients. 1000 That is, clients with an IPv4 netmask of other than 32, or an IPv6 1001 netmask of other than 128. That practice is not recommended for 1002 RADIUS/UDP, as it means multiple clients use the same shared secret. 1004 The use of RADIUS/DTLS can allow for the safe usage of wildcards. 1005 When RADIUS/DTLS is used with wildcards, clients MUST be uniquely 1006 identified using TLS parameters, and any certificate or PSK used MUST 1007 be unique to each client. 1009 10.7. Session Closing 1011 Section 5.1.1, above, requires that DTLS sessions be closed when the 1012 transported RADIUS packets are malformed, or fail the authenticator 1013 checks. The reason is that the session is expected to be used for 1014 transport of RADIUS packets only. 1016 Any non-RADIUS traffic on that session means the other party is 1017 misbehaving, and is a potential security risk. Similarly, any RADIUS 1018 traffic failing authentication vector or Message-Authenticator 1019 validation means that two parties do not have a common shared secret, 1020 and the session is therefore unauthenticated and insecure. 1022 We wish to avoid the situation where a third party can send well- 1023 formed RADIUS packets which cause a DTLS session to close. 1024 Therefore, in other situations, the session SHOULD remain open in the 1025 face of non-conformant packets. 1027 10.8. Client Subsystems 1029 Many traditional clients treat RADIUS as subsystem-specific. That 1030 is, each subsystem on the client has its own RADIUS implementation 1031 and configuration. These independent implementations work for simple 1032 systems, but break down for RADIUS when multiple servers, fail-over, 1033 and load-balancing are required. They have even worse issues when 1034 DTLS is enabled. 1036 As noted in Section 6.1, above, clients SHOULD use a local proxy 1037 which arbitrates all RADIUS traffic between the client and all 1038 servers. This proxy will encapsulate all knowledge about servers, 1039 including security policies, fail-over, and load-balancing. All 1040 client subsystems SHOULD communicate with this local proxy, ideally 1041 over a loopback address. The requirements on using strong shared 1042 secrets still apply. 1044 The benefit of this configuration is that there is one place in the 1045 client which arbitrates all RADIUS traffic. Subsystems which do not 1046 implement DTLS can remain unaware of DTLS. DTLS sessions opened by 1047 the proxy can remain open for long periods of time, even when client 1048 subsystems are restarted. The proxy can do RADIUS/UDP to some 1049 servers, and RADIUS/DTLS to others. 1051 Delegation of responsibilities and separation of tasks are important 1052 security principles. By moving all RADIUS/DTLS knowledge to a DTLS- 1053 aware proxy, security analysis becomes simpler, and enforcement of 1054 correct security becomes easier. 1056 11. References 1058 11.1. Normative references 1060 [RFC2865] 1061 Rigney, C., Willens, S., Rubens, A. and W. Simpson, "Remote 1062 Authentication Dial In User Service (RADIUS)", RFC 2865, June 2000. 1064 [RFC3539] 1065 Aboba, B. et al., "Authentication, Authorization and Accounting 1066 (AAA) Transport Profile", RFC 3539, June 2003. 1068 [RFC5077] 1069 Salowey, J, et al., "Transport Layer Security (TLS) Session 1070 Resumption without Server-Side State", RFC 5077, January 2008 1072 [RFC5080] 1073 Nelson, D. and DeKok, A, "Common Remote Authentication Dial In User 1074 Service (RADIUS) Implementation Issues and Suggested Fixes", RFC 1075 5080, December 2007. 1077 [RFC5246] 1078 Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) 1079 Protocol Version 1.2", RFC 5246, August 2008. 1081 [RFC5997] 1082 DeKok, A., "Use of Status-Server Packets in the Remote 1083 Authentication Dial In User Service (RADIUS) Protocol", RFC 5997, 1084 August 2010. 1086 [RFC6347] 1087 Rescorla E., and Modadugu, N., "Datagram Transport Layer Security", 1088 RFC 6347, April 2006. 1090 [RFC6520] 1091 Seggelmann, R., et al.,"Transport Layer Security (TLS) and Datagram 1092 Transport Layer Security (DTLS) Heartbeat Extension", RFC 6520, 1093 February 2012. 1095 [RFC6613] 1096 DeKok, A., "RADIUS over TCP", RFFC 6613, May 2012 1098 [RFC6614] 1099 Winter. S, et. al., "TLS encryption for RADIUS over TCP", RFFC 1100 6614, May 2012 1102 11.2. Informative references 1104 [RFC1321] 1105 Rivest, R. and S. Dusse, "The MD5 Message-Digest Algorithm", RFC 1106 1321, April 1992. 1108 [RFC2119] 1109 Bradner, S., "Key words for use in RFCs to Indicate Requirement 1110 Levels", RFC 2119, March, 1997. 1112 [RFC2866] 1113 Rigney, C., "RADIUS Accounting", RFC 2866, June 2000. 1115 [RFC4107] 1116 Bellovin, S. and R. Housley, "Guidelines for Cryptographic Key 1117 Management", BCP 107, RFC 4107, June 2005. 1119 [RFC5176] 1120 Chiba, M. et al., "Dynamic Authorization Extensions to Remote 1121 Authentication Dial In User Service (RADIUS)", RFC 5176, January 1122 2008. 1124 [RFC6421] 1125 Nelson, D. (Ed), "Crypto-Agility Requirements for Remote 1126 Authentication Dial-In User Service (RADIUS)", RFC 6421, November 1127 2011. 1129 [RFC6982] 1130 Sheffer, Y. and A. Farrel, "Improving Awareness of Running Code: 1131 The Implementation Status Section", RFC 6982, July 2013. 1133 [MD5Attack] 1134 Dobbertin, H., "The Status of MD5 After a Recent Attack", 1135 CryptoBytes Vol.2 No.2, Summer 1996. 1137 [MD5Break] 1138 Wang, Xiaoyun and Yu, Hongbo, "How to Break MD5 and Other Hash 1139 Functions", EUROCRYPT. ISBN 3-540-25910-4, 2005. 1141 Acknowledgments 1143 Parts of the text in Section 3 defining the Request and Response 1144 Authenticators were taken with minor edits from [RFC2865] Section 3. 1146 Authors' Addresses 1148 Alan DeKok 1149 The FreeRADIUS Server Project 1150 http://freeradius.org 1152 Email: aland@freeradius.org