idnits 2.17.1 draft-ietf-nfsv4-rpcsec-gssv3-14.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 == Line 291 has weird spacing: '...ue_auth cred;...' == Line 483 has weird spacing: '...3_label rau_l...' == Line 485 has weird spacing: '...3_privs rau_p...' -- The document date (December 14, 2015) is 3056 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 5661 (Obsoleted by RFC 8881) Summary: 1 error (**), 0 flaws (~~), 4 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 NFSv4 W. Adamson 3 Internet-Draft NetApp 4 Intended status: Standards Track N. Williams 5 Expires: June 16, 2016 Cryptonector 6 December 14, 2015 8 Remote Procedure Call (RPC) Security Version 3 9 draft-ietf-nfsv4-rpcsec-gssv3-14 11 Abstract 13 This document specifies version 3 of the Remote Procedure Call (RPC) 14 security protocol (RPCSEC_GSS). This protocol provides support for 15 multi-principal authentication of client hosts and user principals to 16 a server (constructed by generic composition), security label 17 assertions for multi-level and type enforcement, structured privilege 18 assertions, and channel bindings. 20 Requirements Language 22 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 23 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 24 document are to be interpreted as described in RFC 2119 [RFC2119]. 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at http://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on June 16, 2016. 43 Copyright Notice 45 Copyright (c) 2015 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (http://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction and Motivation . . . . . . . . . . . . . . . . . 2 61 1.1. Added Functionality . . . . . . . . . . . . . . . . . . . 4 62 1.2. XDR Code Extraction . . . . . . . . . . . . . . . . . . . 5 63 2. The RPCSEC_GSSv3 Protocol . . . . . . . . . . . . . . . . . . 5 64 2.1. Compatibility with RPCSEC_GSSv2 . . . . . . . . . . . . . 6 65 2.2. Version Negotiation . . . . . . . . . . . . . . . . . . . 6 66 2.3. New REPLY Verifier . . . . . . . . . . . . . . . . . . . 6 67 2.4. XDR Code Preliminaries . . . . . . . . . . . . . . . . . 7 68 2.5. RPCSEC_GSS_BIND_CHANNEL Operation . . . . . . . . . . . . 9 69 2.6. New auth_stat Values . . . . . . . . . . . . . . . . . . 9 70 2.7. New Control Procedures . . . . . . . . . . . . . . . . . 10 71 2.7.1. New Control Procedure - RPCSEC_GSS_CREATE . . . . . . 10 72 2.7.2. New Control Procedure - RPCSEC_GSS_LIST . . . . . . . 17 73 2.8. Extensibility . . . . . . . . . . . . . . . . . . . . . . 18 74 3. Operational Recommendation for Deployment . . . . . . . . . . 19 75 4. Security Considerations . . . . . . . . . . . . . . . . . . . 19 76 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20 77 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 20 78 6.1. Normative References . . . . . . . . . . . . . . . . . . 20 79 6.2. Informative References . . . . . . . . . . . . . . . . . 20 80 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 21 81 Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 21 82 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 21 84 1. Introduction and Motivation 86 The original RPCSEC_GSS protocol [RFC2203] provided for 87 authentication of RPC clients and servers to each other using the 88 Generic Security Services Application Programming Interface (GSS-API) 89 [RFC2743]. The second version of RPCSEC_GSS [RFC5403] added support 90 for channel bindings [RFC5056]. 92 Existing GSS-API mechanisms are insufficient for communicating 93 certain aspects of authority to a server. The GSS-API and its 94 mechanisms certainly could be extended to address this shortcoming. 96 However, here it is addressed at the application layer, i.e., in 97 RPCSEC_GSS. 99 A major motivation for version 3 RPCSEC_GSS (RPCSEC_GSSv3) is to add 100 support for multi-level (labeled) security and server-side copy for 101 NFSv4. 103 Multi-Level Security (MLS) is a traditional model where subjects 104 (processes) are given a security level (Unclassified, Secret, Top 105 Secret, etc.) and objects (files) are given security labels that 106 mandate the access of the subject to the object (see [BL73] and 107 [RFC4301]). 109 Labeled NFS (see Section 9 of [NFSv4.2]) uses an MLS policy with 110 Mandatory Access Control (MAC) systems as defined in [RFC4949]. 111 Labeled NFS stores MAC file object labels on the NFS server and 112 enables client Guest Mode MAC as described in Section 4.3 of 113 [RFC7204]. RPCSEC_GSSv3 label assertions assert client MAC process 114 subject labels to enable Full Mode MAC when combined with Labeled NFS 115 as described in Section 3.3 of [RFC7204]. 117 A traditional inter-server file copy entails the user gaining access 118 to a file on the source, reading it, and writing it to a file on the 119 destination. In secure NFSv4 inter-server server-side copy (see 120 Section 4 of [NFSv4.2]), the user first secures access to both source 121 and destination files, and then uses NFSv4.2 defined RPCSEC_GSSv3 122 structured privileges to authorize the destination to copy the file 123 from the source on behalf of the user. 125 Multi-principal assertions can be used to address shared cache 126 poisoning attacks (see Section 9 of [AFS-RXGK]) on the client cache 127 by a user. As described in Section 7 of [AFS-RXGK], multi-user 128 machines with a single cache manager can fetch and cache data on a 129 users' behalf, and re-display it for another user from the cache 130 without re-fetching the data from the server. The initial data 131 acquisition is authenticated by the first user's credentials, and if 132 only that user's credentials are used, it may be possible for a 133 malicious user or users to "poison" the cache for other users by 134 introducing bogus data into the cache. 136 Another use of the multi-principal assertion is the secure conveyance 137 of privilege information for processes running with more (or even 138 with less) privilege than the user normally would be accorded. 140 1.1. Added Functionality 142 We therefore describe RPCSEC_GSS version 3 (RPCSEC_GSSv3). 143 RPCSEC_GSSv3 is the same as RPCSEC_GSSv2 [RFC5403], except that the 144 following assertions of authority have been added. 146 o Security labels for Full Mode security type enforcement, and other 147 labeled security models (See Section 5.5.1 in [RFC7204]). 149 o Application-specific structured privileges. For an example see 150 server-side copy [NFSv4.2]. 152 o Multi-principal authentication of the client host and user to the 153 server done by binding two RPCSEC_GSS handles. 155 o Simplified channel binding. 157 Assertions of labels and privileges are evaluated by the server, 158 which may then map the asserted values to other values, all according 159 to server-side policy. See [NFSv4.2]. 161 An option for enumerating server supported label format specifiers 162 (LFS) is provided. See Section 2 and Section 3.3 in [RFC7204] for 163 detail. 165 Note that there is no RPCSEC_GSS_CREATE payload that is REQUIRED to 166 implement. RPCSEC_GSSv3 implementations are feature driven. Besides 167 implementing the RPCSEC_GSS_CREATE operation and payloads for the 168 desired features, all RPCSEC_GSSv3 implementation MUST implement: 170 o The new GSS version number (Section 2.2). 172 o The new reply verifier (Section 2.3). 174 o The new auth stat values (Section 2.6). 176 RPCSEC_GSSv3 targets implementing a desired feature must also 177 implement the RPCSEC_GSS_LIST operation, and the RPCSEC_GSS_CREATE 178 operation replies for unsupported features. 180 o For multi-principal authentication (Section 2.7.1.1), the target 181 indicates no support by not including a rgss3_gss_mp_auth value in 182 the rgss3_create_res. 184 o For channel bindings (Section 2.7.1.2) the target indicates no 185 support by not including a rgss3_chan_binding value in the 186 rgss3_create_res. 188 o For label assertions the target indicates no support by returning 189 the new RPCSEC_GSS_LABEL_PROBLEM auth stat (See Section 2.7.1.3). 191 o For structured privilege assertions the target indicates no 192 support by returning the new RPCSEC_GSS_UNKNOWN_MESSAGE auth stat 193 (See Section 2.7.1.4). 195 1.2. XDR Code Extraction 197 This document contains the External Data Representation (XDR) 198 ([RFC4506]) definitions for the RPCSEC_GSSv3 protocol. The XDR 199 description is provided in this document in a way that makes it 200 simple for the reader to extract into ready to compile form. The 201 reader can feed this document in the following shell script to 202 produce the machine readable XDR description of RPCSEC_GSSv3: 204 206 #!/bin/sh 207 grep "^ *///" | sed 's?^ */// ??' | sed 's?^ *///$??' 209 211 I.e. if the above script is stored in a file called "extract.sh", and 212 this document is in a file called "spec.txt", then the reader can do: 214 216 sh extract.sh < spec.txt > rpcsec_gss_v3.x 218 220 The effect of the script is to remove leading white space from each 221 line, plus a sentinel sequence of "///". 223 2. The RPCSEC_GSSv3 Protocol 225 RPCSEC_GSS version 3 (RPCSEC_GSSv3) is very similar to RPCSEC_GSS 226 version 2 (RPCSEC_GSSv2) [RFC5403]. The differences are the addition 227 of support for assertions and channel bindings are supported via a 228 different mechanism. 230 The entire RPCSEC_GSSv3 protocol is not presented here. Only the 231 differences between it and RPCSEC_GSSv2 are shown. 233 The use of RPCSEC_GSSv3 is structured as follows: 235 o A client uses an existing RPCSEC_GSSv3 context handle established 236 in the usual manner (See Section 5.2 [RFC2203]) to protect 237 RPCSEC_GSSv3 exchanges, this will be termed the "parent" handle. 239 o The server issues a "child" RPCSEC_GSSv3 handle in the 240 RPCSEC_GSS_CREATE response which uses the underlying GSS-API 241 security context of the parent handle in all subsequent exchanges 242 that uses the child handle. 244 o An RPCSEC_GSSv3 child handle MUST NOT be used as the parent handle 245 in an RPCSEC_GSS3_CREATE control message. 247 2.1. Compatibility with RPCSEC_GSSv2 249 The functionality of RPCSEC_GSSv2 [RFC5403] is fully supported by 250 RPCSEC_GSSv3 with the exception of the RPCSEC_GSS_BIND_CHANNEL 251 operation which is not supported when RPCSEC_GSSv3 is in use (see 252 Section 2.5). 254 2.2. Version Negotiation 256 An initiator that supports version 3 of RPCSEC_GSS simply issues an 257 RPCSEC_GSS request with the rgc_version field set to 258 RPCSEC_GSS_VERS_3. If the target does not recognize 259 RPCSEC_GSS_VERS_3, the target will return an RPC error per 260 Section 5.1 of [RFC2203]. 262 The initiator MUST NOT attempt to use an RPCSEC_GSS handle returned 263 by version 3 of a target with version 1 or version 2 of the same 264 target. The initiator MUST NOT attempt to use an RPCSEC_GSS handle 265 returned by version 1 or version 2 of a target with version 3 of the 266 same target. 268 2.3. New REPLY Verifier 270 A new reply verifier is needed for RPCSEC_GSSv3 because of a 271 situation that arises from the use of the same GSS context by child 272 and parent handles. Because the RPCSEC_GSSv3 child handle uses the 273 same GSS context as the parent handle, a child and parent 274 RPCSEC_GSSv3 handle could have the same RPCSEC_GSS sequence numbers. 275 Since the reply verifier of previous versions of RPCSEC_GSS computes 276 a Message Integrity Code (MIC) on just the sequence number, this 277 provides opportunities for man in the middle attacks. 279 This issue is addressed in RPCSEC_GSS version 3 by computing the 280 verifier using the exact same input as is used to compute the request 281 verifier, except that the mtype is changed from CALL to REPLY. The 282 new reply verifier computes a MIC over the following RPC reply header 283 data: 285 unsigned int xid; 286 msg_type mtype; /* set to REPLY */ 287 unsigned int rpcvers; 288 unsigned int prog; 289 unsigned int vers; 290 unsigned int proc; 291 opaque_auth cred; /* captures the RPCSEC_GSS handle */ 293 2.4. XDR Code Preliminaries 295 The following code fragment replaces the corresponding preliminary 296 code shown in Figure 1 of [RFC5403]. The values in the code fragment 297 in Section 2.6 are additions to the auth_stat enumeration. 298 Subsequent code fragments are additions to the code for version 2 299 that support the new procedures defined in version 3. 301 303 /// /* 304 /// * Copyright (c) 2013 IETF Trust and the persons 305 /// * identified as the document authors. All rights 306 /// * reserved. 307 /// * 308 /// * The document authors are identified in [RFC2203], 309 /// * [RFC5403], and [RFCTBD]. 310 /// * 311 /// * Redistribution and use in source and binary forms, 312 /// * with or without modification, are permitted 313 /// * provided that the following conditions are met: 314 /// * 315 /// * o Redistributions of source code must retain the above 316 /// * copyright notice, this list of conditions and the 317 /// * following disclaimer. 318 /// * 319 /// * o Redistributions in binary form must reproduce the 320 /// * above copyright notice, this list of 321 /// * conditions and the following disclaimer in 322 /// * the documentation and/or other materials 323 /// * provided with the distribution. 324 /// * 325 /// * o Neither the name of Internet Society, IETF or IETF 326 /// * Trust, nor the names of specific contributors, may be 327 /// * used to endorse or promote products derived from this 328 /// * software without specific prior written permission. 329 /// * 330 /// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 331 /// * AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 332 /// * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 333 /// * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 334 /// * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 335 /// * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 336 /// * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 337 /// * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 338 /// * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 339 /// * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 340 /// * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 341 /// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 342 /// * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 343 /// * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 344 /// * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 345 /// */ 346 /// 347 /// /* 348 /// * This code was derived from RFC2203, RFC5403, and RFCTBD. 349 /// * Please reproduce this note if possible. 350 /// */ 351 /// 352 /// enum rpc_gss_service_t { 353 /// /* Note: the enumerated value for 0 is reserved. */ 354 /// rpc_gss_svc_none = 1, 355 /// rpc_gss_svc_integrity = 2, 356 /// rpc_gss_svc_privacy = 3, 357 /// rpc_gss_svc_channel_prot = 4 358 /// }; 359 /// 360 /// enum rpc_gss_proc_t { 361 /// RPCSEC_GSS_DATA = 0, 362 /// RPCSEC_GSS_INIT = 1, 363 /// RPCSEC_GSS_CONTINUE_INIT = 2, 364 /// RPCSEC_GSS_DESTROY = 3, 365 /// RPCSEC_GSS_BIND_CHANNEL = 4, /* not used */ 366 /// RPCSEC_GSS_CREATE = 5, /* new */ 367 /// RPCSEC_GSS_LIST = 6 /* new */ 368 /// }; 369 /// 370 /// struct rpc_gss_cred_vers_1_t { 371 /// rpc_gss_proc_t gss_proc; /* control procedure */ 372 /// unsigned int seq_num; /* sequence number */ 373 /// rpc_gss_service_t service; /* service used */ 374 /// opaque handle<>; /* context handle */ 375 /// }; 376 /// 377 /// const RPCSEC_GSS_VERS_1 = 1; 378 /// const RPCSEC_GSS_VERS_2 = 2; 379 /// const RPCSEC_GSS_VERS_3 = 3; /* new */ 380 /// 381 /// union rpc_gss_cred_t switch (unsigned int rgc_version) { 382 /// case RPCSEC_GSS_VERS_1: 383 /// case RPCSEC_GSS_VERS_2: 384 /// case RPCSEC_GSS_VERS_3: /* new */ 385 /// rpc_gss_cred_vers_1_t rgc_cred_v1; 386 /// }; 387 /// 389 391 As seen above, the RPCSEC_GSSv3 credential has the same format as the 392 RPCSEC_GSSv1 [RFC2203] and RPCSEC_GSSv2 [RFC5403] credential. 393 Setting the rgc_version field to 3 indicates that the initiator and 394 target support the new RPCSEC_GSSv3 control procedures. 396 2.5. RPCSEC_GSS_BIND_CHANNEL Operation 398 RPCSEC_GSSv3 provides a channel binding assertion that replaces the 399 RPCSEC_GSSv2 RPCSEC_GSS_BIND_CHANNEL operation. 401 The RPCSEC_GSS_BIND_CHANNEL operation is not supported on RPCSEC_GSS 402 version 3 handles. If a server receives an RPCSEC_GSS_BIND_CHANNEL 403 operation on an RPCSEC_GSSv3 handle, it MUST return a reply status of 404 MSG_ACCEPTED with an acccept stat of PROC_UNAVAIL. 406 2.6. New auth_stat Values 408 RPCSEC_GSSv3 requires the addition of several values to the auth_stat 409 enumerated type definition. The use of these new auth_stat values is 410 explained throughout this document. 412 enum auth_stat { 413 ... 414 /* 415 * RPCSEC_GSSv3 errors 416 */ 417 RPCSEC_GSS_INNER_CREDPROBLEM = 15, 418 RPCSEC_GSS_LABEL_PROBLEM = 16, 419 RPCSEC_GSS_PRIVILEGE_PROBLEM = 17, 420 RPCSEC_GSS_UNKNOWN_MESSAGE = 18 421 }; 423 2.7. New Control Procedures 425 There are two new RPCSEC_GSSv3 control procedures: RPCSEC_GSS_CREATE, 426 RPCSEC_GSS_LIST. 428 The RPCSEC_GSS_CREATE procedure binds any combination of assertions: 429 multi-principal authentication, labels, structured privileges, or 430 channel bindings to a new RPCSEC_GSSv3 context returned in the 431 rgss3_create_res rcr_handle field. 433 The RPCSEC_GSS_LIST procedure queries the target for supported 434 assertions. 436 RPCSEC_GSS version 3 control messages are similar to the RPCSEC_GSS 437 version 1 and version 2 RPCSEC_GSS_DESTROY control message (see 438 section 5.4 [RFC2203]) in that the sequence number in the request 439 must be valid, and the header checksum in the verifier must be valid. 440 As in RPCSEC_GSS version 1 and version 2, the RPCSEC_GSSv version 3 441 control messages may contain call data following the verifier in the 442 body of the NULLPROC procedure. In other words, they look a lot like 443 an RPCSEC_GSS data message with the header procedure set to NULLPROC. 445 The client MUST use one of the following security services to protect 446 the RPCSEC_GSS_CREATE or RPCSEC_GSS_LIST control message: 448 o rpc_gss_svc_integrity 450 o rpc_gss_svc_privacy 452 Specifically the client MUST NOT use rpc_gss_svc_none. 454 RPCSEC_GSS_LIST can also use rpc_gss_svc_channel_prot (see 455 RPCSEC_GSSv2 [RFC5403]) if the request is sent using an RPCSEC_GSSv3 456 child handle with channel bindings enabled as described in 457 Section 2.7.1.2. 459 2.7.1. New Control Procedure - RPCSEC_GSS_CREATE 461 462 /// struct rgss3_create_args { 463 /// rgss3_gss_mp_auth *rca_mp_auth; 464 /// rgss3_chan_binding *rca_chan_bind_mic; 465 /// rgss3_assertion_u rca_assertions<>; 466 /// }; 467 /// 468 /// struct rgss3_create_res { 469 /// opaque rcr_handle<>; 470 /// rgss3_gss_mp_auth *rcr_mp_auth; 471 /// rgss3_chan_binding *rcr_chan_bind_mic; 472 /// rgss3_assertion_u rcr_assertions<>; 473 /// }; 474 /// 475 /// enum rgss3_assertion_type { 476 /// LABEL = 0, 477 /// PRIVS = 1 478 /// }; 479 /// 480 /// union rgss3_assertion_u 481 /// switch (rgss3_assertion_type atype) { 482 /// case LABEL: 483 /// rgss3_label rau_label; 484 /// case PRIVS: 485 /// rgss3_privs rau_privs; 486 /// default: 487 /// opaque rau_ext<>; 488 /// }; 489 /// 491 493 The call data for an RPCSEC_GSS_CREATE request consists of an 494 rgss3_create_args which binds one or more items of several kinds to 495 the returned rcr_handle RPCSEC_GSSv3 context handle called the 496 "child" handle: 498 o Multi-principal authentication: another RPCSEC_GSS context handle 500 o A channel binding 502 o Authorization assertions: labels and or privileges 504 The reply to this message consists of either an error or an 505 rgss3_create_res structure. As noted in Section 2.7.1.3 and 506 Section 2.7.1.4 successful rgss3_assertions are enumerated in 507 rcr_assertions, and are REQUIRED be enumerated in the same order as 508 they appeared in the rca_assertions argument. 510 Upon successful RPCSEC_GSS_CREATE, both the client and the server 511 need to associate the resultant child rcr_handle context handle with 512 the parent context handle in their GSS context caches so as to be 513 able to reference the parent context given the child context handle. 515 RPCSEC_GSSv3 child handles MUST be destroyed upon the destruction of 516 the associated parent handle. 518 Server implementation and policy MAY result in labels, privileges, 519 and identities being mapped to concepts and values that are local to 520 the server. Server policies should take into account the identity of 521 the client and/or user as authenticated via the GSS-API. 523 2.7.1.1. Multi-principal Authentication 525 527 /// 528 /// struct rgss3_gss_mp_auth { 529 /// opaque rgmp_handle<>; /* inner handle */ 530 /// opaque rgmp_rpcheader_mic<>; 531 /// }; 532 /// 534 536 RPCSEC_GSSv3 clients MAY assert a multi-principal authentication of 537 the RPC client host principal and a user principal. This feature is 538 needed, for example, when an RPC client host wishes to use authority 539 assertions that the server may only grant if a user and an RPC client 540 host are authenticated together to the server. Thus a server may 541 refuse to grant requested authority to a user acting alone (e.g., via 542 an unprivileged user-space program), or to an RPC client host acting 543 alone (e.g., when an RPC client host is acting on behalf of a user) 544 but may grant requested authority to an RPC client host acting on 545 behalf of a user if the server identifies the user and trusts the RPC 546 client host. 548 It is assumed that an unprivileged user-space program would not have 549 access to RPC client host credentials needed to establish a GSS-API 550 security context authenticating the RPC client host to the server, 551 therefore an unprivileged user-space program could not create an 552 RPCSEC_GSSv3 RPCSEC_GSS_CREATE message that successfully binds an RPC 553 client host and a user security context. 555 In addition to the parent handle (Section 2), the multi-principal 556 authentication call data has an RPCSEC_GSS version 3 handle 557 referenced via the rgmp_handle field termed the "inner" handle. 559 Clients using RPCSEC_GSSv3 multi-principal authentication MUST use an 560 RPCSEC_GSSv3 context handle that corresponds to a GSS-API security 561 context that authenticates the RPC client host for the parent handle. 562 For the inner context handle with RPCSEC_GSSv3 it MUST use a context 563 handle to authenticate a user. The reverse (parent handle 564 authenticates user, inner authenticates an RPC client host) MUST NOT 565 be used. Other multi-principal parent and inner context handle uses 566 might eventually make sense, but would need to be introduced in a new 567 revision of the RPCSEC_GSS protocol. 569 The child context handle returned by a successful multi-principal 570 assertion binds the inner RPCSEC_GSSv3 context handle to the parent 571 RPCSEC_GSS context and MUST be treated by servers as authenticating 572 the GSS-API initiator principal authenticated by the inner context 573 handle's GSS-API security context. This principal may be mapped to a 574 server-side notion of user or principal. 576 Multi-principal binding is done by including an assertion of type 577 rgss3_gss_mp_auth in the RPCSEC_GSS_CREATE rgss3_create_args call 578 data. The inner context handle is placed in the rgmp_handle field. 579 A MIC of the RPC call header up to and including the credential is 580 computed using the GSS-API security context associated with the inner 581 context handle and is placed in rgmp_rpcheader_mic field. 583 The target verifies the multi-principal authentication by first 584 confirming that the parent context used is an RPC client host 585 context, and then verifies the rgmp_rpcheader_mic using the GSS-API 586 security context associated with the rgmp_handle field. 588 On a successful verification, the rgss3_gss_mp_auth field in the 589 rgss3_create_res reply MUST be filled in with the inner RPCSEC_GSSv3 590 context handle as the rgmp_handle, and a MIC computed over the RPC 591 reply header (see section Section 2.3) using the GSS-API security 592 context associated with the inner handle. 594 On failure, the rgss3_gss_mp_auth field is not sent 595 (rgss3_gss_mp_auth is an optional field). A MSG_DENIED reply to the 596 RPCSEC_GSS_CREATE call is formulated as usual. 598 As described in Section 5.3.3.3 of [RFC2203] the server maintains a 599 list of contexts for the clients that are currently in session with 600 it. When a client request comes in, there may not be a context 601 corresponding to its handle. When this occurs on an 602 RPCSEC_GSS3_CREATE request processing of the parent handle, the 603 server rejects the request with a reply status of MSG_DENIED with the 604 reject_stat of AUTH_ERROR and with an auth_stat value of 605 RPCSEC_GSS_CREDPROBLEM. 607 A new value, RPCSEC_GSS_INNER_CREDPROBLEM, has been added to the 608 auth_stat type. With a multi-pricipal authorization request, the 609 server must also have a context corresponding to the inner context 610 handle. When the server does not have a context handle corresponding 611 to the inner context handle of a multi-pricipal authorization 612 request, the server sends a reply status of MSG_DENIED with the 613 reject_stat of AUTH_ERROR and with an auth_stat value of 614 RPCSEC_GSS_INNER_CREDPROBLEM. 616 When processing the multi-principal authentication request, if the 617 GSS_VerifyMIC() call on the rgmp_rpcheader_mic fails to return 618 GSS_S_COMPLETE, the server sends a reply status of MSG_DENIED with 619 the reject_stat of AUTH_ERROR and with an auth_stat value of 620 RPCSEC_GSS_INNER_CREDPROBLEM. 622 2.7.1.2. Channel Binding 624 626 /// 627 /// typedef opaque rgss3_chan_binding<>; 628 /// 630 632 RPCSEC_GSSv3 provides a different way to do channel binding than 633 RPCSEC_GSSv2 [RFC5403]. Specifically: 635 a. RPCSEC_GSSv3 builds on RPCSEC_GSSv1 by reusing existing, 636 established context handles rather than providing a different RPC 637 security flavor for establishing context handles, 639 b. channel bindings data are not hashed because there is now general 640 agreement that it is the secure channel's responsibility to 641 produce channel bindings data of manageable size. 643 (a) is useful in keeping RPCSEC_GSSv3 simple in general, not just for 644 channel binding. (b) is useful in keeping RPCSEC_GSSv3 simple 645 specifically for channel binding. 647 Channel binding is accomplished as follows. The client prefixes the 648 channel bindings data octet string with the channel type as described 649 in [RFC5056], then the client calls GSS_GetMIC() to get a MIC of 650 resulting octet string, using the parent RPCSEC_GSSv3 context 651 handle's GSS-API security context. The MIC is then placed in the 652 rca_chan_bind_mic field of RPCSEC_GSS_CREATE arguments 653 (rgss3_create_args). 655 If the rca_chan_bind_mic field of the arguments of a 656 RPCSEC_GSS_CREATE control message is set, then the server MUST verify 657 the client's channel binding MIC if the server supports this feature. 658 If channel binding verification succeeds then the server MUST 659 generate a new MIC of the same channel bindings and place it in the 660 rcr_chan_bind_mic field of the RPCSEC_GSS_CREATE rgss3_create_res 661 results. If channel binding verification fails or the server doesn't 662 support channel binding then the server MUST indicate this in its 663 reply by not including a rgss3_chan_binding value in rgss3_create_res 664 (rgss3_chan_binding is an optional field). 666 The client MUST verify the result's rcr_chan_bind_mic value by 667 calling GSS_VerifyMIC() with the given MIC and the channel bindings 668 data (including the channel type prefix). If client-side channel 669 binding verification fails then the client MUST call 670 RPCSEC_GSS_DESTROY. If the client requested channel binding but the 671 server did not include an rcr_chan_binding_mic field in the results, 672 then the client MAY continue to use the resulting context handle as 673 though channel binding had never been requested. If the client 674 considers channel binding critical, it MUST call RPCSEC_GSS_DESTROY. 676 As per-RPCSEC_GSSv2 [RFC5403]: 678 "Once a successful [channel binding] procedure has been performed 679 on an [RPCSEC_GSSv3] context handle, the initiator's 680 implementation may map application requests for rpc_gss_svc_none 681 and rpc_gss_svc_integrity to rpc_gss_svc_channel_prot credentials. 682 And if the secure channel has privacy enabled, requests for 683 rpc_gss_svc_privacy can also be mapped to 684 rpc_gss_svc_channel_prot." 686 Any RPCSEC_GSSv3 child context handle that has been bound to a secure 687 channel in this way SHOULD be used only with the 688 rpc_gss_svc_channel_prot, and SHOULD NOT be used with 689 rpc_gss_svc_none nor rpc_gss_svc_integrity -- if the secure channel 690 does not provide privacy protection then the client MAY use 691 rpc_gss_svc_privacy where privacy protection is needed or desired. 693 2.7.1.3. Label Assertions 695 696 /// struct rgss3_label { 697 /// rgss3_lfs rl_lfs; 698 /// opaque rl_label<>; 699 /// }; 700 /// 701 /// struct rgss3_lfs { 702 /// unsigned int rlf_lfs_id; 703 /// unsigned int rlf_pi_id; 704 /// }; 705 /// 707 709 The client discovers which label format specifiers (LFS) the server 710 supports via the RPCSEC_GSS_LIST control message. Full mode MAC is 711 enabled when an RPCSEC_GSS_CREATE process subject label assertion is 712 combined with a file object label provided by the NFSv4.2 sec_label 713 attribute. 715 Label encoding is specified to mirror the NFSv4.2 sec_label attribute 716 described in Section 12.2.4 of [NFSv4.2]. The label format specifier 717 (LFS) is an identifier used by the client to establish the syntactic 718 format of the security label and the semantic meaning of its 719 components. The policy identifier (PI) is an optional part of the 720 definition of an LFS which allows for clients and server to identify 721 specific security policies. The opaque label field of rgss3_label is 722 dependent on the MAC model to interpret and enforce. 724 If a label itself requires privacy protection (i.e., that the user 725 can assert that label is a secret) then the client MUST use the 726 rpc_gss_svc_privacy protection service for the RPCSEC_GSS_CREATE 727 request. 729 RPCSEC_GSSv3 clients MAY assert a server security label in some LSF 730 by binding a label assertion to the RPCSEC_GSSv3 context handle. 731 This is done by including an assertion of type rgss3_label in the 732 RPCSEC_GSS_CREATE rgss3_create_args rca_assertions call data. 734 Servers that support labeling in the requested LFS MAY map the 735 requested subject label to a different subject label as a result of 736 server-side policy evaluation. 738 The labels that are accepted by the target and bound to the 739 RPCSEC_GSSv3 context MUST be enumerated in the rcr_assertions field 740 of the rgss3_create_res RPCSEC_GSS_CREATE reply. 742 Servers that do not support labeling or that do not support the 743 requested LFS reject the label assertion with a reply status of 744 MSG_DENIED, a reject_status of AUTH_ERROR, and an auth_stat of 745 RPCSEC_GSS_LABEL_PROBLEM. 747 2.7.1.4. Structured Privilege Assertions 749 751 /// 752 /// struct rgss3_privs { 753 /// string rp_name<>; /* human readable */ 754 /// opaque rp_privilege<>; 755 /// }; 757 759 A structured privilege is an RPC application defined privilege. 760 RPCSEC_GSSv3 clients MAY assert a structured privilege by binding the 761 privilege to the RPCSEC_GSSv3 context handle. This is done by 762 including an assertion of type rgss3_privs in the RPCSEC_GSS_CREATE 763 rgss3_create_args rca_assertions call data. Encoding, server 764 verification and any policies for structured privileges are described 765 by the RPC application definition. 767 A successful structured privilege assertion MUST be enumerated in the 768 rcr_assertions field of the rgss3_create_res RPCSEC_GSS_CREATE reply. 770 If a server receives a structured privilege assertion that it does 771 not recognize the assertion is rejected with a reply status of 772 MSG_DENIED, a reject_status of AUTH_ERROR, and an auth_stat of 773 RPCSEC_GSS_UNKNOWN_MESSAGE. 775 If a server receives a structured privilege assertion that it fails 776 to verify according to the requirements of the RPC application 777 defined behavior, the assertion is rejected with a reply status of 778 MSG_DENIED, a reject_status of AUTH_ERROR, and an auth_stat of 779 RPCSEC_GSS_PRIVILEGE_PROBLEM. 781 Section 4.10.1.1. "Inter-Server Copy via ONC RPC with RPCSEC_GSSv3" 782 of [NFSv4.2] shows an example of structured privilege definition and 783 use. 785 2.7.2. New Control Procedure - RPCSEC_GSS_LIST 787 788 /// enum rgss3_list_item { 789 /// LABEL = 0, 790 /// PRIVS = 1 791 /// }; 792 /// 793 /// struct rgss3_list_args { 794 /// rgss3_list_item rla_list_what<>; 795 /// }; 796 /// 797 /// union rgss3_list_item_u 798 /// switch (rgss3_list_item itype) { 799 /// case LABEL: 800 /// rgss3_label rli_labels<>; 801 /// case PRIVS: 802 /// rgss3_privs rli_privs<>; 803 /// }; 804 /// 805 /// typedef rgss3_list_item_u rgss3_list_res<>; 806 /// 808 810 The call data for an RPCSEC_GSS_LIST request consists of a list of 811 integers (rla_list_what) indicating what assertions are to be listed, 812 and the reply consists of an error or the requested list. 814 The result of requesting a list of rgss3_list_item LABEL is a list of 815 LFSs supported by the server. The client can then use the LFS list 816 to assert labels via the RPCSEC_GSS_CREATE label assertions. See 817 Section 2.7.1.3. 819 2.8. Extensibility 821 Assertion types may be added in the future by adding arms to the 822 'rgss3_assertion_u' union. Examples of other potential assertion 823 types include: 825 o Client-side assertions of identity: 827 * Primary client/user identity 829 * Supplementary group memberships of the client/user, including 830 support for specifying deltas to the membership list as seen on 831 the server. 833 3. Operational Recommendation for Deployment 835 RPCSEC_GSSv3 is a superset of RPCSEC_GSSv2 [RFC5403] which in turn is 836 a superset of RPCSEC_GSSv1 [RFC2203], and so can be used in all 837 situations where RPCSEC_GSSv1 or RPCSEC_GSSv2 is used. RPCSEC_GSSv3 838 should be used when the new functionality is needed. 840 4. Security Considerations 842 This entire document deals with security issues. 844 The RPCSEC_GSSv3 protocol allows for client-side assertions of data 845 that is relevant to server-side authorization decisions. These 846 assertions must be evaluated by the server in the context of whether 847 the client and/or user are authenticated, whether multi-principal 848 authentication was used, whether the client is trusted, what ranges 849 of assertions are allowed for the client and the user (separately or 850 together), and any relevant server-side policy. 852 The security semantics of assertions carried by RPCSEC_GSSv3 are 853 application protocol-specific. 855 Note that RPSEC_GSSv3 is not a complete solution for labeling: it 856 conveys the labels of actors, but not the labels of objects. RPC 857 application protocols may require extending in order to carry object 858 label information. 860 There may be interactions with NFSv4's callback security scheme and 861 NFSv4.1's [RFC5661] GSS-API "SSV" mechanisms. Specifically, the 862 NFSv4 callback scheme requires that the server initiate GSS-API 863 security contexts, which does not work well in practice, and in the 864 context of client- side processes running as the same user but with 865 different privileges and security labels the NFSv4 callback security 866 scheme seems particularly unlikely to work well. NFSv4.1 has the 867 server use an existing, client-initiated RPCSEC_GSS context handle to 868 protect server-initiated callback RPCs. The NFSv4.1 callback 869 security scheme lacks all the problems of the NFSv4 scheme, however, 870 it is important that the server pick an appropriate RPCSEC_GSS 871 context handle to protect any callbacks. Specifically, it is 872 important that the server use RPCSEC_GSS context handles which 873 authenticate the client to protect any callbacks relating to server 874 state initiated by RPCs protected by RPCSEC_GSSv3 contexts. 876 As described in Section 2.10.10 [RFC5661] the client is permitted to 877 associate multiple RPCSEC_GSS handles with a single SSV GSS context. 878 RPCSEC_GSSv3 handles will work well with SSV in that the man-in-the- 879 middle attacks described in Section 2.10.10 [RFC5661] are solved by 880 the new reply verifier (Section 2.3). Using an RPCSEC_GSSv3 handle 881 backed by a GSS-SSV mechanism context as a parent handle in an 882 RPCSEC_GSS_CREATE call while permitted is complicated by the lifetime 883 rules of SSV contexts and their associated RPCSEC_GSS handles. 885 5. IANA Considerations 887 IANA request #884160 is being processed for the new RPC authenticaion 888 status numbers in Section 2.6. 890 6. References 892 6.1. Normative References 894 [NFSv4.2] Haynes, T., "NFS Version 4 Minor Version 2", draft-ietf- 895 nfsv4-minorversion2-29 (Work In Progress), December 2014. 897 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 898 Requirement Levels", RFC 2119, March 1997. 900 [RFC2203] Eisler, M., Chiu, A., and L. Ling, "RPCSEC_GSS Protocol 901 Specification", RFC 2203, September 1997. 903 [RFC2743] Linn, J., "Generic Security Service Application Program 904 Interface Version 2, Update 1", RFC 2743, January 2000. 906 [RFC4506] Eisler, M., "XDR: External Data Representation Standard", 907 RFC 4506, May 2006. 909 [RFC5056] Williams, N., "On the Use of Channel Bindings to Secure 910 Channels", RFC 5056, November 2007. 912 [RFC5403] Eisler, M., "RPCSEC_GSS Version 2", RFC 5403, February 913 2009. 915 [RFC5661] Shepler, S., Eisler, M., and D. Noveck, "Network File 916 System (NFS) Version 4 Minor Version 1 Protocol", RFC 917 5661, January 2010. 919 6.2. Informative References 921 [AFS-RXGK] 922 Wilkinson, S. and B. Kaduk, "Integrating rxgk with AFS", 923 draft-wilkinson-afs3-rxgk-afs (work in progress), April 924 2014. 926 [BL73] Bell, D. and L. LaPadula, "Secure Computer Systems: 927 Mathematical Foundations and Model", Technical Report 928 M74-244, The MITRE Corporation Bedford, MA, May 1973. 930 [RFC4301] Kent, S. and K. Seo, "Security Architecture for the 931 Internet Protocol", RFC 4301, December 2005. 933 [RFC4949] Shirley, R., "Internet Security Glossary, Version 2", RFC 934 4949, August 2007. 936 [RFC7204] Haynes, T., "Requirements for Labeled NFS", RFC 7204, 937 April 2014. 939 Appendix A. Acknowledgments 941 Andy Adamson would like to thank NetApp, Inc. for its funding of his 942 time on this project. 944 We thank Lars Eggert, Mike Eisler, Ben Kaduk, Bruce Fields, Tom 945 Haynes, and Dave Noveck for their most helpful reviews. 947 Appendix B. RFC Editor Notes 949 [RFC Editor: please remove this section prior to publishing this 950 document as an RFC] 952 [RFC Editor: prior to publishing this document as an RFC, please 953 replace all occurrences of RFCTBD with RFCxxxx where xxxx is the RFC 954 number of this document] 956 Authors' Addresses 958 William A. (Andy) Adamson 959 NetApp 960 3629 Wagner Ridge Ct 961 Ann Arbor, MI 48103 962 USA 964 Phone: +1 734 665 1204 965 Email: andros@netapp.com 967 Nico Williams 968 cryptonector.com 969 13115 Tamayo Dr 970 Austin, TX 78729 971 USA 973 Email: nico@cryptonector.com