idnits 2.17.1 draft-ietf-nfsv4-rpc-tls-06.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 (Using the creation date from RFC5531, updated by this document, for RFC5378 checks: 2003-05-20) -- The document seems to contain a disclaimer for pre-RFC5378 work, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, you can and should remove the disclaimer; otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (February 3, 2020) is 1544 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '1' on line 909 ** Obsolete normative reference: RFC 6125 (Obsoleted by RFC 9525) ** Obsolete normative reference: RFC 6347 (Obsoleted by RFC 9147) -- Obsolete informational reference (is this intentional?): RFC 2818 (Obsoleted by RFC 9110) -- Obsolete informational reference (is this intentional?): RFC 7525 (Obsoleted by RFC 9325) Summary: 2 errors (**), 0 flaws (~~), 1 warning (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network File System Version 4 T. Myklebust 3 Internet-Draft Hammerspace 4 Updates: 5531 (if approved) C. Lever, Ed. 5 Intended status: Standards Track Oracle 6 Expires: August 6, 2020 February 3, 2020 8 Towards Remote Procedure Call Encryption By Default 9 draft-ietf-nfsv4-rpc-tls-06 11 Abstract 13 This document describes a mechanism that, through the use of 14 opportunistic Transport Layer Security (TLS), enables encryption of 15 in-transit Remote Procedure Call (RPC) transactions while 16 interoperating with ONC RPC implementations that do not support this 17 mechanism. This document updates RFC 5531. 19 Status of This Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF). Note that other groups may also distribute 26 working documents as Internet-Drafts. The list of current Internet- 27 Drafts is at https://datatracker.ietf.org/drafts/current/. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 This Internet-Draft will expire on August 6, 2020. 36 Copyright Notice 38 Copyright (c) 2020 IETF Trust and the persons identified as the 39 document authors. All rights reserved. 41 This document is subject to BCP 78 and the IETF Trust's Legal 42 Provisions Relating to IETF Documents 43 (https://trustee.ietf.org/license-info) in effect on the date of 44 publication of this document. Please review these documents 45 carefully, as they describe your rights and restrictions with respect 46 to this document. Code Components extracted from this document must 47 include Simplified BSD License text as described in Section 4.e of 48 the Trust Legal Provisions and are provided without warranty as 49 described in the Simplified BSD License. 51 This document may contain material from IETF Documents or IETF 52 Contributions published or made publicly available before November 53 10, 2008. The person(s) controlling the copyright in some of this 54 material may not have granted the IETF Trust the right to allow 55 modifications of such material outside the IETF Standards Process. 56 Without obtaining an adequate license from the person(s) controlling 57 the copyright in such materials, this document may not be modified 58 outside the IETF Standards Process, and derivative works of it may 59 not be created outside the IETF Standards Process, except to format 60 it for publication as an RFC or to translate it into languages other 61 than English. 63 Table of Contents 65 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 66 2. Requirements Language . . . . . . . . . . . . . . . . . . . . 5 67 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 68 4. RPC-Over-TLS in Operation . . . . . . . . . . . . . . . . . . 5 69 4.1. Discovering Server-side TLS Support . . . . . . . . . . . 5 70 4.2. Authentication . . . . . . . . . . . . . . . . . . . . . 7 71 4.2.1. Using TLS with RPCSEC GSS . . . . . . . . . . . . . . 8 72 5. TLS Requirements . . . . . . . . . . . . . . . . . . . . . . 8 73 5.1. Base Transport Considerations . . . . . . . . . . . . . . 8 74 5.1.1. Operation on TCP . . . . . . . . . . . . . . . . . . 8 75 5.1.2. Operation on UDP . . . . . . . . . . . . . . . . . . 9 76 5.1.3. Operation on Other Transports . . . . . . . . . . . . 9 77 5.2. TLS Peer Authentication . . . . . . . . . . . . . . . . . 10 78 5.2.1. X.509 Certificates Using PKIX trust . . . . . . . . . 10 79 5.2.2. X.509 Certificates Using Fingerprints . . . . . . . . 11 80 5.2.3. Pre-Shared Keys . . . . . . . . . . . . . . . . . . . 11 81 5.2.4. Token Binding . . . . . . . . . . . . . . . . . . . . 11 82 6. Implementation Status . . . . . . . . . . . . . . . . . . . . 12 83 6.1. DESY NFS server . . . . . . . . . . . . . . . . . . . . . 12 84 6.2. Hammerspace NFS server . . . . . . . . . . . . . . . . . 12 85 6.3. Linux NFS server and client . . . . . . . . . . . . . . . 13 86 6.4. FreeBSD NFS server and client . . . . . . . . . . . . . . 13 87 7. Security Considerations . . . . . . . . . . . . . . . . . . . 13 88 7.1. Limitations of an Opportunistic Approach . . . . . . . . 14 89 7.1.1. STRIPTLS Attacks . . . . . . . . . . . . . . . . . . 14 90 7.2. TLS Identity Management on Clients . . . . . . . . . . . 14 91 7.3. Security Considerations for AUTH_SYS on TLS . . . . . . . 15 92 7.4. Best Security Policy Practices . . . . . . . . . . . . . 16 93 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 94 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 16 95 9.1. Normative References . . . . . . . . . . . . . . . . . . 16 96 9.2. Informative References . . . . . . . . . . . . . . . . . 18 97 Appendix A. Known Weaknesses of the AUTH_SYS Authentication 98 Flavor . . . . . . . . . . . . . . . . . . . . . . . 19 99 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 20 100 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 20 102 1. Introduction 104 In 2014 the IETF published [RFC7258], which recognized that 105 unauthorized observation of network traffic had become widespread and 106 was a subversive threat to all who make use of the Internet at large. 107 It strongly recommended that newly defined Internet protocols should 108 make a genuine effort to mitigate monitoring attacks. Typically this 109 mitigation is done by encrypting data in transit. 111 The Remote Procedure Call version 2 protocol has been a Proposed 112 Standard for three decades (see [RFC5531] and its antecedents). Over 113 twenty years ago, Eisler et al. first introduced RPCSEC GSS as an in- 114 transit encryption mechanism for RPC [RFC2203]. However, experience 115 has shown that RPCSEC GSS with in-transit encryption can be 116 challenging to use in practice: 118 o Parts of each RPC header remain in clear-text, constituting a 119 significant security exposure. 121 o Offloading GSS privacy is not practical in large multi-user 122 deployments since each message is encrypted using a key based on 123 the issuing RPC user. 125 However strong a privacy service is, it cannot provide any security 126 if the challenges of using it result in choosing not to deploy it at 127 all. 129 Moreover, the use of AUTH_SYS remains common despite the adverse 130 effects that acceptance of UIDs and GIDs from unauthenticated clients 131 brings with it. Continued use is in part because: 133 o Per-client deployment and administrative costs are not scalable. 134 Administrators must provide keying material for each RPC client, 135 including transient clients. 137 o Host identity management and user identity management must be 138 enforced in the same security realm. In certain environments, 139 different authorities might be responsible for provisioning client 140 systems versus provisioning new users. 142 The alternative described in the current document is to employ a 143 transport layer security mechanism that can protect the privacy of 144 each RPC connection transparently to RPC and upper-layer protocols. 145 The Transport Layer Security protocol [RFC8446] (TLS) is a well- 146 established Internet building block that protects many standard 147 Internet protocols such as the Hypertext Transport Protocol (HTTP) 148 [RFC2818]. 150 Encrypting at the RPC transport layer accords several significant 151 benefits: 153 Encryption By Default: Transport encryption can be enabled without 154 additional administrative tasks such as identifying client systems 155 to a trust authority, generating additional keying material, or 156 provisioning a secure network tunnel. 158 Encryption Offload: Hardware support for GSS privacy has not 159 appeared in the marketplace. However, the use of a well- 160 established transport encryption mechanism that is employed by 161 other ubiquitous network protocols makes it more likely that 162 encryption offload for RPC is practicable. 164 Securing AUTH_SYS: Most critically, transport encryption can 165 significantly reduce several security issues inherent in the 166 current widespread use of AUTH_SYS (i.e., acceptance of UIDs and 167 GIDs generated by an unauthenticated client). 169 Decoupled User and Host Identities: TLS can be used to authenticate 170 peer hosts while other security mechanisms can handle user 171 authentication. 173 The current document specifies the implementation of RPC on an 174 encrypted transport in a fashion that is transparent to upper-layer 175 protocols based on RPC. The imposition of encryption at the 176 transport layer protects any upper-layer protocol that employs RPC, 177 without alteration of that protocol. 179 Further, the current document defines policies in line with [RFC7435] 180 which enable RPC-on-TLS to be deployed opportunistically in 181 environments with RPC implementations that do not support TLS. 182 Specifications for RPC-based upper-layer protocols are free to 183 require stricter policies to guarantee that encryption or host 184 authentication is in use on every connection. 186 The protocol specification in the current document assumes that 187 support for RPC, TLS, PKI, GSS-API, and DNSSEC is already available 188 in an RPC implementation where TLS support is to be added. 190 2. Requirements Language 192 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 193 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 194 "OPTIONAL" in this document are to be interpreted as described in BCP 195 14 [RFC2119] [RFC8174] when, and only when, they appear in all 196 capitals, as shown here. 198 3. Terminology 200 This document adopts the terminology introduced in Section 3 of 201 [RFC6973] and assumes a working knowledge of the Remote Procedure 202 Call (RPC) version 2 protocol [RFC5531] and the Transport Layer 203 Security (TLS) version 1.3 protocol [RFC8446]. 205 Note also that the NFS community uses the term "privacy" where other 206 Internet communities use "confidentiality". In the current document 207 the two terms are synonymous. 209 We adhere to the convention that a "client" is a network host that 210 actively initiates an association, and a "server" is a network host 211 that passively accepts an association request. 213 RPC documentation historically refers to the authentication of a 214 connecting host as "machine authentication" or "host authentication". 215 TLS documentation refers to the same as "peer authentication". In 216 the current document there is little distinction between these terms. 218 The term "user authentication" in this document refers specifically 219 to the RPC caller's credential, provided in the "cred" and "verf" 220 fields in each RPC Call. 222 4. RPC-Over-TLS in Operation 224 4.1. Discovering Server-side TLS Support 226 The mechanism described in this document interoperates fully with RPC 227 implementations that do not support TLS. The use of TLS is 228 automatically disabled in these cases. 230 To achieve this, we introduce a new RPC authentication flavor called 231 AUTH_TLS. This new flavor signals that the client wants to initiate 232 TLS negotiation if the server supports it. Except for the 233 modifications described in this section, the RPC protocol is unaware 234 of security encapsulation. 236 238 enum auth_flavor { 239 AUTH_NONE = 0, 240 AUTH_SYS = 1, 241 AUTH_SHORT = 2, 242 AUTH_DH = 3, 243 AUTH_KERB = 4, 244 AUTH_RSA = 5, 245 RPCSEC_GSS = 6, 246 AUTH_TLS = 7, 248 /* and more to be defined */ 249 }; 251 253 The length of the opaque data constituting the credential sent in the 254 call message MUST be zero. The verifier accompanying the credential 255 MUST be an AUTH_NONE verifier of length zero. 257 The flavor value of the verifier received in the reply message from 258 the server MUST be AUTH_NONE. The length of the verifier's body 259 field is eight. The bytes of the verifier's body field encode the 260 ASCII characters "STARTTLS" as a fixed-length opaque. 262 When an RPC client is ready to begin sending encrypted traffic to a 263 server, it starts with a NULL RPC request with an auth_flavor of 264 AUTH_TLS. The NULL request is made to the same port as if TLS were 265 not in use. 267 The RPC server can respond in one of three ways: 269 o If the RPC server does not recognize the AUTH_TLS authentication 270 flavor, it responds with a reject_stat of AUTH_ERROR. The RPC 271 client then knows that this server does not support TLS. 273 o If the RPC server accepts the NULL RPC procedure but fails to 274 return an AUTH_NONE verifier containing the "STARTTLS" token in 275 the NULL Reply, the RPC client knows that this server does not 276 support TLS. 278 o If the RPC server accepts the NULL RPC procedure and returns an 279 AUTH_NONE verifier containing the "STARTTLS" token in the NULL 280 Reply, the RPC client immediately initiates a TLS session. This 281 NULL Reply signals that the RPC server is prepared for the client 282 to begin TLS session negotiation. 284 Once the TLS handshake is complete, the RPC client and server have 285 established a secure channel for communicating. The client MUST 286 switch to a security flavor other than AUTH_TLS within that channel, 287 presumably after negotiating down redundant RPCSEC_GSS privacy and 288 integrity services and applying channel binding [RFC7861]. 290 If TLS negotiation fails for any reason, the RPC client reports this 291 failure to the upper-layer application the same way it would report 292 an AUTH_ERROR rejection from the RPC server. 294 If an RPC client attempts to use AUTH_TLS for anything other than the 295 NULL RPC procedure, the RPC server MUST respond with a reject_stat of 296 AUTH_ERROR. 298 4.2. Authentication 300 Both RPC and TLS have peer and user authentication, with some overlap 301 in capability between RPC and TLS. The goal of interoperability with 302 implementations that do not support TLS requires limiting the 303 combinations that are allowed and precisely specifying the role that 304 each layer plays. We also want to handle TLS such that an RPC 305 implementation can make the use of TLS invisible to existing RPC 306 consumer applications. 308 Each RPC server that supports RPC-over-TLS MUST possess a unique 309 global identity (e.g., a certificate that is signed by a well-known 310 trust anchor). Such an RPC server MUST request a TLS peer identity 311 from each client upon first contact. There are two different modes 312 of client deployment: 314 Server-only Host Authentication 315 In this type of deployment, the client can authenticate the server 316 host using the presented server peer TLS identity, but the server 317 cannot authenticate the client. In this situation, RPC-over-TLS 318 clients are anonymous. They present no globally unique identifier 319 to the server peer. 321 Mutual Host Authentication 322 In this type of deployment, the client possesses a unique global 323 identity (e.g., a certificate). As part of the TLS handshake, 324 both peers authenticate using the presented TLS identities. If 325 authentication of either peer fails, or if authorization based on 326 those identities blocks access to the server, the peers MUST 327 reject the association. 329 In either of these modes, RPC user authentication is not affected by 330 the use of transport layer security. When a client presents a TLS 331 peer identity to an RPC server, the protocol extension described in 332 the current document provides no way for the server to know whether 333 that identity represents one RPC user on that client, or is shared 334 amongst many RPC users. Therefore, a server implementation must not 335 utilize the remote TLS peer identity for RPC user authentication. 337 4.2.1. Using TLS with RPCSEC GSS 339 RPCSEC GSS can provide per-request integrity or privacy (also known 340 as confidentiality) services. When operating over a TLS session, the 341 GSS services become redundant. A TLS-capable RPC implementation uses 342 GSS channel binding to determine when GSS integrity or privacy is 343 unnecessary. See Section 2.5 of [RFC7861] for details. 345 When using GSS on a TLS session, the RPC server is still required to 346 possess a GSS service principal. GSS mutual authentication still 347 occurs after a TLS session has been established. 349 5. TLS Requirements 351 When peers negotiate a TLS session that is to transport RPC, the 352 following restrictions apply: 354 o Implementations MUST NOT negotiate TLS versions prior to v1.3 355 [RFC8446]. Support for mandatory-to-implement ciphersuites for 356 the negotiated TLS version is REQUIRED. 358 o Implementations MUST support certificate-based mutual 359 authentication. Support for TLS-PSK mutual authentication 360 [RFC4279] is OPTIONAL. See Section 4.2 for further details. 362 o Negotiation of a ciphersuite providing confidentiality as well as 363 integrity protection is REQUIRED. Support for and negotiation of 364 compression is OPTIONAL. 366 5.1. Base Transport Considerations 368 5.1.1. Operation on TCP 370 The use of TLS [RFC8446] protects RPC on TCP connections. Typically, 371 once a client completes the TCP handshake and performs RPC service 372 discovery via NULL RPC operations, it uses the mechanism described in 373 Section 4.1 to discover TLS support. It can then negotiate a TLS 374 session on that connection. 376 After establishing a TLS session, an RPC server MUST reject with a 377 reject_stat of AUTH_ERROR any subsequent RPC requests over a TLS- 378 protected connection that are outside of a TLS session. Likewise, an 379 RPC client MUST silently discard any subsequent RPC replies over the 380 connection that are outside of a TLS session. 382 This restriction includes reverse-direction RPC operations (i.e., RPC 383 calls initiated on the server-end of the connection). An RPC client 384 receiving a reverse-direction call on a connection outside of an 385 existing TLS session MUST reject the request with a reject_stat of 386 AUTH_ERROR. 388 An RPC peer terminates a TLS session by sending a TLS closure alert, 389 or by closing the TLS-protected TCP connection. 391 5.1.2. Operation on UDP 393 RPC over UDP is protected using DTLS [RFC6347]. As soon as a client 394 initializes a socket for use with an unfamiliar server, it uses the 395 mechanism described in Section 4.1 to discover DTLS support and then 396 negotiate a DTLS session. Connected operation is RECOMMENDED. 398 Using a DTLS transport does not introduce reliable or in-order 399 semantics to RPC on UDP. Also, DTLS does not support fragmentation 400 of RPC messages. Each RPC message MUST fit in a single DTLS 401 datagram. DTLS encapsulation has overhead, which reduces the 402 effective Path MTU (PMTU) and thus the maximum RPC payload size. 404 DTLS does not detect STARTTLS replay. Sending a TLS closure alert 405 terminates a DTLS session. Subsequent RPC messages passing between 406 the client and server are no longer protected until a new TLS session 407 is established. 409 5.1.3. Operation on Other Transports 411 RPC-over-RDMA can make use of Transport Layer Security below the RDMA 412 transport layer [RFC8166]. The exact mechanism is not within the 413 scope of this document. Because there might not be other provisions 414 to exchange client and server certificates, authentication material 415 exchange would need to be provided by facilities within a future RPC- 416 over-RDMA transport. 418 Transports that provide intrinsic TLS-level security (e.g., QUIC) 419 would need to be addressed separately from the current document. In 420 such cases, the use of TLS would not be opportunistic as it is for 421 TCP or UDP. 423 5.2. TLS Peer Authentication 425 TLS can perform peer authentication using any of the following 426 mechanisms: 428 5.2.1. X.509 Certificates Using PKIX trust 430 Implementations are REQUIRED to support this mechanism. In this 431 mode, the tuple (serial number of the presented certificate; Issuer) 432 uniquely identifies the RPC peer. 434 o Implementations MUST allow the configuration of a list of trusted 435 Certification Authorities for incoming connections. 437 o Certificate validation MUST include the verification rules as per 438 [RFC5280]. 440 o Implementations SHOULD indicate their trusted Certification 441 Authorities (CAs). 443 o Peer validation always includes a check on whether the locally 444 configured expected DNS name or IP address of the server that is 445 contacted matches its presented certificate. DNS names and IP 446 addresses can be contained in the Common Name (CN) or 447 subjectAltName entries. For verification, only one of these 448 entries is to be considered. The following precedence applies: 449 for DNS name validation, subjectAltName:DNS has precedence over 450 CN; for IP address validation, subjectAltName:iPAddr has 451 precedence over CN. Implementors of this specification are 452 advised to read Section 6 of [RFC6125] for more details on DNS 453 name validation. 455 o Implementations MAY allow the configuration of a set of additional 456 properties of the certificate to check for a peer's authorization 457 to communicate (e.g., a set of allowed values in 458 subjectAltName:URI or a set of allowed X509v3 Certificate 459 Policies). 461 o When the configured trust base changes (e.g., removal of a CA from 462 the list of trusted CAs; issuance of a new CRL for a given CA), 463 implementations MAY renegotiate the TLS session to reassess the 464 connecting peer's continued authorization. 466 Authenticating a connecting entity does not mean the RPC server 467 necessarily wants to communicate with that client. For example, if 468 the Issuer is not in a trusted set of Issuers, the RPC server may 469 decline to perform RPC transactions with this client. 470 Implementations that want to support a wide variety of trust models 471 should expose as many details of the presented certificate to the 472 administrator as possible so that the administrator can implement the 473 trust model. As a suggestion, at least the following parameters of 474 the X.509 client certificate SHOULD be exposed: 476 o Originating IP address 478 o Certificate Fingerprint 480 o Issuer 482 o Subject 484 o all X509v3 Extended Key Usage 486 o all X509v3 Subject Alternative Name 488 o all X509v3 Certificate Policies 490 5.2.2. X.509 Certificates Using Fingerprints 492 This mechanism is OPTIONAL to implement. In this mode, the 493 fingerprint of the presented certificate uniquely identifies the RPC 494 peer. 496 Implementations SHOULD allow the configuration of a list of trusted 497 certificates, identified via fingerprint of the DER-encoded 498 certificate octets. Implementations MUST support SHA-256 499 [FIPS.180-4] or stronger as the hash algorithm for the fingerprint. 501 5.2.3. Pre-Shared Keys 503 This mechanism is OPTIONAL to implement. In this mode, the RPC peer 504 is uniquely identified by keying material that has been shared out- 505 of-band or by a previous TLS-protected connection (see Section 2.2 of 506 [RFC8446]). At least the following parameters of the TLS connection 507 SHOULD be exposed: 509 o Originating IP address 511 o TLS Identifier 513 5.2.4. Token Binding 515 This mechanism is OPTIONAL to implement. In this mode, a token 516 uniquely identifies the RPC peer. 518 Versions of TLS after TLS 1.2 contain a token binding mechanism that 519 is more secure than using certificates. This mechanism is detailed 520 in [RFC8471]. 522 6. Implementation Status 524 This section records the status of known implementations of the 525 protocol defined by this specification at the time of posting of this 526 Internet-Draft, and is based on a proposal described in [RFC7942]. 527 The description of implementations in this section is intended to 528 assist the IETF in its decision processes in progressing drafts to 529 RFCs. 531 Please note that the listing of any individual implementation here 532 does not imply endorsement by the IETF. Furthermore, no effort has 533 been spent to verify the information presented here that was supplied 534 by IETF contributors. This is not intended as, and must not be 535 construed to be, a catalog of available implementations or their 536 features. Readers are advised to note that other implementations may 537 exist. 539 6.1. DESY NFS server 541 Organization: DESY 543 URL: https://desy.de 545 Maturity: Implementation will be based on mature versions of the 546 current document. 548 Coverage: The implementation is under way. The use of DTLS 549 functionality is not implemented. 551 Licensing: LGPL 553 Implementation experience: The implementer has read and commented on 554 the current document. 556 6.2. Hammerspace NFS server 558 Organization: Hammerspace 560 URL: https://hammerspace.com 562 Maturity: Prototype software based on early versions of this 563 document. 565 Coverage: The bulk of this specification is implemented. The use of 566 DTLS functionality is not implemented. 568 Licensing: Proprietary 570 Implementation experience: No comments from implementors. 572 6.3. Linux NFS server and client 574 Organization: The Linux Foundation 576 URL: https://www.kernel.org 578 Maturity: Prototype software based on early versions of this 579 document. 581 Coverage: The bulk of this specification has yet to be implemented. 582 The use of DTLS functionality is not planned. 584 Licensing: GPLv2 586 Implementation experience: No comments from the implementor. 588 6.4. FreeBSD NFS server and client 590 Organization: The FreeBSD Project 592 URL: https://www.freebsd.org 594 Maturity: Prototype software based on early versions of this 595 document. 597 Coverage: The bulk of this specification is implemented. The use of 598 DTLS functionality is not planned. 600 Licensing: BSD 602 Implementation experience: Implementers have read and commented on 603 this document. 605 7. Security Considerations 607 One purpose of the mechanism described in the current document is to 608 protect RPC-based applications against threats to the privacy of RPC 609 transactions and RPC user identities. A taxonomy of these threats 610 appears in Section 5 of [RFC6973]. Also, Section 6 of [RFC7525] 611 contains a detailed discussion of technologies used in conjunction 612 with TLS. Implementers should familiarize themselves with these 613 materials. 615 7.1. Limitations of an Opportunistic Approach 617 The purpose of using an explicitly opportunistic approach is to 618 enable interoperation with implementations that do not support RPC- 619 over-TLS. A range of options is allowed by this approach, from "no 620 peer authentication or encryption" to "server-only authentication 621 with encryption" to "mutual authentication with encryption". The 622 actual security level may indeed be selected based on policy and 623 without user intervention. 625 In cases where interoperability is a priority, the security benefits 626 of TLS are partially or entirely waived. Implementations of the 627 mechanism described in the current document must take care to 628 accurately represent to all RPC consumers the level of security that 629 is actually in effect. Implementations are REQUIRED to provide an 630 audit log of RPC-over-TLS security mode selection. 632 7.1.1. STRIPTLS Attacks 634 A classic form of attack on network protocols that initiate an 635 association in plain-text to discover support for TLS is a man-in- 636 the-middle that alters the plain-text handshake to make it appear as 637 though TLS support is not available on one or both peers. Clients 638 implementers can choose from the following to mitigate STRIPTLS 639 attacks: 641 o A TLSA record [RFC6698] can alert clients that TLS is expected to 642 work, and provide a binding of hostname to x.509 identity. If TLS 643 cannot be negotiated or authentication fails, the client 644 disconnects and reports the problem. 646 o Client security policy can require that a TLS session is 647 established on every connection. If an attacker spoofs the 648 handshake, the client disconnects and reports the problem. If 649 TLSA records are not available, this approach is strongly 650 encouraged. 652 7.2. TLS Identity Management on Clients 654 The goal of the RPC-on-TLS protocol extension is to hide the content 655 of RPC requests while they are in transit. The RPC-on-TLS protocol 656 by itself cannot protect against exposure of a user's RPC requests to 657 other users on the same client. 659 Moreover, client implementations are free to transmit RPC requests 660 for more than one RPC user using the same TLS session. Depending on 661 the details of the client RPC implementation, this means that the 662 client's TLS identity material is potentially visible to every RPC 663 user that shares a TLS session. Privileged users may also be able to 664 access this TLS identity. 666 As a result, client implementations need to carefully segregate TLS 667 identity material so that local access to it is restricted to only 668 the local users that are authorized to perform operations on the 669 remote RPC server. 671 7.3. Security Considerations for AUTH_SYS on TLS 673 Using a TLS-protected transport when the AUTH_SYS authentication 674 flavor is in use addresses several longstanding weaknesses (as 675 detailed in Appendix A). TLS augments AUTH_SYS by providing both 676 integrity protection and a privacy service that AUTH_SYS lacks. TLS 677 protects data payloads, RPC headers, and user identities against 678 monitoring and alteration while in transit. TLS guards against the 679 insertion or deletion of messages, thus also ensuring the integrity 680 of the message stream between RPC client and server. Lastly, 681 transport layer encryption plus peer authentication protects 682 receiving XDR decoders from deserializing untrusted data, a common 683 coding vulnerability. 685 The use of TLS enables strong authentication of the communicating RPC 686 peers, providing a degree of non-repudiation. When AUTH_SYS is used 687 with TLS, but the RPC client is unauthenticated, the RPC server still 688 acts on RPC requests for which there is no trustworthy 689 authentication. In-transit traffic is protected, but the RPC client 690 itself can still misrepresent user identity without server detection. 691 TLS without authentication is an improvement from AUTH_SYS without 692 encryption, but it leaves a critical security exposure. 694 In light of the above, it is RECOMMENDED that when AUTH_SYS is used, 695 every RPC client should present host authentication material to RPC 696 servers to prove that the client is a known one. The server can then 697 determine whether the UIDs and GIDs in AUTH_SYS requests from that 698 client can be accepted. 700 The use of TLS does not enable RPC clients to detect compromise that 701 leads to the impersonation of RPC users. Also, there continues to be 702 a requirement that the mapping of 32-bit user and group ID values to 703 user identities is the same on both the RPC client and server. 705 7.4. Best Security Policy Practices 707 RPC-over-TLS implementations and deployments are strongly encouraged 708 to adhere to the following policies to achieve the strongest possible 709 security with RPC-over-TLS. 711 o When using AUTH_NULL or AUTH_SYS, both peers are required to have 712 DNS TLSA records and certificate material, and a policy that 713 requires mutual peer authentication and rejection of a connection 714 when host authentication fails. 716 o When using RPCSEC_GSS, GSS/Kerberos provides adequate host 717 authentication and a policy that requires GSS mutual 718 authentication and rejection of a connection when host 719 authentication fails. GSS integrity and privacy services, 720 therefore, can be disabled in favor of TLS encryption with peer 721 authentication. 723 8. IANA Considerations 725 Following Section 6 of [RFC7301], the authors request the allocation 726 of the following value in the "Application-Layer Protocol Negotiation 727 (ALPN) Protocol IDs" registry. The "sunrpc" string identifies SunRPC 728 when used over TLS. 730 Protocol: 731 SunRPC 733 Identification Sequence: 734 0x73 0x75 0x6e 0x72 0x70 0x63 ("sunrpc") 736 Reference: 737 RFC-TBD 739 9. References 741 9.1. Normative References 743 [FIPS.180-4] 744 National Institute of Standards and Technology, "Secure 745 Hash Standard, Federal Information Processing Standards 746 Publication FIPS PUB 180-4", FIPS PUB 180-4, August 2015. 748 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 749 Requirement Levels", BCP 14, RFC 2119, 750 DOI 10.17487/RFC2119, March 1997, 751 . 753 [RFC4279] Eronen, P., Ed. and H. Tschofenig, Ed., "Pre-Shared Key 754 Ciphersuites for Transport Layer Security (TLS)", 755 RFC 4279, DOI 10.17487/RFC4279, December 2005, 756 . 758 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 759 Housley, R., and W. Polk, "Internet X.509 Public Key 760 Infrastructure Certificate and Certificate Revocation List 761 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 762 . 764 [RFC5531] Thurlow, R., "RPC: Remote Procedure Call Protocol 765 Specification Version 2", RFC 5531, DOI 10.17487/RFC5531, 766 May 2009, . 768 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 769 Verification of Domain-Based Application Service Identity 770 within Internet Public Key Infrastructure Using X.509 771 (PKIX) Certificates in the Context of Transport Layer 772 Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 773 2011, . 775 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 776 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 777 January 2012, . 779 [RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an 780 Attack", BCP 188, RFC 7258, DOI 10.17487/RFC7258, May 781 2014, . 783 [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, 784 "Transport Layer Security (TLS) Application-Layer Protocol 785 Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, 786 July 2014, . 788 [RFC7861] Adamson, A. and N. Williams, "Remote Procedure Call (RPC) 789 Security Version 3", RFC 7861, DOI 10.17487/RFC7861, 790 November 2016, . 792 [RFC7942] Sheffer, Y. and A. Farrel, "Improving Awareness of Running 793 Code: The Implementation Status Section", BCP 205, 794 RFC 7942, DOI 10.17487/RFC7942, July 2016, 795 . 797 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 798 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 799 May 2017, . 801 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 802 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 803 . 805 9.2. Informative References 807 [RFC2203] Eisler, M., Chiu, A., and L. Ling, "RPCSEC_GSS Protocol 808 Specification", RFC 2203, DOI 10.17487/RFC2203, September 809 1997, . 811 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, 812 DOI 10.17487/RFC2818, May 2000, 813 . 815 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication 816 of Named Entities (DANE) Transport Layer Security (TLS) 817 Protocol: TLSA", RFC 6698, DOI 10.17487/RFC6698, August 818 2012, . 820 [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., 821 Morris, J., Hansen, M., and R. Smith, "Privacy 822 Considerations for Internet Protocols", RFC 6973, 823 DOI 10.17487/RFC6973, July 2013, 824 . 826 [RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection 827 Most of the Time", RFC 7435, DOI 10.17487/RFC7435, 828 December 2014, . 830 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 831 "Recommendations for Secure Use of Transport Layer 832 Security (TLS) and Datagram Transport Layer Security 833 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 834 2015, . 836 [RFC8166] Lever, C., Ed., Simpson, W., and T. Talpey, "Remote Direct 837 Memory Access Transport for Remote Procedure Call Version 838 1", RFC 8166, DOI 10.17487/RFC8166, June 2017, 839 . 841 [RFC8471] Popov, A., Ed., Nystroem, M., Balfanz, D., and J. Hodges, 842 "The Token Binding Protocol Version 1.0", RFC 8471, 843 DOI 10.17487/RFC8471, October 2018, 844 . 846 9.3. URIs 848 [1] https://www.linuxjournal.com/content/encrypting-nfsv4-stunnel-tls 850 Appendix A. Known Weaknesses of the AUTH_SYS Authentication Flavor 852 The ONC RPC protocol, as specified in [RFC5531], provides several 853 modes of security, traditionally referred to as "authentication 854 flavors". Some of these flavors provide much more than an 855 authentication service. We refer to these as authentication flavors, 856 security flavors, or simply, flavors. One of the earliest and most 857 basic flavors is AUTH_SYS, also known as AUTH_UNIX. Appendix A of 858 [RFC5531] specifies AUTH_SYS. 860 AUTH_SYS assumes that the RPC client and server both use POSIX-style 861 user and group identifiers (each user and group can be distinctly 862 represented as a 32-bit unsigned integer). It also assumes that the 863 client and server both use the same mapping of user and group to an 864 integer. One user ID, one primary group ID, and up to 16 865 supplemental group IDs are associated with each RPC request. The 866 combination of these identifies the entity on the client that is 867 making the request. 869 A string identifies peers (hosts) in each RPC request. [RFC5531] 870 does not specify any requirements for this string other than that is 871 no longer than 255 octets. It does not have to be the same from 872 request to request. Also, it does not have to match the DNS hostname 873 of the sending host. For these reasons, even though most 874 implementations fill in their hostname in this field, receivers 875 typically ignore its content. 877 Appendix A of [RFC5531] contains a brief explanation of security 878 considerations: 880 It should be noted that use of this flavor of authentication does 881 not guarantee any security for the users or providers of a 882 service, in itself. The authentication provided by this scheme 883 can be considered legitimate only when applications using this 884 scheme and the network can be secured externally, and privileged 885 transport addresses are used for the communicating end-points (an 886 example of this is the use of privileged TCP/UDP ports in UNIX 887 systems -- note that not all systems enforce privileged transport 888 address mechanisms). 890 It should be clear, therefore, that AUTH_SYS by itself offers little 891 to no communication security: 893 1. It does not protect the privacy or integrity of RPC requests, 894 users, or payloads, relying instead on "external" security. 896 2. It does not provide authentication of RPC peer machines, other 897 than inclusion of an unprotected domain name. 899 3. The use of 32-bit unsigned integers as user and group identifiers 900 is problematic because these data types are not cryptographically 901 signed or otherwise verified by any authority. 903 4. Because the user and group ID fields are not integrity-protected, 904 AUTH_SYS does not provide non-repudiation. 906 Acknowledgments 908 Special mention goes to Charles Fisher, author of "Encrypting NFSv4 909 with Stunnel TLS" [1]. His article inspired the mechanism described 910 in this document. 912 Many thanks to Tigran Mkrtchyan for his work on the DESY prototype 913 and his feedback on the current document. 915 Thanks to Derrell Piper for numerous suggestions that improved both 916 this simple mechanism and the current document's security-related 917 discussion. 919 The authors are grateful to Bill Baker, David Black, Alan DeKok, Lars 920 Eggert, Benjamin Kaduk, Olga Kornievskaia, Greg Marsden, Alex 921 McDonald, Justin Mazzola Paluska, Tom Talpey, and Martin Thomson for 922 their input and support of this work. 924 Lastly, special thanks to document shepherd David Noveck, Transport 925 Area Director Magnus Westerlund, NFSV4 Working Group Chairs Spencer 926 Shepler and Brian Pawlowski, and NFSV4 Working Group Secretary Thomas 927 Haynes for their guidance and oversight. 929 Authors' Addresses 931 Trond Myklebust 932 Hammerspace Inc 933 4300 El Camino Real Ste 105 934 Los Altos, CA 94022 935 United States of America 937 Email: trond.myklebust@hammerspace.com 938 Charles Lever (editor) 939 Oracle Corporation 940 United States of America 942 Email: chuck.lever@oracle.com