idnits 2.17.1 draft-ietf-nfsv4-rpcsec-gssv3-09.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 234 has weird spacing: '...ue_auth cred;...' == Line 415 has weird spacing: '...3_label rau_l...' == Line 417 has weird spacing: '...3_privs rau_p...' -- The document date (November 18, 2014) is 3447 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 5226 (ref. '4') (Obsoleted by RFC 8126) == Outdated reference: A later version (-41) exists of draft-ietf-nfsv4-minorversion2-27 ** Downref: Normative reference to an Informational RFC: RFC 7204 (ref. '9') Summary: 2 errors (**), 0 flaws (~~), 5 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: May 22, 2015 Cryptonector 6 November 18, 2014 8 Remote Procedure Call (RPC) Security Version 3 9 draft-ietf-nfsv4-rpcsec-gssv3-09.txt 11 Abstract 13 This document specifies version 3 of the Remote Procedure Call (RPC) 14 security protocol (RPCSEC_GSS). This protocol provides for multi- 15 principal authentication of client hosts and user principals to 16 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 [1]. 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 May 22, 2015. 43 Copyright Notice 45 Copyright (c) 2014 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 2. The RPCSEC_GSSv3 Protocol . . . . . . . . . . . . . . . . . . 4 62 2.1. Compatibility with RPCSEC_GSSv2 . . . . . . . . . . . . . 5 63 2.2. Version Negotiation . . . . . . . . . . . . . . . . . . . 5 64 2.3. New REPLY verifier . . . . . . . . . . . . . . . . . . . 5 65 2.4. New Version Number . . . . . . . . . . . . . . . . . . . 6 66 2.5. RPCSEC_GSS_BIND_CHANNEL Operation Deprecated . . . . . . 8 67 2.6. New auth_stat Values . . . . . . . . . . . . . . . . . . 8 68 2.7. New Control Procedures . . . . . . . . . . . . . . . . . 8 69 2.7.1. New Control Procedure - RPCSEC_GSS_CREATE . . . . . . 9 70 2.7.2. New Control Procedure - RPCSEC_GSS_LIST . . . . . . . 16 71 2.8. Extensibility . . . . . . . . . . . . . . . . . . . . . . 16 72 3. Operational Recommendation for Deployment . . . . . . . . . . 17 73 4. Security Considerations . . . . . . . . . . . . . . . . . . . 17 74 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 75 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 76 6.1. Normative References . . . . . . . . . . . . . . . . . . 18 77 6.2. Informative References . . . . . . . . . . . . . . . . . 18 78 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 19 79 Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 19 80 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 19 82 1. Introduction and Motivation 84 The original RPCSEC_GSS protocol [2] provided for authentication of 85 RPC clients and servers to each other using the Generic Security 86 Services Application Programming Interface (GSS-API) [3]. The second 87 version of RPCSEC_GSS [8] added support for channel bindings [6]. 89 We find that GSS-API mechanisms are insufficient for communicating 90 certain aspects of authority to a server. The GSS-API and its 91 mechanisms certainly could be extended to address this shortcoming, 92 but it seems be far simpler to address it at the application layer, 93 namely, in this case, RPCSEC_GSS. 95 A major motivation for RPCSEC_GSSv3 is to add support for labeled 96 security and server-side copy for NFSv4. 98 Labeled NFS (see Section 8 of [5]) uses the subject label provided by 99 the client via the RPCSEC_GSSv3 layer to enforce MAC access to 100 objects owned by the server to enable server guest mode or full mode 101 labeled NFS. 103 A traditional inter-server file copy entails the user gaining access 104 to a file on the source, reading it, and writing it to a file on the 105 destination. In secure NFSv4 inter-server server-side copy (see 106 Section 3.4.1 of [5]), the user first secures access to both source 107 and destination files, and then uses NFSv4.2 defined RPCSEC_GSSv3 108 structured privileges to authorize the destination to copy the file 109 from the source on behalf of the user. 111 Multi-principal assertions can be used to address shared cache 112 poisoning attacks on the client cache by a user. As described in 113 Section 7 of [14], multi-user machines with a single cache manager 114 can fetch and cache data on a users' behalf, and re-display it for 115 another user from the cache without re-fetching the data from the 116 server. The initial data acquisition is authenticated by the first 117 user's credentials, and if only that user's credentials are used, it 118 may be possible for a malicious user or users to "poison" the cache 119 for other users by introducing bogus data into the cache. 121 Another use of the multi-principal assertion is the secure conveyance 122 of privilege information for processes running with more (or even 123 with less) privilege than the user normally would be accorded. 125 We therefore describe RPCSEC_GSS version 3 (RPCSEC_GSSv3). 126 RPCSEC_GSSv3 is the same as RPCSEC_GSSv2 [8], except that the 127 following assertions of authority have been added. 129 o Security labels for multi-level, type enforcement, and other 130 labeled security models. See [10], [11], [12], [5] and [9]. 132 o Application-specific structured privileges. For an example see 133 server-side copy [5]. 135 o Multi-principal authentication of the client host and user to the 136 server done by binding two RPCSEC_GSS handles. 138 o Simplified channel binding. 140 Assertions of labels and privileges are evaluated by the server, 141 which may then map the asserted values to other values, all according 142 to server-side policy. 144 We add an option for enumerating server supported label format 145 specifiers (LFS). The LFS and Label Format Registry are described in 146 detail in [13]. 148 This document contains the External Data Representation (XDR) ([7]) 149 definitions for the RPCSEC_GSSv3 protocol. The XDR description is 150 provided in this document in a way that makes it simple for the 151 reader to extract into ready to compile form. The reader can feed 152 this document in the following shell script to produce the machine 153 readable XDR description of RPCSEC_GSSv3: 155 157 #!/bin/sh 158 grep "^ *///" | sed 's?^ */// ??' | sed 's?^ *///$??' 160 162 I.e. if the above script is stored in a file called "extract.sh", and 163 this document is in a file called "spec.txt", then the reader can do: 165 167 sh extract.sh < spec.txt > rpcsec_gss_v3.x 169 171 The effect of the script is to remove leading white space from each 172 line, plus a sentinel sequence of "///". 174 2. The RPCSEC_GSSv3 Protocol 176 RPCSEC_GSSv3 is the same as RPCSEC_GSSv2 [8], except that support for 177 assertions has been added. The entire RPCSEC_GSSv3 protocol is not 178 presented. Instead the differences between RPCSEC_GSSv3 and 179 RPCSEC_GSSv2 are shown. 181 RPCSEC_GSSv3 is patterned as follows: 183 o A client uses an existing RPCSEC_GSSv3 context handle to protect 184 RPCSEC_GSSv3 exchanges, this will be termed the "parent" handle. 186 o The server issues a "child" RPCSEC_GSSv3 handle in the 187 RPCSEC_GSS_CREATE response which uses the underlying GSS-API 188 security context of the parent handle in all subsequent exchanges 189 that uses the child handle. 191 o An RPCSEC_GSSv3 child handle MUST NOT be used as the parent handle 192 in an RPCSEC_GSS3_CREATE control message. 194 2.1. Compatibility with RPCSEC_GSSv2 196 The functionality of RPCSEC_GSSv2 [8] is fully supported by 197 RPCSEC_GSSv3 with the exception of the RPCSEC_GSS_BIND_CHANNEL 198 operation which is deprecated (see Section 2.5). 200 2.2. Version Negotiation 202 An initiator that supports version 3 of RPCSEC_GSS simply issues an 203 RPCSEC_GSS request with the rgc_version field set to 204 RPCSEC_GSS_VERS_3. If the target does not recognize 205 RPCSEC_GSS_VERS_3, the target will return an RPC error per 206 Section 5.1 of [2]. 208 The initiator MUST NOT attempt to use an RPCSEC_GSS handle returned 209 by version 3 of a target with version 1 or version 2 of the same 210 target. The initiator MUST NOT attempt to use an RPCSEC_GSS handle 211 returned by version 1 or version 2 of a target with version 3 of the 212 same target. 214 2.3. New REPLY verifier 216 The RPCSEC_GSSv3 child handle uses the same GSS context as the parent 217 handle. Since a child and parent RPCSEC_GSSv3 handle could have the 218 same RPCSEC_GSS sequence numbers, and the verifier of RPCSEC_GSS 219 replies computes a MIC on just the sequence number, this provides 220 opportunities for man in the middle attacks. 222 This is easily addressed: RPCSEC_GSS version 3 changes the verifier 223 of the reply to compute the verifier using the exact same input as 224 that is used for verifier of the request, except for the mtype change 225 from CALL to REPLY. The new reply verifier computes a MIC over the 226 following RPC reply header data: 228 unsigned int xid; 229 msg_type mtype; /* set to REPLY */ 230 unsigned int rpcvers; 231 unsigned int prog; 232 unsigned int vers; 233 unsigned int proc; 234 opaque_auth cred; /* captures the RPCSEC_GSS handle */ 236 2.4. New Version Number 238 240 /// /* 241 /// * Copyright (c) 2013 IETF Trust and the persons 242 /// * identified as the document authors. All rights 243 /// * reserved. 244 /// * 245 /// * The document authors are identified in [RFC2203], 246 /// * [RFC5403], and [RFCxxxx]. 247 /// * 248 /// * Redistribution and use in source and binary forms, 249 /// * with or without modification, are permitted 250 /// * provided that the following conditions are met: 251 /// * 252 /// * o Redistributions of source code must retain the above 253 /// * copyright notice, this list of conditions and the 254 /// * following disclaimer. 255 /// * 256 /// * o Redistributions in binary form must reproduce the 257 /// * above copyright notice, this list of 258 /// * conditions and the following disclaimer in 259 /// * the documentation and/or other materials 260 /// * provided with the distribution. 261 /// * 262 /// * o Neither the name of Internet Society, IETF or IETF 263 /// * Trust, nor the names of specific contributors, may be 264 /// * used to endorse or promote products derived from this 265 /// * software without specific prior written permission. 266 /// * 267 /// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 268 /// * AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 269 /// * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 270 /// * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 271 /// * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 272 /// * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 273 /// * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 274 /// * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 275 /// * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 276 /// * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 277 /// * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 278 /// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 279 /// * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 280 /// * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 281 /// * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 282 /// */ 283 /// 284 /// /* 285 /// * This code was derived from [RFC2203]. Please 286 /// * reproduce this note if possible. 287 /// */ 288 /// 289 /// enum rpc_gss_service_t { 290 /// /* Note: the enumerated value for 0 is reserved. */ 291 /// rpc_gss_svc_none = 1, 292 /// rpc_gss_svc_integrity = 2, 293 /// rpc_gss_svc_privacy = 3, 294 /// rpc_gss_svc_channel_prot = 4 295 /// }; 296 /// 297 /// enum rpc_gss_proc_t { 298 /// RPCSEC_GSS_DATA = 0, 299 /// RPCSEC_GSS_INIT = 1, 300 /// RPCSEC_GSS_CONTINUE_INIT = 2, 301 /// RPCSEC_GSS_DESTROY = 3, 302 /// RPCSEC_GSS_BIND_CHANNEL = 4, /* not used */ 303 /// RPCSEC_GSS_CREATE = 5, /* new */ 304 /// RPCSEC_GSS_LIST = 6 /* new */ 305 /// }; 306 /// 307 /// struct rpc_gss_cred_vers_1_t { 308 /// rpc_gss_proc_t gss_proc; /* control procedure */ 309 /// unsigned int seq_num; /* sequence number */ 310 /// rpc_gss_service_t service; /* service used */ 311 /// opaque handle<>; /* context handle */ 312 /// }; 313 /// 314 /// const RPCSEC_GSS_VERS_1 = 1; 315 /// const RPCSEC_GSS_VERS_2 = 2; 316 /// const RPCSEC_GSS_VERS_3 = 3; /* new */ 317 /// 318 /// union rpc_gss_cred_t switch (unsigned int rgc_version) { 319 /// case RPCSEC_GSS_VERS_1: 320 /// case RPCSEC_GSS_VERS_2: 321 /// case RPCSEC_GSS_VERS_3: /* new */ 322 /// rpc_gss_cred_vers_1_t rgc_cred_v1; 323 /// }; 324 /// 326 328 As seen above, the RPCSEC_GSSv3 credential has the same format as the 329 RPCSEC_GSSv1 [2] and RPCSEC_GSSv2 [8] credential. Setting the 330 rgc_version field to 3 indicates that the initiator and target 331 support the new RPCSEC_GSSv3 control procedures. 333 2.5. RPCSEC_GSS_BIND_CHANNEL Operation Deprecated 335 RPCSEC_GSSv3 provides a channel binding assertion that replaces the 336 RPCSEC_GSSv2 RPCSEC_GSS_BIND_CHANNEL operation. 337 RPCSEC_GSS_BIND_CHANNEL MUST NOT be used on RPCSEC_GSS version 3 338 handles. 340 2.6. New auth_stat Values 342 RPCSEC_GSSv3 requires the addition of several values to the auth_stat 343 enumerated type definition. The use of each of these new auth_stat 344 values is explained later in this document. 346 enum auth_stat { 347 ... 348 /* 349 * RPCSEC_GSSv3 errors 350 */ 351 RPCSEC_GSS_INNER_CREDPROBLEM = 15, 352 RPCSEC_GSS_LABEL_PROBLEM = 16, 353 RPCSEC_GSS_PRIVILEGE_PROBLEM = 17, 354 RPCSEC_GSS_UNKNOWN_MESSAGE = 18 355 }; 357 2.7. New Control Procedures 359 There are two new RPCSEC_GSSv3 control procedures: RPCSEC_GSS_CREATE, 360 RPCSEC_GSS_LIST. 362 The RPCSEC_GSS_CREATE procedure binds any combination of assertions: 363 multi-principal authentication, labels, structured privileges, or 364 channel bindings to a new RPCSEC_GSSv3 context returned in the 365 rgss3_create_res rcr_handle field. 367 The RPCSEC_GSS_LIST procedure queries the target for supported 368 assertions. 370 RPCSEC_GSS version 3 control messages are similar to the RPCSEC_GSS 371 version 1 and version 2 RPCSEC_GSS_DESTROY control message (see 372 section 5.4 [2]) in that the sequence number in the request must be 373 valid, and the header checksum in the verifier must be valid. As in 374 RPCSEC_GSS version 1 and version 2, the RPCSEC_GSSv version 3 control 375 messages may contain call data following the verifier in the body of 376 the NULLPROC procedure. In other words, they look a lot like an 377 RPCSEC_GSS data message with the header procedure set to NULLPROC. 379 The client MUST use one of the following security services to protect 380 the RPCSEC_GSS_CREATE or RPCSEC_GSS_LIST control message: 382 o rpc_gss_svc_channel_prot (see RPCSEC_GSSv2 [8]) 384 o rpc_gss_svc_integrity 386 o rpc_gss_svc_privacy 388 Specifically the client MUST NOT use rpc_gss_svc_none. 390 2.7.1. New Control Procedure - RPCSEC_GSS_CREATE 392 394 /// struct rgss3_create_args { 395 /// rgss3_gss_mp_auth *rca_mp_auth; 396 /// rgss3_chan_binding *rca_chan_bind_mic; 397 /// rgss3_assertion rca_assertions<>; 398 /// }; 399 /// 400 /// struct rgss3_create_res { 401 /// opaque rcr_handle<>; 402 /// rgss3_gss_mp_auth *rcr_mp_auth; 403 /// rgss3_chan_binding *rcr_chan_bind_mic; 404 /// rgss3_assertion rcr_assertions<>; 405 /// }; 406 /// 407 /// enum rgss3_assertion_type { 408 /// LABEL = 0, 409 /// PRIVS = 1 410 /// }; 411 /// 412 /// union rgss3_assertion_u 413 /// switch (rgss3_assertion_type atype) { 414 /// case LABEL: 415 /// rgss3_label rau_label; 416 /// case PRIVS: 417 /// rgss3_privs rau_privs; 418 /// default: 419 /// opaque rau_ext<>; 420 /// }; 421 /// 422 /// struct rgss3_assertion { 423 /// rgss3_assertion_u ra_assertion; 424 /// }; 425 /// 427 428 The call data for an RPCSEC_GSS_CREATE request consists of an 429 rgss3_create_args which binds one or more items of several kinds to 430 the returned rcr_handle RPCSEC_GSSv3 context handle called the 431 "child" handle: 433 o Multi-principal authentication: another RPCSEC_GSS context handle 435 o A channel binding 437 o Authorization assertions: labels and or privileges 439 The reply to this message consists of either an error or an 440 rgss3_create_res structure. 442 Upon successful RPCSEC_GSS_CREATE, both the client and the server 443 SHOULD associate the resultant child rcr_handle context handle with 444 the parent context handle in their GSS context caches so as to be 445 able to reference the parent context given the child context handle. 447 RPCSEC_GSSv3 child handles MUST be destroyed upon the destruction of 448 the associated parent handle. 450 Server implementation and policy MAY result in labels, privileges, 451 and identities being mapped to concepts and values that are local to 452 the server. Server policies should take into account the identity of 453 the client and/or user as authenticated via the GSS-API. 455 2.7.1.1. Multi-principal Authentication 457 459 /// 460 /// struct rgss3_gss_mp_auth { 461 /// opaque rgmp_handle<>; /* inner handle */ 462 /// opaque rgmp_rpcheader_mic<>; 463 /// }; 464 /// 466 468 RPCSEC_GSSv3 clients MAY assert a multi-principal authentication of 469 the RPC client host principal and a user principal. This feature is 470 needed, for example, when an RPC client host wishes to use authority 471 assertions that the server may only grant if a user and an RPC client 472 host are authenticated together to the server. Thus a server may 473 refuse to grant requested authority to a user acting alone (e.g., via 474 an unprivileged user-space program), or to an RPC client host acting 475 alone (e.g. when an RPC client host is acting on behalf of a user) 476 but may grant requested authority to an RPC client host acting on 477 behalf of a user if the server identifies the user and trusts the RPC 478 client host. 480 It is assumed that an unprivileged user-space program would not have 481 access to RPC client host credentials needed to establish a GSS-API 482 security context authenticating the RPC client host to the server, 483 therefore an unprivileged user-space program could not create an 484 RPCSEC_GSSv3 RPCSEC_GSS_CREATE message that successfully binds an RPC 485 client host and a user security context. 487 In addition to the parent handle (Section 2), the multi-principal 488 authentication call data has an RPCSEC_GSS version 3 handle 489 referenced via the rgmp_handle field termed the "inner" handle. 490 Clients using RPCSEC_GSSv3 multi-principal authentication MUST use an 491 RPCSEC_GSSv3 context handle that corresponds to a GSS-API security 492 context that authenticates the RPC client host for the parent handle. 493 The inner context handle it SHOULD use a context handle to 494 authenticate a user. The reverse (parent handle authenticates user, 495 inner authenticates an RPC client host) MUST NOT be used. Other 496 multi-principal parent and inner context handle uses might eventually 497 make sense, but would need to be introduced in a new revision of the 498 RPCSEC_GSS protocol. 500 The child context handle returned by a successful multi-principal 501 assertion binds the inner RPCSEC_GSSv3 context handle to the parent 502 RPCSEC_GSS context and MUST be treated by servers as authenticating 503 the GSS-API initiator principal authenticated by the inner context 504 handle's GSS-API security context. This principal may be mapped to a 505 server-side notion of user or principal. 507 Multi-principal binding is done by including an assertion of type 508 rgss3_gss_mp_auth in the RPCSEC_GSS_CREATE rgss3_create_args call 509 data. The inner context handle is placed in the rgmp_handle field. 510 A MIC of the RPC call header up to and including the credential is 511 computed using the GSS-API security context associated with the inner 512 context handle is placed in rgmp_rpcheader_mic field. 514 The target verifies the multi-principal authentication by first 515 confirming that the parent context used is an RPC client host 516 context, and then verifies the rgmp_rpcheader_mic using the GSS-API 517 security context associated with the rgmp_handle field. 519 On a successful verification, the rgss3_gss_mp_auth field in the 520 rgss3_create_res reply MUST be filled in with the inner RPCSEC_GSSv3 521 context handle as the rgmp_handle, and a MIC computed over the RPC 522 reply header (see section Section 2.3) using the GSS-API security 523 context associated with the inner handle. 525 On failure, the rgss3_gss_mp_auth field is not sent 526 (rgss3_gss_mp_auth is an optional field). A MSG_DENIED reply to the 527 RPCSEC_GSS_CREATE call is formulated as usual. 529 As described in Section 5.3.3.3 of [2] the server maintains a list of 530 contexts for the clients that are currently in session with it. When 531 a client request comes in, there may not be a context corresponding 532 to its handle. When this occurs on an RPCSEC_GSS3_CREATE request 533 processing of the parent handle, the server rejects the request with 534 a reply status of MSG_DENIED with the reject_stat of AUTH_ERROR and 535 with an auth_stat value of RPCSEC_GSS_CREDPROBLEM. 537 A new value, RPCSEC_GSS_INNER_CREDPROBLEM, has been added to the 538 auth_stat type. With a multi-pricipal authorization request, the 539 server must also have a context corresponding to the inner context 540 handle. When the server does not have a context handle corresponding 541 to the inner context handle of a multi-pricipal authorization 542 request, the server send a reply status of MSG_DENIED with the 543 reject_stat of AUTH_ERROR and with an auth_stat value of 544 RPCSEC_GSS_INNER_CREDPROBLEM. 546 When processing the multi-principal authentication request, if the 547 GSS_VerifyMIC() call on the rgmp_rpcheader_mic fails to return 548 GSS_S_COMPLETE, the server sends a reply status of MSG_DENIED with 549 the reject_stat of AUTH_ERROR and with an auth_stat value of 550 RPCSEC_GSS_INNER_CREDPROBLEM. 552 2.7.1.2. Channel Binding 554 556 /// 557 /// typedef opaque rgss3_chan_binding<>; 558 /// 560 562 RPCSEC_GSSv3 provides a different way to do channel binding than 563 RPCSEC_GSSv2 [8]. Specifically: 565 a. RPCSEC_GSSv3 builds on RPCSEC_GSSv1 by reusing existing, 566 established context handles rather than providing a different RPC 567 security flavor for establishing context handles, 569 b. channel bindings data are not hashed because the community now 570 agrees that it is the secure channel's responsibility to produce 571 channel bindings data of manageable size. 573 (a) is useful in keeping RPCSEC_GSSv3 simple in general, not just for 574 channel binding. (b) is useful in keeping RPCSEC_GSSv3 simple 575 specifically for channel binding. 577 Channel binding is accomplished as follows. The client prefixes the 578 channel bindings data octet string with the channel type as described 579 in [6], then the client calls GSS_GetMIC() to get a MIC of resulting 580 octet string, using the parent RPCSEC_GSSv3 context handle's GSS-API 581 security context. The MIC is then placed in the rca_chan_bind_mic 582 field of RPCSEC_GSS_CREATE arguments (rgss3_create_args). 584 If the rca_chan_bind_mic field of the arguments of a 585 RPCSEC_GSS_CREATE control message is set, then the server MUST verify 586 the client's channel binding MIC if the server supports this feature. 587 If channel binding verification succeeds then the server MUST 588 generate a new MIC of the same channel bindings and place it in the 589 rcr_chan_bind_mic field of the RPCSEC_GSS_CREATE rgss3_create_res 590 results. If channel binding verification fails or the server doesn't 591 support channel binding then the server MUST indicate this in its 592 reply by not including a rgss3_chan_binding value in rgss3_create_res 593 (rgss3_chan_binding is an optional field). 595 The client MUST verify the result's rcr_chan_bind_mic value by 596 calling GSS_VerifyMIC() with the given MIC and the channel bindings 597 data (including the channel type prefix). If client-side channel 598 binding verification fails then the client MUST call 599 RPCSEC_GSS_DESTROY. If the client requested channel binding but the 600 server did not include an rcr_chan_binding_mic field in the results, 601 then the client MAY continue to use the resulting context handle as 602 though channel binding had never been requested. If the client 603 considers channel binding critical, it MUST call RPCSEC_GSS_DESTROY. 605 As per-RPCSEC_GSSv2 [8]: 607 "Once a successful [channel binding] procedure has been performed 608 on an [RPCSEC_GSSv3] context handle, the initiator's 609 implementation may map application requests for rpc_gss_svc_none 610 and rpc_gss_svc_integrity to rpc_gss_svc_channel_prot credentials. 611 And if the secure channel has privacy enabled, requests for 612 rpc_gss_svc_privacy can also be mapped to 613 rpc_gss_svc_channel_prot." 615 Any RPCSEC_GSSv3 context handle that has been bound to a secure 616 channel in this way SHOULD be used only with the 617 rpc_gss_svc_channel_prot, and SHOULD NOT be used with 618 rpc_gss_svc_none nor rpc_gss_svc_integrity -- if the secure channel 619 does not provide privacy protection then the client MAY use 620 rpc_gss_svc_privacy where privacy protection is needed or desired. 622 2.7.1.3. Label Assertions 624 626 /// struct rgss3_label { 627 /// rgss3_lfs rl_lfs; 628 /// opaque rl_label<>; 629 /// }; 630 /// 631 /// struct rgss3_lfs { 632 /// unsigned int rlf_lfs_id; 633 /// unsigned int rlf_pi_id; 634 /// }; 635 /// 637 639 The client discovers which labels the server supports via the 640 RPCSEC_GSS_LIST control message. Asserting a server supported label 641 via RPCSEC_GSS_CREATE enables server guest mode labels. Full mode is 642 enabled when an RPCSEC_GSS_CREATE label assertion is combined with 643 asserting the same label with the NFSv4.2 sec_label attribute. 645 Label encoding is specified to mirror the NFSv4.2 sec_label attribute 646 described in Section 12.2.2 of [5]. The label format specifier (LFS) 647 is an identifier used by the client to establish the syntactic format 648 of the security label and the semantic meaning of its components. 649 The policy identifier (PI) is an optional part of the definition of 650 an LFS which allows for clients and server to identify specific 651 security policies. The opaque label field of rgss3_label is 652 dependent on the MAC model to interpret and enforce. 654 If a label itself requires privacy protection (i.e., that the user 655 can assert that label is a secret) then the client MUST use the 656 rpc_gss_svc_privacy protection service for the RPCSEC_GSS_CREATE 657 request. 659 RPCSEC_GSSv3 clients MAY assert a server security label in some LSF 660 by binding a label assertion to the RPCSEC_GSSv3 context handle. 661 This is done by including an assertion of type rgss3_label in the 662 RPCSEC_GSS_CREATE rgss3_create_args rca_assertions call data. 664 Servers that support labeling in the requested LFS MAY map the 665 requested label to different label as a result of server-side policy 666 evaluation. 668 The labels that are accepted by the target and bound to the 669 RPCSEC_GSSv3 context MUST be enumerated in the rcr_assertions field 670 of the rgss3_create_res RPCSEC_GSS_CREATE reply. 672 Servers that do not support labeling or that do not support the 673 requested LFS reject the label assertion with a reply status of 674 MSG_DENIED, a reject_status of AUTH_ERROR, and an auth_stat of 675 RPCSEC_GSS_LABEL_PROBLEM. 677 2.7.1.4. Structured Privilege Assertions 679 681 /// 682 /// struct rgss3_privs { 683 /// string rp_name<>; /* human readable */ 684 /// opaque rp_privilege<>; 685 /// }; 687 689 A structured privilege is an RPC application defined privilege. 690 RPCSEC_GSSv3 clients MAY assert a structured privilege by binding the 691 privilege to the RPCSEC_GSSv3 context handle. This is done by 692 including an assertion of type rgss3_privs in the RPCSEC_GSS_CREATE 693 rgss3_create_args rca_assertions call data. Encoding, server 694 verification and any policies for structured privileges are described 695 by the RPC application definition. 697 A successful structured privilege assertion MUST be enumerated in the 698 rcr_assertions field of the rgss3_create_res RPCSEC_GSS_CREATE reply. 700 If a server receives a structured privilege assertion that it does 701 not recognize the assertion is rejected with a reply status of 702 MSG_DENIED, a reject_status of AUTH_ERROR, and an auth_stat of 703 RPCSEC_GSS_UNKNOWN_MESSAGE. 705 If a server receives a structured privilege assertion that it fails 706 to verify according to the requirements of the RPC application 707 defined behavior, the assertion is rejected with a reply status of 708 MSG_DENIED, a reject_status of AUTH_ERROR, and an auth_stat of 709 RPCSEC_GSS_PRIVILEGE_PROBLEM. 711 Section 3.4.1.2. "Inter-Server Copy with RPCSEC_GSSv3" of [5] shows 712 an example of structured privilege definition and use. 714 2.7.2. New Control Procedure - RPCSEC_GSS_LIST 716 718 /// enum rgss3_list_item { 719 /// LABEL = 0, 720 /// PRIVS = 1 721 /// }; 722 /// 723 /// struct rgss3_list_args { 724 /// rgss3_list_item rla_list_what<>; 725 /// }; 726 /// 727 /// union rgss3_list_item_u 728 /// switch (rgss3_list_item itype) { 729 /// case LABEL: 730 /// rgss3_label rli_labels<>; 731 /// case PRIVS: 732 /// rgss3_privs rli_privs<>; 733 /// }; 734 /// 735 /// typedef rgss3_list_item_u rgss3_list_res<>; 736 /// 738 740 The call data for an RPCSEC_GSS_LIST request consists of a list of 741 integers (rla_list_what) indicating what assertions to be listed, and 742 the reply consists of an error or the requested list. 744 The result of requesting a list of rgss3_list_item LABEL is a list of 745 LFSs supported by the server. The client can then use the LFS list 746 to assert labels via the RPCSEC_GSS_CREATE label assertions. See 747 Section 2.7.1.3. 749 2.8. Extensibility 751 Assertion types may be added in the future by adding arms to the 752 'rgss3_assertion_u' union. Other assertion types are described 753 elsewhere and include: 755 o Client-side assertions of identity: 757 * Primary client/user identity 759 * Supplementary group memberships of the client/user, including 760 support for specifying deltas to the membership list as seen on 761 the server. 763 3. Operational Recommendation for Deployment 765 RPCSEC_GSSv3 is a superset of RPCSEC_GSSv2 [8] which in turn is a 766 superset of RPCSEC_GSSv1 [2], and so can be used in all situations 767 where RPCSEC_GSSv1 or RPCSEC_GSSv2 is used. RPCSEC_GSSv3 should be 768 used when the new functionality is needed. 770 4. Security Considerations 772 This entire document deals with security issues. 774 The RPCSEC_GSSv3 protocol allows for client-side assertions of data 775 that is relevant to server-side authorization decisions. These 776 assertions must be evaluated by the server in the context of whether 777 the client and/or user are authenticated, whether multi-principal 778 authentication was used, whether the client is trusted, what ranges 779 of assertions are allowed for the client and the user (separately or 780 together), and any relevant server-side policy. 782 The security semantics of assertions carried by RPCSEC_GSSv3 are 783 application protocol-specific. 785 Note that RPSEC_GSSv3 is not a complete solution for labeling: it 786 conveys the labels of actors, but not the labels of objects. RPC 787 application protocols may require extending in order to carry object 788 label information. 790 There may be interactions with NFSv4's callback security scheme and 791 NFSv4.1's GSS-API "SSV" mechanisms. Specifically, the NFSv4 callback 792 scheme requires that the server initiate GSS-API security contexts, 793 which does not work well in practice, and in the context of client- 794 side processes running as the same user but with different privileges 795 and security labels the NFSv4 callback security scheme seems 796 particularly unlikely to work well. NFSv4.1 has the server use an 797 existing, client-initiated RPCSEC_GSS context handle to protect 798 server-initiated callback RPCs. The NFSv4.1 callback security scheme 799 lacks all the problems of the NFSv4 scheme, however, it is important 800 that the server pick an appropriate RPCSEC_GSS context handle to 801 protect any callbacks. Specifically, it is important that the server 802 use RPCSEC_GSS context handles which authenticate the client to 803 protect any callbacks relating to server state initiated by RPCs 804 protected by RPCSEC_GSSv3 contexts. 806 [[AI6: [Add text about interaction with GSS-SSV...] --NW]] 808 [[AI7: AFAICS the reason to use SSV is to avoid using a client 809 machine credential which means multi-principal authentication can not 810 be used. --AA]] 812 5. IANA Considerations 814 This section uses terms that are defined in [4]. 816 There are no IANA considerations in this document. 818 6. References 820 6.1. Normative References 822 [1] Bradner, S., "Key words for use in RFCs to Indicate 823 Requirement Levels", RFC 2119, March 1997. 825 [2] Eisler, M., Chiu, A., and L. Ling, "RPCSEC_GSS Protocol 826 Specification", RFC 2203, September 1997. 828 [3] Linn, J., "Generic Security Service Application Program 829 Interface Version 2, Update 1", RFC 2743, January 2000. 831 [4] Narten, T. and H. Alvestrand, "Guidelines for Writing an 832 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 833 May 2008. 835 [5] Haynes, T., "NFS Version 4 Minor Version 2", draft-ietf- 836 nfsv4-minorversion2-27 (Work In Progress), June 2014. 838 [6] Williams, N., "On the Use of Channel Bindings to Secure 839 Channels", RFC 5056, November 2007. 841 [7] Eisler, M., "XDR: External Data Representation Standard", 842 RFC 4506, May 2006. 844 [8] Eisler, M., "RPCSEC_GSS Version 2", RFC 5403, February 845 2009. 847 [9] Haynes, T., "Requirements for Labeled NFS", RFC 7204, 848 April 2014. 850 6.2. Informative References 852 [10] "Section 46.6. Multi-Level Security (MLS) of Deployment 853 Guide: Deployment, configuration and administration of Red 854 Hat Enterprise Linux 5, Edition 6", 2011. 856 [11] Smalley, S., "The Distributed Trusted Operating System 857 (DTOS) Home Page", 2000, 858 . 861 [12] Carter, J., "Implementing SELinux Support for NFS", 2005, 862 . 865 [13] Quigley, D. and J. Lu, "Registry Specification for MAC 866 Security Label Formats", draft-quigley-label-format- 867 registry (work in progress), 2011. 869 [14] Wilkinson, S. and B. Kaduk, "Integrating rxgk with AFS", 870 draft-wilkinson-afs3-rxgk-afs (work in progress), April 871 2014. 873 Appendix A. Acknowledgments 875 Andy Adamson would like to thank NetApp, Inc. for its funding of his 876 time on this project. 878 We thank Lars Eggert, Mike Eisler, Ben Kaduk, and Bruce Fields for 879 their most helpful reviews. 881 Appendix B. RFC Editor Notes 883 [RFC Editor: please remove this section prior to publishing this 884 document as an RFC] 886 [RFC Editor: prior to publishing this document as an RFC, please 887 replace all occurrences of RFCTBD10 with RFCxxxx where xxxx is the 888 RFC number of this document] 890 Authors' Addresses 892 William A. (Andy) Adamson 893 NetApp 894 3629 Wagner Ridge Ct 895 Ann Arbor, MI 48103 896 USA 898 Phone: +1 734 665 1204 899 Email: andros@netapp.com 901 Nico Williams 902 cryptonector.com 903 13115 Tamayo Dr 904 Austin, TX 78729 905 USA 907 Email: nico@cryptonector.com