idnits 2.17.1 draft-ietf-nfsv4-rpc-tls-05.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 (January 10, 2020) is 1565 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 887 ** 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: July 13, 2020 January 10, 2020 8 Towards Remote Procedure Call Encryption By Default 9 draft-ietf-nfsv4-rpc-tls-05 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 July 13, 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 . . . . . . . . . . . . . . . . . 9 78 5.2.1. X.509 Certificates Using PKIX trust . . . . . . . . . 9 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 . . . . . . . . . . . . . . . . . . . . 11 83 6.1. DESY NFS server . . . . . . . . . . . . . . . . . . . . . 12 84 6.2. Hammerspace NFS server . . . . . . . . . . . . . . . . . 12 85 6.3. Linux NFS server and client . . . . . . . . . . . . . . . 12 86 7. Security Considerations . . . . . . . . . . . . . . . . . . . 13 87 7.1. Limitations of an Opportunistic Approach . . . . . . . . 13 88 7.1.1. STRIPTLS Attacks . . . . . . . . . . . . . . . . . . 13 89 7.2. TLS Identity Management on Clients . . . . . . . . . . . 14 90 7.3. Security Considerations for AUTH_SYS on TLS . . . . . . . 14 91 7.4. Best Security Policy Practices . . . . . . . . . . . . . 15 92 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 93 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 16 94 9.1. Normative References . . . . . . . . . . . . . . . . . . 16 95 9.2. Informative References . . . . . . . . . . . . . . . . . 17 97 Appendix A. Known Weaknesses of the AUTH_SYS Authentication 98 Flavor . . . . . . . . . . . . . . . . . . . . . . . 18 99 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 19 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. 146 The Transport Layer Security protocol [RFC8446] (TLS) is a well- 147 established Internet building block that protects many standard 148 Internet protocols such as the Hypertext Transport Protocol (HTTP) 149 [RFC2818]. 151 Encrypting at the RPC transport layer accords several significant 152 benefits: 154 Encryption By Default: Transport encryption can be enabled without 155 additional administrative tasks such as identifying client systems 156 to a trust authority, generating additional keying material, or 157 provisioning a secure network tunnel. 159 Encryption Offload: Hardware support for GSS privacy has not 160 appeared in the marketplace. However, the use of a well- 161 established transport encryption mechanism that is employed by 162 other ubiquitous network protocols makes it more likely that 163 encryption offload for RPC is practicable. 165 Securing AUTH_SYS: Most critically, transport encryption can 166 significantly reduce several security issues inherent in the 167 current widespread use of AUTH_SYS (i.e., acceptance of UIDs and 168 GIDs generated by an unauthenticated client). 170 Decoupled User and Host Identities: TLS can be used to authenticate 171 peer hosts while other security mechanisms can handle user 172 authentication. 174 The current document specifies the implementation of RPC on an 175 encrypted transport in a fashion that is transparent to upper-layer 176 protocols based on RPC. The imposition of encryption at the 177 transport layer protects any upper-layer protocol that employs RPC, 178 without alteration of that protocol. 180 Further, the current document defines policies in line with [RFC7435] 181 which enable RPC-on-TLS to be deployed opportunistically in 182 environments with RPC implementations that do not support TLS. 183 Specifications for RPC-based upper-layer protocols are free to 184 require stricter policies to guarantee that encryption or host 185 authentication is in use on every connection. 187 The protocol specification in the current document assumes that 188 support for RPC, TLS, PKI, GSS-API, and DNSSEC is already available 189 in an RPC implementation where TLS support is to be added. 191 2. Requirements Language 193 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 194 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 195 "OPTIONAL" in this document are to be interpreted as described in BCP 196 14 [RFC2119] [RFC8174] when, and only when, they appear in all 197 capitals, as shown here. 199 3. Terminology 201 This document adopts the terminology introduced in Section 3 of 202 [RFC6973] and assumes a working knowledge of the Remote Procedure 203 Call (RPC) version 2 protocol [RFC5531] and the Transport Layer 204 Security (TLS) version 1.3 protocol [RFC8446]. 206 Note also that the NFS community uses the term "privacy" where other 207 Internet communities use "confidentiality". In the current document 208 the two terms are synonymous. 210 We adhere to the convention that a "client" is a network host that 211 actively initiates an association, and a "server" is a network host 212 that passively accepts an association request. 214 RPC documentation historically refers to the authentication of a 215 connecting host as "machine authentication" or "host authentication". 216 TLS documentation refers to the same as "peer authentication". In 217 the current document there is little distinction between these terms. 219 The term "user authentication" in this document refers specifically 220 to the RPC caller's credential, provided in the "cred" and "verf" 221 fields in each RPC Call. 223 4. RPC-Over-TLS in Operation 225 4.1. Discovering Server-side TLS Support 227 The mechanism described in this document interoperates fully with RPC 228 implementations that do not support TLS. The use of TLS is 229 automatically disabled in these cases. 231 To achieve this, we introduce a new RPC authentication flavor called 232 AUTH_TLS. This new flavor signals that the client wants to initiate 233 TLS negotiation if the server supports it. Except for the 234 modifications described in this section, the RPC protocol is unaware 235 of security encapsulation. 237 239 enum auth_flavor { 240 AUTH_NONE = 0, 241 AUTH_SYS = 1, 242 AUTH_SHORT = 2, 243 AUTH_DH = 3, 244 AUTH_KERB = 4, 245 AUTH_RSA = 5, 246 RPCSEC_GSS = 6, 247 AUTH_TLS = 7, 249 /* and more to be defined */ 250 }; 252 254 The length of the opaque data constituting the credential sent in the 255 call message MUST be zero. The verifier accompanying the credential 256 MUST be an AUTH_NONE verifier of length zero. 258 The flavor value of the verifier received in the reply message from 259 the server MUST be AUTH_NONE. The bytes of the verifier's string 260 encode the fixed ASCII characters "STARTTLS". 262 When an RPC client is ready to begin sending traffic to a server, it 263 starts with a NULL RPC request with an auth_flavor of AUTH_TLS. The 264 NULL request is made to the same port as if TLS were not in use. 266 The RPC server can respond in one of three ways: 268 o If the RPC server does not recognize the AUTH_TLS authentication 269 flavor, it responds with a reject_stat of AUTH_ERROR. The RPC 270 client then knows that this server does not support TLS. 272 o If the RPC server accepts the NULL RPC procedure but fails to 273 return an AUTH_NONE verifier containing the string "STARTTLS", the 274 RPC client knows that this server does not support TLS. 276 o If the RPC server accepts the NULL RPC procedure and returns an 277 AUTH_NONE verifier containing the string "STARTTLS", the RPC 278 client SHOULD send a STARTTLS. 280 Once the TLS handshake is complete, the RPC client and server have 281 established a secure channel for communicating. The client MUST 282 switch to a security flavor other than AUTH_TLS within that channel, 283 presumably after negotiating down redundant RPCSEC_GSS privacy and 284 integrity services and applying channel binding [RFC7861]. 286 If TLS negotiation fails for any reason, the RPC client reports this 287 failure to the upper-layer application the same way it would report 288 an AUTH_ERROR rejection from the RPC server. 290 If an RPC client attempts to use AUTH_TLS for anything other than the 291 NULL RPC procedure, the RPC server MUST respond with a reject_stat of 292 AUTH_ERROR. If the client sends a STARTTLS after it has sent other 293 non-encrypted RPC traffic or after a TLS session already in place, 294 the server MUST silently discard it. 296 4.2. Authentication 298 Both RPC and TLS have peer and user authentication, with some overlap 299 in capability between RPC and TLS. The goal of interoperability with 300 implementations that do not support TLS requires limiting the 301 combinations that are allowed and precisely specifying the role that 302 each layer plays. We also want to handle TLS such that an RPC 303 implementation can make the use of TLS invisible to existing RPC 304 consumer applications. 306 Each RPC server that supports RPC-over-TLS MUST possess a unique 307 global identity (e.g., a certificate that is signed by a well-known 308 trust anchor). Such an RPC server MUST request a TLS peer identity 309 from each client upon first contact. There are two different modes 310 of client deployment: 312 Server-only Host Authentication 313 In this type of deployment, the client can authenticate the server 314 host using the presented server peer TLS identity, but the server 315 cannot authenticate the client. In this situation, RPC-over-TLS 316 clients are anonymous. They present no globally unique identifier 317 to the server peer. 319 Mutual Host Authentication 320 In this type of deployment, the client possesses a unique global 321 identity (e.g., a certificate). As part of the TLS handshake, 322 both peers authenticate using the presented TLS identities. If 323 authentication of either peer fails, or if authorization based on 324 those identities blocks access to the server, the peers MUST 325 reject the association. 327 In either of these modes, RPC user authentication is not affected by 328 the use of transport layer security. When a client presents a TLS 329 peer identity to an RPC server, the protocol extension described in 330 the current document provides no way for the server to know whether 331 that identity represents one RPC user on that client, or is shared 332 amongst many RPC users. Therefore, a server implementation must not 333 utilize the remote TLS peer identity for RPC user authentication. 335 4.2.1. Using TLS with RPCSEC GSS 337 RPCSEC GSS can provide per-request integrity or privacy (also known 338 as confidentiality) services. When operating over a TLS session, the 339 GSS services become redundant. A TLS-capable RPC implementation uses 340 GSS channel binding to determine when GSS integrity or privacy is 341 unnecessary. See Section 2.5 of [RFC7861] for details. 343 When using GSS on a TLS session, the RPC server is still required to 344 possess a GSS service principal. GSS mutual authentication still 345 occurs after a TLS session has been established. 347 5. TLS Requirements 349 When peers negotiate a TLS session that is to transport RPC, the 350 following restrictions apply: 352 o Implementations MUST NOT negotiate TLS versions prior to v1.3 353 [RFC8446]. Support for mandatory-to-implement ciphersuites for 354 the negotiated TLS version is REQUIRED. 356 o Implementations MUST support certificate-based mutual 357 authentication. Support for TLS-PSK mutual authentication 358 [RFC4279] is OPTIONAL. See Section 4.2 for further details. 360 o Negotiation of a ciphersuite providing confidentiality as well as 361 integrity protection is REQUIRED. Support for and negotiation of 362 compression is OPTIONAL. 364 5.1. Base Transport Considerations 366 5.1.1. Operation on TCP 368 The use of TLS [RFC8446] protects RPC on TCP connections. As soon as 369 a client completes the TCP handshake, it uses the mechanism described 370 in [RFC8446]. to discover TLS support and then negotiate a TLS 371 session. 373 After establishing a TLS session, an RPC server MUST reject with a 374 reject_stat of AUTH_ERROR any subsequent RPC requests over the 375 connection that are outside of a TLS session. Likewise, an RPC 376 client MUST silently discard any subsequent RPC replies over the 377 connection that are outside of a TLS session. 379 This restriction includes reverse-direction operations (i.e., RPC 380 calls initiated on the server-end of the connection). An RPC client 381 receiving a reverse-direction call on a connection outside of an 382 existing TLS session MUST reject the request with a reject_stat of 383 AUTH_ERROR. 385 An RPC peer terminates a TLS session by sending a TLS closure alert, 386 or by closing the underlying TCP socket. 388 5.1.2. Operation on UDP 390 RPC over UDP is protected using DTLS [RFC6347]. As soon as a client 391 initializes a socket for use with an unfamiliar server, it uses the 392 mechanism described in Section 4.1 to discover DTLS support and then 393 negotiate a DTLS session. Connected operation is RECOMMENDED. 395 Using a DTLS transport does not introduce reliable or in-order 396 semantics to RPC on UDP. Also, DTLS does not support fragmentation 397 of RPC messages. Each RPC message MUST fit in a single DTLS 398 datagram. DTLS encapsulation has overhead, which reduces the 399 effective Path MTU (PMTU) and thus the maximum RPC payload size. 401 DTLS does not detect STARTTLS replay. Sending a TLS closure alert 402 terminates a DTLS session. Subsequent RPC messages passing between 403 the client and server are no longer protected until a new TLS session 404 is established. 406 5.1.3. Operation on Other Transports 408 RPC-over-RDMA can make use of Transport Layer Security below the RDMA 409 transport layer [RFC8166]. The exact mechanism is not within the 410 scope of this document. Because there might not be other provisions 411 to exchange client and server certificates, authentication material 412 exchange would need to be provided by facilities within a future RPC- 413 over-RDMA transport. 415 Transports that provide intrinsic TLS-level security (e.g., QUIC) 416 would need to be addressed separately from the current document. In 417 such cases, the use of TLS would not be opportunistic as it is for 418 TCP or UDP. 420 5.2. TLS Peer Authentication 422 TLS can perform peer authentication using any of the following 423 mechanisms: 425 5.2.1. X.509 Certificates Using PKIX trust 427 Implementations are REQUIRED to support this mechanism. In this 428 mode, the tuple (serial number of the presented certificate; Issuer) 429 uniquely identifies the RPC peer. 431 o Implementations MUST allow the configuration of a list of trusted 432 Certification Authorities for incoming connections. 434 o Certificate validation MUST include the verification rules as per 435 [RFC5280]. 437 o Implementations SHOULD indicate their trusted Certification 438 Authorities (CAs). 440 o Peer validation always includes a check on whether the locally 441 configured expected DNS name or IP address of the server that is 442 contacted matches its presented certificate. DNS names and IP 443 addresses can be contained in the Common Name (CN) or 444 subjectAltName entries. For verification, only one of these 445 entries is to be considered. The following precedence applies: 446 for DNS name validation, subjectAltName:DNS has precedence over 447 CN; for IP address validation, subjectAltName:iPAddr has 448 precedence over CN. Implementors of this specification are 449 advised to read Section 6 of [RFC6125] for more details on DNS 450 name validation. 452 o Implementations MAY allow the configuration of a set of additional 453 properties of the certificate to check for a peer's authorization 454 to communicate (e.g., a set of allowed values in 455 subjectAltName:URI or a set of allowed X509v3 Certificate 456 Policies). 458 o When the configured trust base changes (e.g., removal of a CA from 459 the list of trusted CAs; issuance of a new CRL for a given CA), 460 implementations MAY renegotiate the TLS session to reassess the 461 connecting peer's continued authorization. 463 Authenticating a connecting entity does not mean the RPC server 464 necessarily wants to communicate with that client. For example, if 465 the Issuer is not in a trusted set of Issuers, the RPC server may 466 decline to perform RPC transactions with this client. 467 Implementations that want to support a wide variety of trust models 468 should expose as many details of the presented certificate to the 469 administrator as possible so that the administrator can implement the 470 trust model. As a suggestion, at least the following parameters of 471 the X.509 client certificate SHOULD be exposed: 473 o Originating IP address 475 o Certificate Fingerprint 477 o Issuer 478 o Subject 480 o all X509v3 Extended Key Usage 482 o all X509v3 Subject Alternative Name 484 o all X509v3 Certificate Policies 486 5.2.2. X.509 Certificates Using Fingerprints 488 This mechanism is OPTIONAL to implement. In this mode, the 489 fingerprint of the presented certificate uniquely identifies the RPC 490 peer. 492 Implementations SHOULD allow the configuration of a list of trusted 493 certificates, identified via fingerprint of the DER-encoded 494 certificate octets. Implementations MUST support SHA-256 495 [FIPS.180-4] or stronger as the hash algorithm for the fingerprint. 497 5.2.3. Pre-Shared Keys 499 This mechanism is OPTIONAL to implement. In this mode, the RPC peer 500 is uniquely identified by keying material that has been shared out- 501 of-band or by a previous TLS-protected connection (see Section 2.2 of 502 [RFC8446]). At least the following parameters of the TLS connection 503 SHOULD be exposed: 505 o Originating IP address 507 o TLS Identifier 509 5.2.4. Token Binding 511 This mechanism is OPTIONAL to implement. In this mode, a token 512 uniquely identifies the RPC peer. 514 Versions of TLS after TLS 1.2 contain a token binding mechanism that 515 is more secure than using certificates. This mechanism is detailed 516 in [RFC8471]. 518 6. Implementation Status 520 This section records the status of known implementations of the 521 protocol defined by this specification at the time of posting of this 522 Internet-Draft, and is based on a proposal described in [RFC7942]. 523 The description of implementations in this section is intended to 524 assist the IETF in its decision processes in progressing drafts to 525 RFCs. 527 Please note that the listing of any individual implementation here 528 does not imply endorsement by the IETF. Furthermore, no effort has 529 been spent to verify the information presented here that was supplied 530 by IETF contributors. This is not intended as, and must not be 531 construed to be, a catalog of available implementations or their 532 features. Readers are advised to note that other implementations may 533 exist. 535 6.1. DESY NFS server 537 Organization: DESY 539 URL: https://desy.de 541 Maturity: Prototype software based on early versions of this 542 document. 544 Coverage: The bulk of this specification is implemented. The use of 545 DTLS functionality is not implemented. 547 Licensing: LGPL 549 Implementation experience: No comments from implementors. 551 6.2. Hammerspace NFS server 553 Organization: Hammerspace 555 URL: https://hammerspace.com 557 Maturity: Prototype software based on early versions of this 558 document. 560 Coverage: The bulk of this specification is implemented. The use of 561 DTLS functionality is not implemented. 563 Licensing: Proprietary 565 Implementation experience: No comments from implementors. 567 6.3. Linux NFS server and client 569 Organization: The Linux Foundation 571 URL: https://www.kernel.org 573 Maturity: Prototype software based on early versions of this 574 document. 576 Coverage: The bulk of this specification has yet to be implemented. 577 The use of DTLS functionality is not planned. 579 Licensing: GPLv2 581 Implementation experience: No comments from implementors. 583 7. Security Considerations 585 One purpose of the mechanism described in the current document is to 586 protect RPC-based applications against threats to the privacy of RPC 587 transactions and RPC user identities. A taxonomy of these threats 588 appears in Section 5 of [RFC6973]. Also, Section 6 of [RFC7525] 589 contains a detailed discussion of technologies used in conjunction 590 with TLS. Implementers should familiarize themselves with these 591 materials. 593 7.1. Limitations of an Opportunistic Approach 595 The purpose of using an explicitly opportunistic approach is to 596 enable interoperation with implementations that do not support RPC- 597 over-TLS. A range of options is allowed by this approach, from "no 598 peer authentication or encryption" to "server-only authentication 599 with encryption" to "mutual authentication with encryption". The 600 actual security level may indeed be selected based on policy and 601 without user intervention. 603 In cases where interoperability is a priority, the security benefits 604 of TLS are partially or entirely waived. Implementations of the 605 mechanism described in the current document must take care to 606 accurately represent to all RPC consumers the level of security that 607 is actually in effect. Implementations are REQUIRED to provide an 608 audit log of RPC-over-TLS security mode selection. 610 7.1.1. STRIPTLS Attacks 612 A classic form of attack on network protocols that initiate an 613 association in plain-text to discover support for TLS is a man-in- 614 the-middle that alters the plain-text handshake to make it appear as 615 though TLS support is not available on one or both peers. Clients 616 implementers can choose from the following to mitigate STRIPTLS 617 attacks: 619 o A TLSA record [RFC6698] can alert clients that TLS is expected to 620 work, and provide a binding of hostname to x.509 identity. If TLS 621 cannot be negotiated or authentication fails, the client 622 disconnects and reports the problem. 624 o Client security policy can require that a TLS session is 625 established on every connection. If an attacker spoofs the 626 handshake, the client disconnects and reports the problem. If 627 TLSA records are not available, this approach is strongly 628 encouraged. 630 7.2. TLS Identity Management on Clients 632 The goal of the RPC-on-TLS protocol extension is to hide the content 633 of RPC requests while they are in transit. The RPC-on-TLS protocol 634 by itself cannot protect against exposure of a user's RPC requests to 635 other users on the same client. 637 Moreover, client implementations are free to transmit RPC requests 638 for more than one RPC user using the same TLS session. Depending on 639 the details of the client RPC implementation, this means that the 640 client's TLS identity material is potentially visible to every RPC 641 user that shares a TLS session. Privileged users may also be able to 642 access this TLS identity. 644 As a result, client implementations need to carefully segregate TLS 645 identity material so that local access to it is restricted to only 646 the local users that are authorized to perform operations on the 647 remote RPC server. 649 7.3. Security Considerations for AUTH_SYS on TLS 651 Using a TLS-protected transport when the AUTH_SYS authentication 652 flavor is in use addresses several longstanding weaknesses (as 653 detailed in Appendix A). TLS augments AUTH_SYS by providing both 654 integrity protection and a privacy service that AUTH_SYS lacks. TLS 655 protects data payloads, RPC headers, and user identities against 656 monitoring and alteration while in transit. TLS guards against the 657 insertion or deletion of messages, thus also ensuring the integrity 658 of the message stream between RPC client and server. Lastly, 659 transport layer encryption plus peer authentication protects 660 receiving XDR decoders from deserializing untrusted data, a common 661 coding vulnerability. 663 The use of TLS enables strong authentication of the communicating RPC 664 peers, providing a degree of non-repudiation. When AUTH_SYS is used 665 with TLS, but the RPC client is unauthenticated, the RPC server still 666 acts on RPC requests for which there is no trustworthy 667 authentication. In-transit traffic is protected, but the RPC client 668 itself can still misrepresent user identity without server detection. 669 TLS without authentication is an improvement from AUTH_SYS without 670 encryption, but it leaves a critical security exposure. 672 In light of the above, it is RECOMMENDED that when AUTH_SYS is used, 673 every RPC client should present host authentication material to RPC 674 servers to prove that the client is a known one. The server can then 675 determine whether the UIDs and GIDs in AUTH_SYS requests from that 676 client can be accepted. 678 The use of TLS does not enable RPC clients to detect compromise that 679 leads to the impersonation of RPC users. Also, there continues to be 680 a requirement that the mapping of 32-bit user and group ID values to 681 user identities is the same on both the RPC client and server. 683 7.4. Best Security Policy Practices 685 RPC-over-TLS implementations and deployments are strongly encouraged 686 to adhere to the following policies to achieve the strongest possible 687 security with RPC-over-TLS. 689 o When using AUTH_NULL or AUTH_SYS, both peers are required to have 690 DNS TLSA records and certificate material, and a policy that 691 requires mutual peer authentication and rejection of a connection 692 when host authentication fails. 694 o When using RPCSEC_GSS, GSS/Kerberos provides adequate host 695 authentication and a policy that requires GSS mutual 696 authentication and rejection of a connection when host 697 authentication fails. GSS integrity and privacy services, 698 therefore, can be disabled in favor of TLS encryption with peer 699 authentication. 701 8. IANA Considerations 703 Following Section 6 of [RFC7301], the authors request the allocation 704 of the following value in the "Application-Layer Protocol Negotiation 705 (ALPN) Protocol IDs" registry. The "sunrpc" string identifies SunRPC 706 when used over TLS. 708 Protocol: 709 SunRPC 711 Identification Sequence: 712 0x73 0x75 0x6e 0x72 0x70 0x63 ("sunrpc") 714 Reference: 715 RFC-TBD 717 9. References 719 9.1. Normative References 721 [FIPS.180-4] 722 National Institute of Standards and Technology, "Secure 723 Hash Standard, Federal Information Processing Standards 724 Publication FIPS PUB 180-4", FIPS PUB 180-4, August 2015. 726 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 727 Requirement Levels", BCP 14, RFC 2119, 728 DOI 10.17487/RFC2119, March 1997, 729 . 731 [RFC4279] Eronen, P., Ed. and H. Tschofenig, Ed., "Pre-Shared Key 732 Ciphersuites for Transport Layer Security (TLS)", 733 RFC 4279, DOI 10.17487/RFC4279, December 2005, 734 . 736 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 737 Housley, R., and W. Polk, "Internet X.509 Public Key 738 Infrastructure Certificate and Certificate Revocation List 739 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 740 . 742 [RFC5531] Thurlow, R., "RPC: Remote Procedure Call Protocol 743 Specification Version 2", RFC 5531, DOI 10.17487/RFC5531, 744 May 2009, . 746 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 747 Verification of Domain-Based Application Service Identity 748 within Internet Public Key Infrastructure Using X.509 749 (PKIX) Certificates in the Context of Transport Layer 750 Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 751 2011, . 753 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 754 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 755 January 2012, . 757 [RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an 758 Attack", BCP 188, RFC 7258, DOI 10.17487/RFC7258, May 759 2014, . 761 [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, 762 "Transport Layer Security (TLS) Application-Layer Protocol 763 Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, 764 July 2014, . 766 [RFC7861] Adamson, A. and N. Williams, "Remote Procedure Call (RPC) 767 Security Version 3", RFC 7861, DOI 10.17487/RFC7861, 768 November 2016, . 770 [RFC7942] Sheffer, Y. and A. Farrel, "Improving Awareness of Running 771 Code: The Implementation Status Section", BCP 205, 772 RFC 7942, DOI 10.17487/RFC7942, July 2016, 773 . 775 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 776 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 777 May 2017, . 779 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 780 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 781 . 783 9.2. Informative References 785 [RFC2203] Eisler, M., Chiu, A., and L. Ling, "RPCSEC_GSS Protocol 786 Specification", RFC 2203, DOI 10.17487/RFC2203, September 787 1997, . 789 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, 790 DOI 10.17487/RFC2818, May 2000, 791 . 793 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication 794 of Named Entities (DANE) Transport Layer Security (TLS) 795 Protocol: TLSA", RFC 6698, DOI 10.17487/RFC6698, August 796 2012, . 798 [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., 799 Morris, J., Hansen, M., and R. Smith, "Privacy 800 Considerations for Internet Protocols", RFC 6973, 801 DOI 10.17487/RFC6973, July 2013, 802 . 804 [RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection 805 Most of the Time", RFC 7435, DOI 10.17487/RFC7435, 806 December 2014, . 808 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 809 "Recommendations for Secure Use of Transport Layer 810 Security (TLS) and Datagram Transport Layer Security 811 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 812 2015, . 814 [RFC8166] Lever, C., Ed., Simpson, W., and T. Talpey, "Remote Direct 815 Memory Access Transport for Remote Procedure Call Version 816 1", RFC 8166, DOI 10.17487/RFC8166, June 2017, 817 . 819 [RFC8471] Popov, A., Ed., Nystroem, M., Balfanz, D., and J. Hodges, 820 "The Token Binding Protocol Version 1.0", RFC 8471, 821 DOI 10.17487/RFC8471, October 2018, 822 . 824 9.3. URIs 826 [1] https://www.linuxjournal.com/content/encrypting-nfsv4-stunnel-tls 828 Appendix A. Known Weaknesses of the AUTH_SYS Authentication Flavor 830 The ONC RPC protocol, as specified in [RFC5531], provides several 831 modes of security, traditionally referred to as "authentication 832 flavors". Some of these flavors provide much more than an 833 authentication service. We refer to these as authentication flavors, 834 security flavors, or simply, flavors. One of the earliest and most 835 basic flavors is AUTH_SYS, also known as AUTH_UNIX. Appendix A of 836 [RFC5531] specifies AUTH_SYS. 838 AUTH_SYS assumes that the RPC client and server both use POSIX-style 839 user and group identifiers (each user and group can be distinctly 840 represented as a 32-bit unsigned integer). It also assumes that the 841 client and server both use the same mapping of user and group to an 842 integer. One user ID, one primary group ID, and up to 16 843 supplemental group IDs are associated with each RPC request. The 844 combination of these identifies the entity on the client that is 845 making the request. 847 A string identifies peers (hosts) in each RPC request. [RFC5531] 848 does not specify any requirements for this string other than that is 849 no longer than 255 octets. It does not have to be the same from 850 request to request. Also, it does not have to match the DNS hostname 851 of the sending host. For these reasons, even though most 852 implementations fill in their hostname in this field, receivers 853 typically ignore its content. 855 Appendix A of [RFC5531] contains a brief explanation of security 856 considerations: 858 It should be noted that use of this flavor of authentication does 859 not guarantee any security for the users or providers of a 860 service, in itself. The authentication provided by this scheme 861 can be considered legitimate only when applications using this 862 scheme and the network can be secured externally, and privileged 863 transport addresses are used for the communicating end-points (an 864 example of this is the use of privileged TCP/UDP ports in UNIX 865 systems -- note that not all systems enforce privileged transport 866 address mechanisms). 868 It should be clear, therefore, that AUTH_SYS by itself offers little 869 to no communication security: 871 1. It does not protect the privacy or integrity of RPC requests, 872 users, or payloads, relying instead on "external" security. 874 2. It does not provide authentication of RPC peer machines, other 875 than inclusion of an unprotected domain name. 877 3. The use of 32-bit unsigned integers as user and group identifiers 878 is problematic because these data types are not cryptographically 879 signed or otherwise verified by any authority. 881 4. Because the user and group ID fields are not integrity-protected, 882 AUTH_SYS does not provide non-repudiation. 884 Acknowledgments 886 Special mention goes to Charles Fisher, author of "Encrypting NFSv4 887 with Stunnel TLS" [1]. His article inspired the mechanism described 888 in this document. 890 Many thanks to Tigran Mkrtchyan for his work on the DESY prototype 891 and his feedback on the current document. 893 Thanks to Derrell Piper for numerous suggestions that improved both 894 this simple mechanism and the current document's security-related 895 discussion. 897 The authors are grateful to Bill Baker, David Black, Alan DeKok, Lars 898 Eggert, Benjamin Kaduk, Olga Kornievskaia, Greg Marsden, Alex 899 McDonald, David Noveck, Justin Mazzola Paluska, Tom Talpey, and 900 Martin Thomson for their input and support of this work. 902 Lastly, special thanks go to Transport Area Director Magnus 903 Westerlund, NFSV4 Working Group Chairs David Noveck, Spencer Shepler, 904 and Brian Pawlowski, and NFSV4 Working Group Secretary Thomas Haynes 905 for their guidance and oversight. 907 Authors' Addresses 909 Trond Myklebust 910 Hammerspace Inc 911 4300 El Camino Real Ste 105 912 Los Altos, CA 94022 913 United States of America 915 Email: trond.myklebust@hammerspace.com 917 Charles Lever (editor) 918 Oracle Corporation 919 United States of America 921 Email: chuck.lever@oracle.com