idnits 2.17.1 draft-ietf-nfsv4-rpcsec-gssv3-10.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 237 has weird spacing: '...ue_auth cred;...' == Line 419 has weird spacing: '...3_label rau_l...' == Line 421 has weird spacing: '...3_privs rau_p...' -- The document date (December 08, 2014) is 3426 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) == Outdated reference: A later version (-41) exists of draft-ietf-nfsv4-minorversion2-29 ** Obsolete normative reference: RFC 5661 (ref. '5') (Obsoleted by RFC 8881) ** 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: June 11, 2015 Cryptonector 6 December 08, 2014 8 Remote Procedure Call (RPC) Security Version 3 9 draft-ietf-nfsv4-rpcsec-gssv3-10 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 June 11, 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 . . . . . . . . . . . . . . . . . . . . . . 17 72 3. Operational Recommendation for Deployment . . . . . . . . . . 18 73 4. Security Considerations . . . . . . . . . . . . . . . . . . . 18 74 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19 75 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 19 76 6.1. Normative References . . . . . . . . . . . . . . . . . . 19 77 6.2. Informative References . . . . . . . . . . . . . . . . . 19 78 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 20 79 Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 20 80 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 20 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 [4]) 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. 101 RPCSEC_GSSv3 label assertions provide the means to achieve full mode 102 labeled NFS. 104 A traditional inter-server file copy entails the user gaining access 105 to a file on the source, reading it, and writing it to a file on the 106 destination. In secure NFSv4 inter-server server-side copy (see 107 Section 3.4.1 of [4]), the user first secures access to both source 108 and destination files, and then uses NFSv4.2 defined RPCSEC_GSSv3 109 structured privileges to authorize the destination to copy the file 110 from the source on behalf of the user. 112 Multi-principal assertions can be used to address shared cache 113 poisoning attacks on the client cache by a user. As described in 114 Section 7 of [14], multi-user machines with a single cache manager 115 can fetch and cache data on a users' behalf, and re-display it for 116 another user from the cache without re-fetching the data from the 117 server. The initial data acquisition is authenticated by the first 118 user's credentials, and if only that user's credentials are used, it 119 may be possible for a malicious user or users to "poison" the cache 120 for other users by introducing bogus data into the cache. 122 Another use of the multi-principal assertion is the secure conveyance 123 of privilege information for processes running with more (or even 124 with less) privilege than the user normally would be accorded. 126 We therefore describe RPCSEC_GSS version 3 (RPCSEC_GSSv3). 127 RPCSEC_GSSv3 is the same as RPCSEC_GSSv2 [8], except that the 128 following assertions of authority have been added. 130 o Security labels for multi-level, type enforcement, and other 131 labeled security models. See [10], [11], [12], [4] and [9]. 133 o Application-specific structured privileges. For an example see 134 server-side copy [4]. 136 o Multi-principal authentication of the client host and user to the 137 server done by binding two RPCSEC_GSS handles. 139 o Simplified channel binding. 141 Assertions of labels and privileges are evaluated by the server, 142 which may then map the asserted values to other values, all according 143 to server-side policy. 145 We add an option for enumerating server supported label format 146 specifiers (LFS). The LFS and Label Format Registry are described in 147 detail in [13]. 149 This document contains the External Data Representation (XDR) ([7]) 150 definitions for the RPCSEC_GSSv3 protocol. The XDR description is 151 provided in this document in a way that makes it simple for the 152 reader to extract into ready to compile form. The reader can feed 153 this document in the following shell script to produce the machine 154 readable XDR description of RPCSEC_GSSv3: 156 158 #!/bin/sh 159 grep "^ *///" | sed 's?^ */// ??' | sed 's?^ *///$??' 161 163 I.e. if the above script is stored in a file called "extract.sh", and 164 this document is in a file called "spec.txt", then the reader can do: 166 168 sh extract.sh < spec.txt > rpcsec_gss_v3.x 170 172 The effect of the script is to remove leading white space from each 173 line, plus a sentinel sequence of "///". 175 2. The RPCSEC_GSSv3 Protocol 177 RPCSEC_GSSv3 is the same as RPCSEC_GSSv2 [8], except that support for 178 assertions has been added. The entire RPCSEC_GSSv3 protocol is not 179 presented. Instead the differences between RPCSEC_GSSv3 and 180 RPCSEC_GSSv2 are shown. 182 RPCSEC_GSSv3 is patterned as follows: 184 o A client uses an existing RPCSEC_GSSv3 context handle established 185 in the usual manner (See Section 5.2 [2]) to protect RPCSEC_GSSv3 186 exchanges, this will be termed the "parent" handle. 188 o The server issues a "child" RPCSEC_GSSv3 handle in the 189 RPCSEC_GSS_CREATE response which uses the underlying GSS-API 190 security context of the parent handle in all subsequent exchanges 191 that uses the child handle. 193 o An RPCSEC_GSSv3 child handle MUST NOT be used as the parent handle 194 in an RPCSEC_GSS3_CREATE control message. 196 2.1. Compatibility with RPCSEC_GSSv2 198 The functionality of RPCSEC_GSSv2 [8] is fully supported by 199 RPCSEC_GSSv3 with the exception of the RPCSEC_GSS_BIND_CHANNEL 200 operation which is deprecated (see Section 2.5). 202 2.2. Version Negotiation 204 An initiator that supports version 3 of RPCSEC_GSS simply issues an 205 RPCSEC_GSS request with the rgc_version field set to 206 RPCSEC_GSS_VERS_3. If the target does not recognize 207 RPCSEC_GSS_VERS_3, the target will return an RPC error per 208 Section 5.1 of [2]. 210 The initiator MUST NOT attempt to use an RPCSEC_GSS handle returned 211 by version 3 of a target with version 1 or version 2 of the same 212 target. The initiator MUST NOT attempt to use an RPCSEC_GSS handle 213 returned by version 1 or version 2 of a target with version 3 of the 214 same target. 216 2.3. New REPLY Verifier 218 A new reply verifier is needed for RPCSEC_GSSv3 due to the following: 219 The RPCSEC_GSSv3 child handle uses the same GSS context as the parent 220 handle, so a child and parent RPCSEC_GSSv3 handle could have the same 221 RPCSEC_GSS sequence numbers. Since the reply verifier of previous 222 versions of RPCSEC_GSS computes a MIC on just the sequence number, 223 this provides opportunities for man in the middle attacks. 225 This is easily addressed: RPCSEC_GSS version 3 changes the verifier 226 of the reply to compute the verifier using the exact same input as 227 that is used for verifier of the request, except for the mtype change 228 from CALL to REPLY. The new reply verifier computes a MIC over the 229 following RPC reply header data: 231 unsigned int xid; 232 msg_type mtype; /* set to REPLY */ 233 unsigned int rpcvers; 234 unsigned int prog; 235 unsigned int vers; 236 unsigned int proc; 237 opaque_auth cred; /* captures the RPCSEC_GSS handle */ 239 2.4. New Version Number 241 243 /// /* 244 /// * Copyright (c) 2013 IETF Trust and the persons 245 /// * identified as the document authors. All rights 246 /// * reserved. 247 /// * 248 /// * The document authors are identified in [RFC2203], 249 /// * [RFC5403], and [RFCxxxx]. 250 /// * 251 /// * Redistribution and use in source and binary forms, 252 /// * with or without modification, are permitted 253 /// * provided that the following conditions are met: 254 /// * 255 /// * o Redistributions of source code must retain the above 256 /// * copyright notice, this list of conditions and the 257 /// * following disclaimer. 258 /// * 259 /// * o Redistributions in binary form must reproduce the 260 /// * above copyright notice, this list of 261 /// * conditions and the following disclaimer in 262 /// * the documentation and/or other materials 263 /// * provided with the distribution. 264 /// * 265 /// * o Neither the name of Internet Society, IETF or IETF 266 /// * Trust, nor the names of specific contributors, may be 267 /// * used to endorse or promote products derived from this 268 /// * software without specific prior written permission. 269 /// * 270 /// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 271 /// * AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 272 /// * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 273 /// * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 274 /// * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 275 /// * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 276 /// * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 277 /// * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 278 /// * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 279 /// * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 280 /// * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 281 /// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 282 /// * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 283 /// * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 284 /// * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 285 /// */ 286 /// 287 /// /* 288 /// * This code was derived from [RFC2203]. Please 289 /// * reproduce this note if possible. 290 /// */ 291 /// 292 /// enum rpc_gss_service_t { 293 /// /* Note: the enumerated value for 0 is reserved. */ 294 /// rpc_gss_svc_none = 1, 295 /// rpc_gss_svc_integrity = 2, 296 /// rpc_gss_svc_privacy = 3, 297 /// rpc_gss_svc_channel_prot = 4 298 /// }; 299 /// 300 /// enum rpc_gss_proc_t { 301 /// RPCSEC_GSS_DATA = 0, 302 /// RPCSEC_GSS_INIT = 1, 303 /// RPCSEC_GSS_CONTINUE_INIT = 2, 304 /// RPCSEC_GSS_DESTROY = 3, 305 /// RPCSEC_GSS_BIND_CHANNEL = 4, /* not used */ 306 /// RPCSEC_GSS_CREATE = 5, /* new */ 307 /// RPCSEC_GSS_LIST = 6 /* new */ 308 /// }; 309 /// 310 /// struct rpc_gss_cred_vers_1_t { 311 /// rpc_gss_proc_t gss_proc; /* control procedure */ 312 /// unsigned int seq_num; /* sequence number */ 313 /// rpc_gss_service_t service; /* service used */ 314 /// opaque handle<>; /* context handle */ 315 /// }; 316 /// 317 /// const RPCSEC_GSS_VERS_1 = 1; 318 /// const RPCSEC_GSS_VERS_2 = 2; 319 /// const RPCSEC_GSS_VERS_3 = 3; /* new */ 320 /// 321 /// union rpc_gss_cred_t switch (unsigned int rgc_version) { 322 /// case RPCSEC_GSS_VERS_1: 323 /// case RPCSEC_GSS_VERS_2: 324 /// case RPCSEC_GSS_VERS_3: /* new */ 325 /// rpc_gss_cred_vers_1_t rgc_cred_v1; 326 /// }; 327 /// 329 331 As seen above, the RPCSEC_GSSv3 credential has the same format as the 332 RPCSEC_GSSv1 [2] and RPCSEC_GSSv2 [8] credential. Setting the 333 rgc_version field to 3 indicates that the initiator and target 334 support the new RPCSEC_GSSv3 control procedures. 336 2.5. RPCSEC_GSS_BIND_CHANNEL Operation Deprecated 338 RPCSEC_GSSv3 provides a channel binding assertion that replaces the 339 RPCSEC_GSSv2 RPCSEC_GSS_BIND_CHANNEL operation. 340 RPCSEC_GSS_BIND_CHANNEL MUST NOT be used on RPCSEC_GSS version 3 341 handles. 343 2.6. New auth_stat Values 345 RPCSEC_GSSv3 requires the addition of several values to the auth_stat 346 enumerated type definition. The use of each of these new auth_stat 347 values is explained throughout this document. 349 enum auth_stat { 350 ... 351 /* 352 * RPCSEC_GSSv3 errors 353 */ 354 RPCSEC_GSS_INNER_CREDPROBLEM = 15, 355 RPCSEC_GSS_LABEL_PROBLEM = 16, 356 RPCSEC_GSS_PRIVILEGE_PROBLEM = 17, 357 RPCSEC_GSS_UNKNOWN_MESSAGE = 18 358 }; 360 2.7. New Control Procedures 362 There are two new RPCSEC_GSSv3 control procedures: RPCSEC_GSS_CREATE, 363 RPCSEC_GSS_LIST. 365 The RPCSEC_GSS_CREATE procedure binds any combination of assertions: 366 multi-principal authentication, labels, structured privileges, or 367 channel bindings to a new RPCSEC_GSSv3 context returned in the 368 rgss3_create_res rcr_handle field. 370 The RPCSEC_GSS_LIST procedure queries the target for supported 371 assertions. 373 RPCSEC_GSS version 3 control messages are similar to the RPCSEC_GSS 374 version 1 and version 2 RPCSEC_GSS_DESTROY control message (see 375 section 5.4 [2]) in that the sequence number in the request must be 376 valid, and the header checksum in the verifier must be valid. As in 377 RPCSEC_GSS version 1 and version 2, the RPCSEC_GSSv version 3 control 378 messages may contain call data following the verifier in the body of 379 the NULLPROC procedure. In other words, they look a lot like an 380 RPCSEC_GSS data message with the header procedure set to NULLPROC. 382 The client MUST use one of the following security services to protect 383 the RPCSEC_GSS_CREATE or RPCSEC_GSS_LIST control message: 385 o rpc_gss_svc_integrity 387 o rpc_gss_svc_privacy 389 Specifically the client MUST NOT use rpc_gss_svc_none. 391 RPCSEC_GSS_LIST can also use rpc_gss_svc_channel_prot (see 392 RPCSEC_GSSv2 [8]) if the request is sent using an RPCSEC_GSSv3 child 393 handle with channel bindings enabled as described in Section 2.7.1.2. 395 2.7.1. New Control Procedure - RPCSEC_GSS_CREATE 397 398 /// struct rgss3_create_args { 399 /// rgss3_gss_mp_auth *rca_mp_auth; 400 /// rgss3_chan_binding *rca_chan_bind_mic; 401 /// rgss3_assertion_u rca_assertions<>; 402 /// }; 403 /// 404 /// struct rgss3_create_res { 405 /// opaque rcr_handle<>; 406 /// rgss3_gss_mp_auth *rcr_mp_auth; 407 /// rgss3_chan_binding *rcr_chan_bind_mic; 408 /// rgss3_assertion_u rcr_assertions<>; 409 /// }; 410 /// 411 /// enum rgss3_assertion_type { 412 /// LABEL = 0, 413 /// PRIVS = 1 414 /// }; 415 /// 416 /// union rgss3_assertion_u 417 /// switch (rgss3_assertion_type atype) { 418 /// case LABEL: 419 /// rgss3_label rau_label; 420 /// case PRIVS: 421 /// rgss3_privs rau_privs; 422 /// default: 423 /// opaque rau_ext<>; 424 /// }; 425 /// 427 429 The call data for an RPCSEC_GSS_CREATE request consists of an 430 rgss3_create_args which binds one or more items of several kinds to 431 the returned rcr_handle RPCSEC_GSSv3 context handle called the 432 "child" handle: 434 o Multi-principal authentication: another RPCSEC_GSS context handle 436 o A channel binding 438 o Authorization assertions: labels and or privileges 440 The reply to this message consists of either an error or an 441 rgss3_create_res structure. As noted in Section 2.7.1.3 and 442 Section 2.7.1.4 successful rgss3_assertions are enumerated in 443 rcr_assertions, and are REQUIRED be enumerated in the same order as 444 they appeared in the rca_assertions argument. 446 Upon successful RPCSEC_GSS_CREATE, both the client and the server 447 SHOULD associate the resultant child rcr_handle context handle with 448 the parent context handle in their GSS context caches so as to be 449 able to reference the parent context given the child context handle. 451 RPCSEC_GSSv3 child handles MUST be destroyed upon the destruction of 452 the associated parent handle. 454 Server implementation and policy MAY result in labels, privileges, 455 and identities being mapped to concepts and values that are local to 456 the server. Server policies should take into account the identity of 457 the client and/or user as authenticated via the GSS-API. 459 2.7.1.1. Multi-principal Authentication 461 463 /// 464 /// struct rgss3_gss_mp_auth { 465 /// opaque rgmp_handle<>; /* inner handle */ 466 /// opaque rgmp_rpcheader_mic<>; 467 /// }; 468 /// 470 472 RPCSEC_GSSv3 clients MAY assert a multi-principal authentication of 473 the RPC client host principal and a user principal. This feature is 474 needed, for example, when an RPC client host wishes to use authority 475 assertions that the server may only grant if a user and an RPC client 476 host are authenticated together to the server. Thus a server may 477 refuse to grant requested authority to a user acting alone (e.g., via 478 an unprivileged user-space program), or to an RPC client host acting 479 alone (e.g. when an RPC client host is acting on behalf of a user) 480 but may grant requested authority to an RPC client host acting on 481 behalf of a user if the server identifies the user and trusts the RPC 482 client host. 484 It is assumed that an unprivileged user-space program would not have 485 access to RPC client host credentials needed to establish a GSS-API 486 security context authenticating the RPC client host to the server, 487 therefore an unprivileged user-space program could not create an 488 RPCSEC_GSSv3 RPCSEC_GSS_CREATE message that successfully binds an RPC 489 client host and a user security context. 491 In addition to the parent handle (Section 2), the multi-principal 492 authentication call data has an RPCSEC_GSS version 3 handle 493 referenced via the rgmp_handle field termed the "inner" handle. 495 Clients using RPCSEC_GSSv3 multi-principal authentication MUST use an 496 RPCSEC_GSSv3 context handle that corresponds to a GSS-API security 497 context that authenticates the RPC client host for the parent handle. 498 The inner context handle it SHOULD use a context handle to 499 authenticate a user. The reverse (parent handle authenticates user, 500 inner authenticates an RPC client host) MUST NOT be used. Other 501 multi-principal parent and inner context handle uses might eventually 502 make sense, but would need to be introduced in a new revision of the 503 RPCSEC_GSS protocol. 505 The child context handle returned by a successful multi-principal 506 assertion binds the inner RPCSEC_GSSv3 context handle to the parent 507 RPCSEC_GSS context and MUST be treated by servers as authenticating 508 the GSS-API initiator principal authenticated by the inner context 509 handle's GSS-API security context. This principal may be mapped to a 510 server-side notion of user or principal. 512 Multi-principal binding is done by including an assertion of type 513 rgss3_gss_mp_auth in the RPCSEC_GSS_CREATE rgss3_create_args call 514 data. The inner context handle is placed in the rgmp_handle field. 515 A MIC of the RPC call header up to and including the credential is 516 computed using the GSS-API security context associated with the inner 517 context handle is placed in rgmp_rpcheader_mic field. 519 The target verifies the multi-principal authentication by first 520 confirming that the parent context used is an RPC client host 521 context, and then verifies the rgmp_rpcheader_mic using the GSS-API 522 security context associated with the rgmp_handle field. 524 On a successful verification, the rgss3_gss_mp_auth field in the 525 rgss3_create_res reply MUST be filled in with the inner RPCSEC_GSSv3 526 context handle as the rgmp_handle, and a MIC computed over the RPC 527 reply header (see section Section 2.3) using the GSS-API security 528 context associated with the inner handle. 530 On failure, the rgss3_gss_mp_auth field is not sent 531 (rgss3_gss_mp_auth is an optional field). A MSG_DENIED reply to the 532 RPCSEC_GSS_CREATE call is formulated as usual. 534 As described in Section 5.3.3.3 of [2] the server maintains a list of 535 contexts for the clients that are currently in session with it. When 536 a client request comes in, there may not be a context corresponding 537 to its handle. When this occurs on an RPCSEC_GSS3_CREATE request 538 processing of the parent handle, the server rejects the request with 539 a reply status of MSG_DENIED with the reject_stat of AUTH_ERROR and 540 with an auth_stat value of RPCSEC_GSS_CREDPROBLEM. 542 A new value, RPCSEC_GSS_INNER_CREDPROBLEM, has been added to the 543 auth_stat type. With a multi-pricipal authorization request, the 544 server must also have a context corresponding to the inner context 545 handle. When the server does not have a context handle corresponding 546 to the inner context handle of a multi-pricipal authorization 547 request, the server sends a reply status of MSG_DENIED with the 548 reject_stat of AUTH_ERROR and with an auth_stat value of 549 RPCSEC_GSS_INNER_CREDPROBLEM. 551 When processing the multi-principal authentication request, if the 552 GSS_VerifyMIC() call on the rgmp_rpcheader_mic fails to return 553 GSS_S_COMPLETE, the server sends a reply status of MSG_DENIED with 554 the reject_stat of AUTH_ERROR and with an auth_stat value of 555 RPCSEC_GSS_INNER_CREDPROBLEM. 557 2.7.1.2. Channel Binding 559 561 /// 562 /// typedef opaque rgss3_chan_binding<>; 563 /// 565 567 RPCSEC_GSSv3 provides a different way to do channel binding than 568 RPCSEC_GSSv2 [8]. Specifically: 570 a. RPCSEC_GSSv3 builds on RPCSEC_GSSv1 by reusing existing, 571 established context handles rather than providing a different RPC 572 security flavor for establishing context handles, 574 b. channel bindings data are not hashed because the community now 575 agrees that it is the secure channel's responsibility to produce 576 channel bindings data of manageable size. 578 (a) is useful in keeping RPCSEC_GSSv3 simple in general, not just for 579 channel binding. (b) is useful in keeping RPCSEC_GSSv3 simple 580 specifically for channel binding. 582 Channel binding is accomplished as follows. The client prefixes the 583 channel bindings data octet string with the channel type as described 584 in [6], then the client calls GSS_GetMIC() to get a MIC of resulting 585 octet string, using the parent RPCSEC_GSSv3 context handle's GSS-API 586 security context. The MIC is then placed in the rca_chan_bind_mic 587 field of RPCSEC_GSS_CREATE arguments (rgss3_create_args). 589 If the rca_chan_bind_mic field of the arguments of a 590 RPCSEC_GSS_CREATE control message is set, then the server MUST verify 591 the client's channel binding MIC if the server supports this feature. 592 If channel binding verification succeeds then the server MUST 593 generate a new MIC of the same channel bindings and place it in the 594 rcr_chan_bind_mic field of the RPCSEC_GSS_CREATE rgss3_create_res 595 results. If channel binding verification fails or the server doesn't 596 support channel binding then the server MUST indicate this in its 597 reply by not including a rgss3_chan_binding value in rgss3_create_res 598 (rgss3_chan_binding is an optional field). 600 The client MUST verify the result's rcr_chan_bind_mic value by 601 calling GSS_VerifyMIC() with the given MIC and the channel bindings 602 data (including the channel type prefix). If client-side channel 603 binding verification fails then the client MUST call 604 RPCSEC_GSS_DESTROY. If the client requested channel binding but the 605 server did not include an rcr_chan_binding_mic field in the results, 606 then the client MAY continue to use the resulting context handle as 607 though channel binding had never been requested. If the client 608 considers channel binding critical, it MUST call RPCSEC_GSS_DESTROY. 610 As per-RPCSEC_GSSv2 [8]: 612 "Once a successful [channel binding] procedure has been performed 613 on an [RPCSEC_GSSv3] context handle, the initiator's 614 implementation may map application requests for rpc_gss_svc_none 615 and rpc_gss_svc_integrity to rpc_gss_svc_channel_prot credentials. 616 And if the secure channel has privacy enabled, requests for 617 rpc_gss_svc_privacy can also be mapped to 618 rpc_gss_svc_channel_prot." 620 Any RPCSEC_GSSv3 child context handle that has been bound to a secure 621 channel in this way SHOULD be used only with the 622 rpc_gss_svc_channel_prot, and SHOULD NOT be used with 623 rpc_gss_svc_none nor rpc_gss_svc_integrity -- if the secure channel 624 does not provide privacy protection then the client MAY use 625 rpc_gss_svc_privacy where privacy protection is needed or desired. 627 2.7.1.3. Label Assertions 629 630 /// struct rgss3_label { 631 /// rgss3_lfs rl_lfs; 632 /// opaque rl_label<>; 633 /// }; 634 /// 635 /// struct rgss3_lfs { 636 /// unsigned int rlf_lfs_id; 637 /// unsigned int rlf_pi_id; 638 /// }; 639 /// 641 643 The client discovers which labels the server supports via the 644 RPCSEC_GSS_LIST control message. Asserting a server supported label 645 via RPCSEC_GSS_CREATE enables server guest mode labels. Full mode is 646 enabled when an RPCSEC_GSS_CREATE label assertion is combined with 647 asserting the same label with the NFSv4.2 sec_label attribute. 649 Label encoding is specified to mirror the NFSv4.2 sec_label attribute 650 described in Section 12.2.2 of [4]. The label format specifier (LFS) 651 is an identifier used by the client to establish the syntactic format 652 of the security label and the semantic meaning of its components. 653 The policy identifier (PI) is an optional part of the definition of 654 an LFS which allows for clients and server to identify specific 655 security policies. The opaque label field of rgss3_label is 656 dependent on the MAC model to interpret and enforce. 658 If a label itself requires privacy protection (i.e., that the user 659 can assert that label is a secret) then the client MUST use the 660 rpc_gss_svc_privacy protection service for the RPCSEC_GSS_CREATE 661 request. 663 RPCSEC_GSSv3 clients MAY assert a server security label in some LSF 664 by binding a label assertion to the RPCSEC_GSSv3 context handle. 665 This is done by including an assertion of type rgss3_label in the 666 RPCSEC_GSS_CREATE rgss3_create_args rca_assertions call data. 668 Servers that support labeling in the requested LFS MAY map the 669 requested label to different label as a result of server-side policy 670 evaluation. 672 The labels that are accepted by the target and bound to the 673 RPCSEC_GSSv3 context MUST be enumerated in the rcr_assertions field 674 of the rgss3_create_res RPCSEC_GSS_CREATE reply. 676 Servers that do not support labeling or that do not support the 677 requested LFS reject the label assertion with a reply status of 678 MSG_DENIED, a reject_status of AUTH_ERROR, and an auth_stat of 679 RPCSEC_GSS_LABEL_PROBLEM. 681 2.7.1.4. Structured Privilege Assertions 683 685 /// 686 /// struct rgss3_privs { 687 /// string rp_name<>; /* human readable */ 688 /// opaque rp_privilege<>; 689 /// }; 691 693 A structured privilege is an RPC application defined privilege. 694 RPCSEC_GSSv3 clients MAY assert a structured privilege by binding the 695 privilege to the RPCSEC_GSSv3 context handle. This is done by 696 including an assertion of type rgss3_privs in the RPCSEC_GSS_CREATE 697 rgss3_create_args rca_assertions call data. Encoding, server 698 verification and any policies for structured privileges are described 699 by the RPC application definition. 701 A successful structured privilege assertion MUST be enumerated in the 702 rcr_assertions field of the rgss3_create_res RPCSEC_GSS_CREATE reply. 704 If a server receives a structured privilege assertion that it does 705 not recognize the assertion is rejected with a reply status of 706 MSG_DENIED, a reject_status of AUTH_ERROR, and an auth_stat of 707 RPCSEC_GSS_UNKNOWN_MESSAGE. 709 If a server receives a structured privilege assertion that it fails 710 to verify according to the requirements of the RPC application 711 defined behavior, the assertion is rejected with a reply status of 712 MSG_DENIED, a reject_status of AUTH_ERROR, and an auth_stat of 713 RPCSEC_GSS_PRIVILEGE_PROBLEM. 715 Section 3.4.1.2. "Inter-Server Copy with RPCSEC_GSSv3" of [4] shows 716 an example of structured privilege definition and use. 718 2.7.2. New Control Procedure - RPCSEC_GSS_LIST 720 721 /// enum rgss3_list_item { 722 /// LABEL = 0, 723 /// PRIVS = 1 724 /// }; 725 /// 726 /// struct rgss3_list_args { 727 /// rgss3_list_item rla_list_what<>; 728 /// }; 729 /// 730 /// union rgss3_list_item_u 731 /// switch (rgss3_list_item itype) { 732 /// case LABEL: 733 /// rgss3_label rli_labels<>; 734 /// case PRIVS: 735 /// rgss3_privs rli_privs<>; 736 /// }; 737 /// 738 /// typedef rgss3_list_item_u rgss3_list_res<>; 739 /// 741 743 The call data for an RPCSEC_GSS_LIST request consists of a list of 744 integers (rla_list_what) indicating what assertions to be listed, and 745 the reply consists of an error or the requested list. 747 The result of requesting a list of rgss3_list_item LABEL is a list of 748 LFSs supported by the server. The client can then use the LFS list 749 to assert labels via the RPCSEC_GSS_CREATE label assertions. See 750 Section 2.7.1.3. 752 2.8. Extensibility 754 Assertion types may be added in the future by adding arms to the 755 'rgss3_assertion_u' union. Other assertion types are described 756 elsewhere and include: 758 o Client-side assertions of identity: 760 * Primary client/user identity 762 * Supplementary group memberships of the client/user, including 763 support for specifying deltas to the membership list as seen on 764 the server. 766 3. Operational Recommendation for Deployment 768 RPCSEC_GSSv3 is a superset of RPCSEC_GSSv2 [8] which in turn is a 769 superset of RPCSEC_GSSv1 [2], and so can be used in all situations 770 where RPCSEC_GSSv1 or RPCSEC_GSSv2 is used. RPCSEC_GSSv3 should be 771 used when the new functionality is needed. 773 4. Security Considerations 775 This entire document deals with security issues. 777 The RPCSEC_GSSv3 protocol allows for client-side assertions of data 778 that is relevant to server-side authorization decisions. These 779 assertions must be evaluated by the server in the context of whether 780 the client and/or user are authenticated, whether multi-principal 781 authentication was used, whether the client is trusted, what ranges 782 of assertions are allowed for the client and the user (separately or 783 together), and any relevant server-side policy. 785 The security semantics of assertions carried by RPCSEC_GSSv3 are 786 application protocol-specific. 788 Note that RPSEC_GSSv3 is not a complete solution for labeling: it 789 conveys the labels of actors, but not the labels of objects. RPC 790 application protocols may require extending in order to carry object 791 label information. 793 There may be interactions with NFSv4's callback security scheme and 794 NFSv4.1's [5] GSS-API "SSV" mechanisms. Specifically, the NFSv4 795 callback scheme requires that the server initiate GSS-API security 796 contexts, which does not work well in practice, and in the context of 797 client- side processes running as the same user but with different 798 privileges and security labels the NFSv4 callback security scheme 799 seems particularly unlikely to work well. NFSv4.1 has the server use 800 an existing, client-initiated RPCSEC_GSS context handle to protect 801 server-initiated callback RPCs. The NFSv4.1 callback security scheme 802 lacks all the problems of the NFSv4 scheme, however, it is important 803 that the server pick an appropriate RPCSEC_GSS context handle to 804 protect any callbacks. Specifically, it is important that the server 805 use RPCSEC_GSS context handles which authenticate the client to 806 protect any callbacks relating to server state initiated by RPCs 807 protected by RPCSEC_GSSv3 contexts. 809 As described in Section 2.10.10 [5] the client is permitted to 810 associate multiple RPCSEC_GSS handles with a single SSV GSS context. 811 RPCSEC_GSSv3 handles will work well with SSV in that the man-in-the- 812 middle attacks described in Section 2.10.10 [5] are solved by the new 813 reply verifier (Section 2.3). Using an RPCSEC_GSSv3 handle backed by 814 a GSS-SSV mechanism context as a parent handle in an 815 RPCSEC_GSS_CREATE call while permitted is complicated by the lifetime 816 rules of SSV contexts and their associated RPCSEC_GSS handles. 818 5. IANA Considerations 820 There are no IANA considerations in this document. 822 6. References 824 6.1. Normative References 826 [1] Bradner, S., "Key words for use in RFCs to Indicate 827 Requirement Levels", RFC 2119, March 1997. 829 [2] Eisler, M., Chiu, A., and L. Ling, "RPCSEC_GSS Protocol 830 Specification", RFC 2203, September 1997. 832 [3] Linn, J., "Generic Security Service Application Program 833 Interface Version 2, Update 1", RFC 2743, January 2000. 835 [4] Haynes, T., "NFS Version 4 Minor Version 2", draft-ietf- 836 nfsv4-minorversion2-29 (Work In Progress), December 2014. 838 [5] Shepler, S., Eisler, M., and D. Noveck, "Network File 839 System (NFS) Version 4 Minor Version 1 Protocol", RFC 840 5661, January 2010. 842 [6] Williams, N., "On the Use of Channel Bindings to Secure 843 Channels", RFC 5056, November 2007. 845 [7] Eisler, M., "XDR: External Data Representation Standard", 846 RFC 4506, May 2006. 848 [8] Eisler, M., "RPCSEC_GSS Version 2", RFC 5403, February 849 2009. 851 [9] Haynes, T., "Requirements for Labeled NFS", RFC 7204, 852 April 2014. 854 6.2. Informative References 856 [10] "Section 46.6. Multi-Level Security (MLS) of Deployment 857 Guide: Deployment, configuration and administration of Red 858 Hat Enterprise Linux 5, Edition 6", 2011. 860 [11] Smalley, S., "The Distributed Trusted Operating System 861 (DTOS) Home Page", 2000, 862 . 865 [12] Carter, J., "Implementing SELinux Support for NFS", 2005, 866 . 869 [13] Quigley, D. and J. Lu, "Registry Specification for MAC 870 Security Label Formats", draft-quigley-label-format- 871 registry (work in progress), 2011. 873 [14] Wilkinson, S. and B. Kaduk, "Integrating rxgk with AFS", 874 draft-wilkinson-afs3-rxgk-afs (work in progress), April 875 2014. 877 Appendix A. Acknowledgments 879 Andy Adamson would like to thank NetApp, Inc. for its funding of his 880 time on this project. 882 We thank Lars Eggert, Mike Eisler, Ben Kaduk, and Bruce Fields for 883 their most helpful reviews. 885 Appendix B. RFC Editor Notes 887 [RFC Editor: please remove this section prior to publishing this 888 document as an RFC] 890 [RFC Editor: prior to publishing this document as an RFC, please 891 replace all occurrences of RFCTBD10 with RFCxxxx where xxxx is the 892 RFC number of this document] 894 Authors' Addresses 896 William A. (Andy) Adamson 897 NetApp 898 3629 Wagner Ridge Ct 899 Ann Arbor, MI 48103 900 USA 902 Phone: +1 734 665 1204 903 Email: andros@netapp.com 904 Nico Williams 905 cryptonector.com 906 13115 Tamayo Dr 907 Austin, TX 78729 908 USA 910 Email: nico@cryptonector.com