idnits 2.17.1 draft-ietf-nfsv4-rpcsec-gssv3-13.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 254 has weird spacing: '...ue_auth cred;...' == Line 447 has weird spacing: '...3_label rau_l...' == Line 449 has weird spacing: '...3_privs rau_p...' -- The document date (November 02, 2015) is 3096 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) ** Downref: Normative reference to an Informational RFC: RFC 7204 -- Obsolete informational reference (is this intentional?): RFC 2401 (Obsoleted by RFC 4301) Summary: 2 errors (**), 0 flaws (~~), 4 warnings (==), 3 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 5, 2016 Cryptonector 6 November 02, 2015 8 Remote Procedure Call (RPC) Security Version 3 9 draft-ietf-nfsv4-rpcsec-gssv3-13 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 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 May 5, 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 . . . . . . . . . . . . . . . . . . . 3 62 1.2. XDR Code Extraction . . . . . . . . . . . . . . . . . . . 4 63 2. The RPCSEC_GSSv3 Protocol . . . . . . . . . . . . . . . . . . 4 64 2.1. Compatibility with RPCSEC_GSSv2 . . . . . . . . . . . . . 5 65 2.2. Version Negotiation . . . . . . . . . . . . . . . . . . . 5 66 2.3. New REPLY Verifier . . . . . . . . . . . . . . . . . . . 5 67 2.4. XDR Code Preliminaries . . . . . . . . . . . . . . . . . 6 68 2.5. RPCSEC_GSS_BIND_CHANNEL Operation . . . . . . . . . . . . 8 69 2.6. New auth_stat Values . . . . . . . . . . . . . . . . . . 8 70 2.7. New Control Procedures . . . . . . . . . . . . . . . . . 9 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 . . . . . . . . . . . . . . . . . . . . . . 17 74 3. Operational Recommendation for Deployment . . . . . . . . . . 18 75 4. Security Considerations . . . . . . . . . . . . . . . . . . . 18 76 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19 77 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 19 78 6.1. Normative References . . . . . . . . . . . . . . . . . . 19 79 6.2. Informative References . . . . . . . . . . . . . . . . . 19 80 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 20 81 Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 20 82 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 20 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 RPCSEC_GSSv3 is to add support for multi-level 100 (labeled) security and server-side copy for NFSv4. 102 Multi-Level Security (MLS) is a traditional model where subjects are 103 given a security level (Unclassified, Secret, Top Secret, etc.) and 104 objects are given security labels that mandate the access of the 105 subject to the object (see [BL73] and [RFC2401]). 107 Labeled NFS (see Section 8 of [NFSv4.2]) uses the MLS subject label 108 provided by the client via the RPCSEC_GSSv3 layer to enforce MAC 109 access to objects owned by the server to enable server guest mode. 110 RPCSEC_GSSv3 label assertions provide the means to achieve full mode 111 labeled NFS. 113 A traditional inter-server file copy entails the user gaining access 114 to a file on the source, reading it, and writing it to a file on the 115 destination. In secure NFSv4 inter-server server-side copy (see 116 Section 3.4.1 of [NFSv4.2]), the user first secures access to both 117 source and destination files, and then uses NFSv4.2 defined 118 RPCSEC_GSSv3 structured privileges to authorize the destination to 119 copy the file from the source on behalf of the user. 121 Multi-principal assertions can be used to address shared cache 122 poisoning attacks on the client cache by a user. As described in 123 Section 7 of [AFS-RXGK], multi-user machines with a single cache 124 manager can fetch and cache data on a users' behalf, and re-display 125 it for another user from the cache without re-fetching the data from 126 the server. The initial data acquisition is authenticated by the 127 first user's credentials, and if only that user's credentials are 128 used, it may be possible for a malicious user or users to "poison" 129 the cache for other users by introducing bogus data into the cache. 131 Another use of the multi-principal assertion is the secure conveyance 132 of privilege information for processes running with more (or even 133 with less) privilege than the user normally would be accorded. 135 1.1. Added Functionality 137 We therefore describe RPCSEC_GSS version 3 (RPCSEC_GSSv3). 138 RPCSEC_GSSv3 is the same as RPCSEC_GSSv2 [RFC5403], except that the 139 following assertions of authority have been added. 141 o Security labels for multi-level security type enforcement, and 142 other labeled security models (See [RFC7204]). 144 o Application-specific structured privileges. For an example see 145 server-side copy [NFSv4.2]. 147 o Multi-principal authentication of the client host and user to the 148 server done by binding two RPCSEC_GSS handles. 150 o Simplified channel binding. 152 Assertions of labels and privileges are evaluated by the server, 153 which may then map the asserted values to other values, all according 154 to server-side policy. See [NFSv4.2]. 156 An option for enumerating server supported label format specifiers 157 (LFS) is provided. See [RFC7204] for detail. 159 1.2. XDR Code Extraction 161 This document contains the External Data Representation (XDR) 162 ([RFC4506]) definitions for the RPCSEC_GSSv3 protocol. The XDR 163 description is provided in this document in a way that makes it 164 simple for the reader to extract into ready to compile form. The 165 reader can feed this document in the following shell script to 166 produce the machine readable XDR description of RPCSEC_GSSv3: 168 170 #!/bin/sh 171 grep "^ *///" | sed 's?^ */// ??' | sed 's?^ *///$??' 173 175 I.e. if the above script is stored in a file called "extract.sh", and 176 this document is in a file called "spec.txt", then the reader can do: 178 180 sh extract.sh < spec.txt > rpcsec_gss_v3.x 182 184 The effect of the script is to remove leading white space from each 185 line, plus a sentinel sequence of "///". 187 2. The RPCSEC_GSSv3 Protocol 189 RPCSEC_GSS version 3 (RPCSEC_GSSv3) is very similar to RPCSEC_GSS 190 version 2 (RPCSEC_GSSv2) [RFC5403]. The differences are the addition 191 of support for assertions and channel bindings are supported via a 192 different mechanism. 194 The entire RPCSEC_GSSv3 protocol is not presented here. Only the 195 differences between it and RPCSEC_GSSv2 are shown. 197 The use of RPCSEC_GSSv3 is structured as follows: 199 o A client uses an existing RPCSEC_GSSv3 context handle established 200 in the usual manner (See Section 5.2 [RFC2203]) to protect 201 RPCSEC_GSSv3 exchanges, this will be termed the "parent" handle. 203 o The server issues a "child" RPCSEC_GSSv3 handle in the 204 RPCSEC_GSS_CREATE response which uses the underlying GSS-API 205 security context of the parent handle in all subsequent exchanges 206 that uses the child handle. 208 o An RPCSEC_GSSv3 child handle MUST NOT be used as the parent handle 209 in an RPCSEC_GSS3_CREATE control message. 211 2.1. Compatibility with RPCSEC_GSSv2 213 The functionality of RPCSEC_GSSv2 [RFC5403] is fully supported by 214 RPCSEC_GSSv3 with the exception of the RPCSEC_GSS_BIND_CHANNEL 215 operation which is deprecated (see Section 2.5). 217 2.2. Version Negotiation 219 An initiator that supports version 3 of RPCSEC_GSS simply issues an 220 RPCSEC_GSS request with the rgc_version field set to 221 RPCSEC_GSS_VERS_3. If the target does not recognize 222 RPCSEC_GSS_VERS_3, the target will return an RPC error per 223 Section 5.1 of [RFC2203]. 225 The initiator MUST NOT attempt to use an RPCSEC_GSS handle returned 226 by version 3 of a target with version 1 or version 2 of the same 227 target. The initiator MUST NOT attempt to use an RPCSEC_GSS handle 228 returned by version 1 or version 2 of a target with version 3 of the 229 same target. 231 2.3. New REPLY Verifier 233 A new reply verifier is needed for RPCSEC_GSSv3 because of a 234 situation that arises from the use of the same GSS context by child 235 and parent handles. Because the RPCSEC_GSSv3 child handle uses the 236 same GSS context as the parent handle, a child and parent 237 RPCSEC_GSSv3 handle could have the same RPCSEC_GSS sequence numbers. 238 Since the reply verifier of previous versions of RPCSEC_GSS computes 239 a MIC on just the sequence number, this provides opportunities for 240 man in the middle attacks. 242 This issue is addressed in RPCSEC_GSS version 3 by computing the 243 reply verifier using the exact same input as is used to compute the 244 request verifier, except for the mtype is changed from CALL to REPLY. 245 The new reply verifier computes a MIC over the following RPC request 246 header data: 248 unsigned int xid; 249 msg_type mtype; /* set to REPLY */ 250 unsigned int rpcvers; 251 unsigned int prog; 252 unsigned int vers; 253 unsigned int proc; 254 opaque_auth cred; /* captures the RPCSEC_GSS handle */ 256 To clarify; Section 5.2.2 in RPCSEC_GSSv1 [RFC2203] describes the 257 context creation requests and notes that the credential seq_num and 258 service fields are undefined and both must be ignored by the server. 259 The context creation request credential handle field is NULL. The 260 new reply verifier MIC data for the context creation reply includes 261 whatever values are sent in the context creation request credential 262 seq_num, service, and handle fields. 264 2.4. XDR Code Preliminaries 266 268 /// /* 269 /// * Copyright (c) 2013 IETF Trust and the persons 270 /// * identified as the document authors. All rights 271 /// * reserved. 272 /// * 273 /// * The document authors are identified in [RFC2203], 274 /// * [RFC5403], and [RFCxxxx]. 275 /// * 276 /// * Redistribution and use in source and binary forms, 277 /// * with or without modification, are permitted 278 /// * provided that the following conditions are met: 279 /// * 280 /// * o Redistributions of source code must retain the above 281 /// * copyright notice, this list of conditions and the 282 /// * following disclaimer. 283 /// * 284 /// * o Redistributions in binary form must reproduce the 285 /// * above copyright notice, this list of 286 /// * conditions and the following disclaimer in 287 /// * the documentation and/or other materials 288 /// * provided with the distribution. 289 /// * 290 /// * o Neither the name of Internet Society, IETF or IETF 291 /// * Trust, nor the names of specific contributors, may be 292 /// * used to endorse or promote products derived from this 293 /// * software without specific prior written permission. 294 /// * 295 /// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 296 /// * AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 297 /// * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 298 /// * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 299 /// * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 300 /// * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 301 /// * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 302 /// * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 303 /// * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 304 /// * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 305 /// * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 306 /// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 307 /// * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 308 /// * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 309 /// * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 310 /// */ 311 /// 312 /// /* 313 /// * This code was derived from [RFC2203]. Please 314 /// * reproduce this note if possible. 315 /// */ 316 /// 317 /// enum rpc_gss_service_t { 318 /// /* Note: the enumerated value for 0 is reserved. */ 319 /// rpc_gss_svc_none = 1, 320 /// rpc_gss_svc_integrity = 2, 321 /// rpc_gss_svc_privacy = 3, 322 /// rpc_gss_svc_channel_prot = 4 323 /// }; 324 /// 325 /// enum rpc_gss_proc_t { 326 /// RPCSEC_GSS_DATA = 0, 327 /// RPCSEC_GSS_INIT = 1, 328 /// RPCSEC_GSS_CONTINUE_INIT = 2, 329 /// RPCSEC_GSS_DESTROY = 3, 330 /// RPCSEC_GSS_BIND_CHANNEL = 4, /* not used */ 331 /// RPCSEC_GSS_CREATE = 5, /* new */ 332 /// RPCSEC_GSS_LIST = 6 /* new */ 333 /// }; 334 /// 335 /// struct rpc_gss_cred_vers_1_t { 336 /// rpc_gss_proc_t gss_proc; /* control procedure */ 337 /// unsigned int seq_num; /* sequence number */ 338 /// rpc_gss_service_t service; /* service used */ 339 /// opaque handle<>; /* context handle */ 340 /// }; 341 /// 342 /// const RPCSEC_GSS_VERS_1 = 1; 343 /// const RPCSEC_GSS_VERS_2 = 2; 344 /// const RPCSEC_GSS_VERS_3 = 3; /* new */ 345 /// 346 /// union rpc_gss_cred_t switch (unsigned int rgc_version) { 347 /// case RPCSEC_GSS_VERS_1: 348 /// case RPCSEC_GSS_VERS_2: 349 /// case RPCSEC_GSS_VERS_3: /* new */ 350 /// rpc_gss_cred_vers_1_t rgc_cred_v1; 351 /// }; 352 /// 354 356 As seen above, the RPCSEC_GSSv3 credential has the same format as the 357 RPCSEC_GSSv1 [RFC2203] and RPCSEC_GSSv2 [RFC5403] credential. 358 Setting the rgc_version field to 3 indicates that the initiator and 359 target support the new RPCSEC_GSSv3 control procedures. 361 2.5. RPCSEC_GSS_BIND_CHANNEL Operation 363 RPCSEC_GSSv3 provides a channel binding assertion that replaces the 364 RPCSEC_GSSv2 RPCSEC_GSS_BIND_CHANNEL operation. 366 RPCSEC_GSS_BIND_CHANNEL MUST NOT be used on RPCSEC_GSS version 3 367 handles. 369 2.6. New auth_stat Values 371 RPCSEC_GSSv3 requires the addition of several values to the auth_stat 372 enumerated type definition. The use of these new auth_stat values is 373 explained throughout this document. 375 enum auth_stat { 376 ... 377 /* 378 * RPCSEC_GSSv3 errors 379 */ 380 RPCSEC_GSS_INNER_CREDPROBLEM = 15, 381 RPCSEC_GSS_LABEL_PROBLEM = 16, 382 RPCSEC_GSS_PRIVILEGE_PROBLEM = 17, 383 RPCSEC_GSS_UNKNOWN_MESSAGE = 18 384 }; 386 2.7. New Control Procedures 388 There are two new RPCSEC_GSSv3 control procedures: RPCSEC_GSS_CREATE, 389 RPCSEC_GSS_LIST. 391 The RPCSEC_GSS_CREATE procedure binds any combination of assertions: 392 multi-principal authentication, labels, structured privileges, or 393 channel bindings to a new RPCSEC_GSSv3 context returned in the 394 rgss3_create_res rcr_handle field. 396 The RPCSEC_GSS_LIST procedure queries the target for supported 397 assertions. 399 RPCSEC_GSS version 3 control messages are similar to the RPCSEC_GSS 400 version 1 and version 2 RPCSEC_GSS_DESTROY control message (see 401 section 5.4 [RFC2203]) in that the sequence number in the request 402 must be valid, and the header checksum in the verifier must be valid. 403 As in RPCSEC_GSS version 1 and version 2, the RPCSEC_GSSv version 3 404 control messages may contain call data following the verifier in the 405 body of the NULLPROC procedure. In other words, they look a lot like 406 an RPCSEC_GSS data message with the header procedure set to NULLPROC. 408 The client MUST use one of the following security services to protect 409 the RPCSEC_GSS_CREATE or RPCSEC_GSS_LIST control message: 411 o rpc_gss_svc_integrity 413 o rpc_gss_svc_privacy 415 Specifically the client MUST NOT use rpc_gss_svc_none. 417 RPCSEC_GSS_LIST can also use rpc_gss_svc_channel_prot (see 418 RPCSEC_GSSv2 [RFC5403]) if the request is sent using an RPCSEC_GSSv3 419 child handle with channel bindings enabled as described in 420 Section 2.7.1.2. 422 2.7.1. New Control Procedure - RPCSEC_GSS_CREATE 424 426 /// struct rgss3_create_args { 427 /// rgss3_gss_mp_auth *rca_mp_auth; 428 /// rgss3_chan_binding *rca_chan_bind_mic; 429 /// rgss3_assertion_u rca_assertions<>; 430 /// }; 431 /// 432 /// struct rgss3_create_res { 433 /// opaque rcr_handle<>; 434 /// rgss3_gss_mp_auth *rcr_mp_auth; 435 /// rgss3_chan_binding *rcr_chan_bind_mic; 436 /// rgss3_assertion_u rcr_assertions<>; 437 /// }; 438 /// 439 /// enum rgss3_assertion_type { 440 /// LABEL = 0, 441 /// PRIVS = 1 442 /// }; 443 /// 444 /// union rgss3_assertion_u 445 /// switch (rgss3_assertion_type atype) { 446 /// case LABEL: 447 /// rgss3_label rau_label; 448 /// case PRIVS: 449 /// rgss3_privs rau_privs; 450 /// default: 451 /// opaque rau_ext<>; 452 /// }; 453 /// 455 457 The call data for an RPCSEC_GSS_CREATE request consists of an 458 rgss3_create_args which binds one or more items of several kinds to 459 the returned rcr_handle RPCSEC_GSSv3 context handle called the 460 "child" handle: 462 o Multi-principal authentication: another RPCSEC_GSS context handle 464 o A channel binding 466 o Authorization assertions: labels and or privileges 468 The reply to this message consists of either an error or an 469 rgss3_create_res structure. As noted in Section 2.7.1.3 and 470 Section 2.7.1.4 successful rgss3_assertions are enumerated in 471 rcr_assertions, and are REQUIRED be enumerated in the same order as 472 they appeared in the rca_assertions argument. 474 Upon successful RPCSEC_GSS_CREATE, both the client and the server 475 SHOULD associate the resultant child rcr_handle context handle with 476 the parent context handle in their GSS context caches so as to be 477 able to reference the parent context given the child context handle. 479 RPCSEC_GSSv3 child handles MUST be destroyed upon the destruction of 480 the associated parent handle. 482 Server implementation and policy MAY result in labels, privileges, 483 and identities being mapped to concepts and values that are local to 484 the server. Server policies should take into account the identity of 485 the client and/or user as authenticated via the GSS-API. 487 2.7.1.1. Multi-principal Authentication 489 491 /// 492 /// struct rgss3_gss_mp_auth { 493 /// opaque rgmp_handle<>; /* inner handle */ 494 /// opaque rgmp_rpcheader_mic<>; 495 /// }; 496 /// 498 500 RPCSEC_GSSv3 clients MAY assert a multi-principal authentication of 501 the RPC client host principal and a user principal. This feature is 502 needed, for example, when an RPC client host wishes to use authority 503 assertions that the server may only grant if a user and an RPC client 504 host are authenticated together to the server. Thus a server may 505 refuse to grant requested authority to a user acting alone (e.g., via 506 an unprivileged user-space program), or to an RPC client host acting 507 alone (e.g. when an RPC client host is acting on behalf of a user) 508 but may grant requested authority to an RPC client host acting on 509 behalf of a user if the server identifies the user and trusts the RPC 510 client host. 512 It is assumed that an unprivileged user-space program would not have 513 access to RPC client host credentials needed to establish a GSS-API 514 security context authenticating the RPC client host to the server, 515 therefore an unprivileged user-space program could not create an 516 RPCSEC_GSSv3 RPCSEC_GSS_CREATE message that successfully binds an RPC 517 client host and a user security context. 519 In addition to the parent handle (Section 2), the multi-principal 520 authentication call data has an RPCSEC_GSS version 3 handle 521 referenced via the rgmp_handle field termed the "inner" handle. 522 Clients using RPCSEC_GSSv3 multi-principal authentication MUST use an 523 RPCSEC_GSSv3 context handle that corresponds to a GSS-API security 524 context that authenticates the RPC client host for the parent handle. 525 The inner context handle it SHOULD use a context handle to 526 authenticate a user. The reverse (parent handle authenticates user, 527 inner authenticates an RPC client host) MUST NOT be used. Other 528 multi-principal parent and inner context handle uses might eventually 529 make sense, but would need to be introduced in a new revision of the 530 RPCSEC_GSS protocol. 532 The child context handle returned by a successful multi-principal 533 assertion binds the inner RPCSEC_GSSv3 context handle to the parent 534 RPCSEC_GSS context and MUST be treated by servers as authenticating 535 the GSS-API initiator principal authenticated by the inner context 536 handle's GSS-API security context. This principal may be mapped to a 537 server-side notion of user or principal. 539 Multi-principal binding is done by including an assertion of type 540 rgss3_gss_mp_auth in the RPCSEC_GSS_CREATE rgss3_create_args call 541 data. The inner context handle is placed in the rgmp_handle field. 542 A MIC of the RPC call header up to and including the credential is 543 computed using the GSS-API security context associated with the inner 544 context handle is placed in rgmp_rpcheader_mic field. 546 The target verifies the multi-principal authentication by first 547 confirming that the parent context used is an RPC client host 548 context, and then verifies the rgmp_rpcheader_mic using the GSS-API 549 security context associated with the rgmp_handle field. 551 On a successful verification, the rgss3_gss_mp_auth field in the 552 rgss3_create_res reply MUST be filled in with the inner RPCSEC_GSSv3 553 context handle as the rgmp_handle, and a MIC computed over the RPC 554 reply header (see section Section 2.3) using the GSS-API security 555 context associated with the inner handle. 557 On failure, the rgss3_gss_mp_auth field is not sent 558 (rgss3_gss_mp_auth is an optional field). A MSG_DENIED reply to the 559 RPCSEC_GSS_CREATE call is formulated as usual. 561 As described in Section 5.3.3.3 of [RFC2203] the server maintains a 562 list of contexts for the clients that are currently in session with 563 it. When a client request comes in, there may not be a context 564 corresponding to its handle. When this occurs on an 565 RPCSEC_GSS3_CREATE request processing of the parent handle, the 566 server rejects the request with a reply status of MSG_DENIED with the 567 reject_stat of AUTH_ERROR and with an auth_stat value of 568 RPCSEC_GSS_CREDPROBLEM. 570 A new value, RPCSEC_GSS_INNER_CREDPROBLEM, has been added to the 571 auth_stat type. With a multi-pricipal authorization request, the 572 server must also have a context corresponding to the inner context 573 handle. When the server does not have a context handle corresponding 574 to the inner context handle of a multi-pricipal authorization 575 request, the server sends a reply status of MSG_DENIED with the 576 reject_stat of AUTH_ERROR and with an auth_stat value of 577 RPCSEC_GSS_INNER_CREDPROBLEM. 579 When processing the multi-principal authentication request, if the 580 GSS_VerifyMIC() call on the rgmp_rpcheader_mic fails to return 581 GSS_S_COMPLETE, the server sends a reply status of MSG_DENIED with 582 the reject_stat of AUTH_ERROR and with an auth_stat value of 583 RPCSEC_GSS_INNER_CREDPROBLEM. 585 2.7.1.2. Channel Binding 587 589 /// 590 /// typedef opaque rgss3_chan_binding<>; 591 /// 593 595 RPCSEC_GSSv3 provides a different way to do channel binding than 596 RPCSEC_GSSv2 [RFC5403]. Specifically: 598 a. RPCSEC_GSSv3 builds on RPCSEC_GSSv1 by reusing existing, 599 established context handles rather than providing a different RPC 600 security flavor for establishing context handles, 602 b. channel bindings data are not hashed because there is now general 603 agreement that it is the secure channel's responsibility to 604 produce channel bindings data of manageable size. 606 (a) is useful in keeping RPCSEC_GSSv3 simple in general, not just for 607 channel binding. (b) is useful in keeping RPCSEC_GSSv3 simple 608 specifically for channel binding. 610 Channel binding is accomplished as follows. The client prefixes the 611 channel bindings data octet string with the channel type as described 612 in [RFC5056], then the client calls GSS_GetMIC() to get a MIC of 613 resulting octet string, using the parent RPCSEC_GSSv3 context 614 handle's GSS-API security context. The MIC is then placed in the 615 rca_chan_bind_mic field of RPCSEC_GSS_CREATE arguments 616 (rgss3_create_args). 618 If the rca_chan_bind_mic field of the arguments of a 619 RPCSEC_GSS_CREATE control message is set, then the server MUST verify 620 the client's channel binding MIC if the server supports this feature. 621 If channel binding verification succeeds then the server MUST 622 generate a new MIC of the same channel bindings and place it in the 623 rcr_chan_bind_mic field of the RPCSEC_GSS_CREATE rgss3_create_res 624 results. If channel binding verification fails or the server doesn't 625 support channel binding then the server MUST indicate this in its 626 reply by not including a rgss3_chan_binding value in rgss3_create_res 627 (rgss3_chan_binding is an optional field). 629 The client MUST verify the result's rcr_chan_bind_mic value by 630 calling GSS_VerifyMIC() with the given MIC and the channel bindings 631 data (including the channel type prefix). If client-side channel 632 binding verification fails then the client MUST call 633 RPCSEC_GSS_DESTROY. If the client requested channel binding but the 634 server did not include an rcr_chan_binding_mic field in the results, 635 then the client MAY continue to use the resulting context handle as 636 though channel binding had never been requested. If the client 637 considers channel binding critical, it MUST call RPCSEC_GSS_DESTROY. 639 As per-RPCSEC_GSSv2 [RFC5403]: 641 "Once a successful [channel binding] procedure has been performed 642 on an [RPCSEC_GSSv3] context handle, the initiator's 643 implementation may map application requests for rpc_gss_svc_none 644 and rpc_gss_svc_integrity to rpc_gss_svc_channel_prot credentials. 645 And if the secure channel has privacy enabled, requests for 646 rpc_gss_svc_privacy can also be mapped to 647 rpc_gss_svc_channel_prot." 649 Any RPCSEC_GSSv3 child context handle that has been bound to a secure 650 channel in this way SHOULD be used only with the 651 rpc_gss_svc_channel_prot, and SHOULD NOT be used with 652 rpc_gss_svc_none nor rpc_gss_svc_integrity -- if the secure channel 653 does not provide privacy protection then the client MAY use 654 rpc_gss_svc_privacy where privacy protection is needed or desired. 656 2.7.1.3. Label Assertions 658 659 /// struct rgss3_label { 660 /// rgss3_lfs rl_lfs; 661 /// opaque rl_label<>; 662 /// }; 663 /// 664 /// struct rgss3_lfs { 665 /// unsigned int rlf_lfs_id; 666 /// unsigned int rlf_pi_id; 667 /// }; 668 /// 670 672 Mandatory Access Control (MAC) label systems consist of two basic 673 inputs to the MAC policy engine: subject labels and object labels. 674 File object labels are communicated via the NFSv4.2 sec_label 675 described in Section 12.2.2 of [NFSv4.2]. RPCSEC_GSSv3 label 676 assertions assert a set of client process subject labels on the 677 server process handling a request. 679 The client discovers which subject labels the server supports via the 680 RPCSEC_GSS_LIST control message. Asserting server supported subject 681 labels via RPCSEC_GSS_CREATE enables full mode labeling when it is 682 combined with file object labels communicated via the the NFSv4.2 683 sec_label attribute. 685 Label encoding is specified to mirror the NFSv4.2 sec_label attribute 686 described in Section 12.2.2 of [NFSv4.2]. The label format specifier 687 (LFS) is an identifier used to describe the syntactic format of the 688 security label and the semantic meaning of its components. The 689 policy identifier (PI) is an optional part of the definition of an 690 LFS which allows for clients and server to identify specific security 691 policies. The opaque label field of rgss3_label is dependent on the 692 MAC model to interpret and enforce. 694 If a subject label itself requires privacy protection (i.e., that the 695 user can assert that label is a secret) then the client MUST use the 696 rpc_gss_svc_privacy protection service for the RPCSEC_GSS_CREATE 697 request. 699 RPCSEC_GSSv3 clients MAY assert a server security subject label in 700 some LSF by binding a label assertion to the RPCSEC_GSSv3 context 701 handle. This is done by including an assertion of type rgss3_label 702 in the RPCSEC_GSS_CREATE rgss3_create_args rca_assertions call data. 704 Servers that support labeling in the requested LFS MAY map the 705 requested subject label to different subject label as a result of 706 server-side policy evaluation. 708 The subject labels that are accepted by the target and bound to the 709 RPCSEC_GSSv3 context MUST be enumerated in the rcr_assertions field 710 of the rgss3_create_res RPCSEC_GSS_CREATE reply. 712 Servers that do not support labeling or that do not support the 713 requested LFS reject the label assertion with a reply status of 714 MSG_DENIED, a reject_status of AUTH_ERROR, and an auth_stat of 715 RPCSEC_GSS_LABEL_PROBLEM. 717 2.7.1.4. Structured Privilege Assertions 719 721 /// 722 /// struct rgss3_privs { 723 /// string rp_name<>; /* human readable */ 724 /// opaque rp_privilege<>; 725 /// }; 727 729 A structured privilege is an RPC application defined privilege. 730 RPCSEC_GSSv3 clients MAY assert a structured privilege by binding the 731 privilege to the RPCSEC_GSSv3 context handle. This is done by 732 including an assertion of type rgss3_privs in the RPCSEC_GSS_CREATE 733 rgss3_create_args rca_assertions call data. Encoding, server 734 verification and any policies for structured privileges are described 735 by the RPC application definition. 737 A successful structured privilege assertion MUST be enumerated in the 738 rcr_assertions field of the rgss3_create_res RPCSEC_GSS_CREATE reply. 740 If a server receives a structured privilege assertion that it does 741 not recognize the assertion is rejected with a reply status of 742 MSG_DENIED, a reject_status of AUTH_ERROR, and an auth_stat of 743 RPCSEC_GSS_UNKNOWN_MESSAGE. 745 If a server receives a structured privilege assertion that it fails 746 to verify according to the requirements of the RPC application 747 defined behavior, the assertion is rejected with a reply status of 748 MSG_DENIED, a reject_status of AUTH_ERROR, and an auth_stat of 749 RPCSEC_GSS_PRIVILEGE_PROBLEM. 751 Section 3.4.1.2. "Inter-Server Copy with RPCSEC_GSSv3" of [NFSv4.2] 752 shows an example of structured privilege definition and use. 754 2.7.2. New Control Procedure - RPCSEC_GSS_LIST 756 758 /// enum rgss3_list_item { 759 /// LABEL = 0, 760 /// PRIVS = 1 761 /// }; 762 /// 763 /// struct rgss3_list_args { 764 /// rgss3_list_item rla_list_what<>; 765 /// }; 766 /// 767 /// union rgss3_list_item_u 768 /// switch (rgss3_list_item itype) { 769 /// case LABEL: 770 /// rgss3_label rli_labels<>; 771 /// case PRIVS: 772 /// rgss3_privs rli_privs<>; 773 /// }; 774 /// 775 /// typedef rgss3_list_item_u rgss3_list_res<>; 776 /// 778 780 The call data for an RPCSEC_GSS_LIST request consists of a list of 781 integers (rla_list_what) indicating what assertions to be listed, and 782 the reply consists of an error or the requested list. 784 The result of requesting a list of rgss3_list_item LABEL is a list of 785 LFSs supported by the server. The client can then use the LFS list 786 to assert labels via the RPCSEC_GSS_CREATE label assertions. See 787 Section 2.7.1.3. 789 2.8. Extensibility 791 Assertion types may be added in the future by adding arms to the 792 'rgss3_assertion_u' union. Other assertion types are described 793 elsewhere and include: 795 o Client-side assertions of identity: 797 * Primary client/user identity 799 * Supplementary group memberships of the client/user, including 800 support for specifying deltas to the membership list as seen on 801 the server. 803 3. Operational Recommendation for Deployment 805 RPCSEC_GSSv3 is a superset of RPCSEC_GSSv2 [RFC5403] which in turn is 806 a superset of RPCSEC_GSSv1 [RFC2203], and so can be used in all 807 situations where RPCSEC_GSSv1 or RPCSEC_GSSv2 is used. RPCSEC_GSSv3 808 should be used when the new functionality is needed. 810 4. Security Considerations 812 This entire document deals with security issues. 814 The RPCSEC_GSSv3 protocol allows for client-side assertions of data 815 that is relevant to server-side authorization decisions. These 816 assertions must be evaluated by the server in the context of whether 817 the client and/or user are authenticated, whether multi-principal 818 authentication was used, whether the client is trusted, what ranges 819 of assertions are allowed for the client and the user (separately or 820 together), and any relevant server-side policy. 822 The security semantics of assertions carried by RPCSEC_GSSv3 are 823 application protocol-specific. 825 Note that RPSEC_GSSv3 is not a complete solution for labeling: it 826 conveys the labels of actors, but not the labels of objects. RPC 827 application protocols may require extending in order to carry object 828 label information. 830 There may be interactions with NFSv4's callback security scheme and 831 NFSv4.1's [RFC5661] GSS-API "SSV" mechanisms. Specifically, the 832 NFSv4 callback scheme requires that the server initiate GSS-API 833 security contexts, which does not work well in practice, and in the 834 context of client- side processes running as the same user but with 835 different privileges and security labels the NFSv4 callback security 836 scheme seems particularly unlikely to work well. NFSv4.1 has the 837 server use an existing, client-initiated RPCSEC_GSS context handle to 838 protect server-initiated callback RPCs. The NFSv4.1 callback 839 security scheme lacks all the problems of the NFSv4 scheme, however, 840 it is important that the server pick an appropriate RPCSEC_GSS 841 context handle to protect any callbacks. Specifically, it is 842 important that the server use RPCSEC_GSS context handles which 843 authenticate the client to protect any callbacks relating to server 844 state initiated by RPCs protected by RPCSEC_GSSv3 contexts. 846 As described in Section 2.10.10 [RFC5661] the client is permitted to 847 associate multiple RPCSEC_GSS handles with a single SSV GSS context. 848 RPCSEC_GSSv3 handles will work well with SSV in that the man-in-the- 849 middle attacks described in Section 2.10.10 [RFC5661] are solved by 850 the new reply verifier (Section 2.3). Using an RPCSEC_GSSv3 handle 851 backed by a GSS-SSV mechanism context as a parent handle in an 852 RPCSEC_GSS_CREATE call while permitted is complicated by the lifetime 853 rules of SSV contexts and their associated RPCSEC_GSS handles. 855 5. IANA Considerations 857 There are no IANA considerations in this document. 859 6. References 861 6.1. Normative References 863 [NFSv4.2] Haynes, T., "NFS Version 4 Minor Version 2", draft-ietf- 864 nfsv4-minorversion2-29 (Work In Progress), December 2014. 866 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 867 Requirement Levels", RFC 2119, March 1997. 869 [RFC2203] Eisler, M., Chiu, A., and L. Ling, "RPCSEC_GSS Protocol 870 Specification", RFC 2203, September 1997. 872 [RFC2743] Linn, J., "Generic Security Service Application Program 873 Interface Version 2, Update 1", RFC 2743, January 2000. 875 [RFC4506] Eisler, M., "XDR: External Data Representation Standard", 876 RFC 4506, May 2006. 878 [RFC5056] Williams, N., "On the Use of Channel Bindings to Secure 879 Channels", RFC 5056, November 2007. 881 [RFC5403] Eisler, M., "RPCSEC_GSS Version 2", RFC 5403, February 882 2009. 884 [RFC5661] Shepler, S., Eisler, M., and D. Noveck, "Network File 885 System (NFS) Version 4 Minor Version 1 Protocol", RFC 886 5661, January 2010. 888 [RFC7204] Haynes, T., "Requirements for Labeled NFS", RFC 7204, 889 April 2014. 891 6.2. Informative References 893 [AFS-RXGK] 894 Wilkinson, S. and B. Kaduk, "Integrating rxgk with AFS", 895 draft-wilkinson-afs3-rxgk-afs (work in progress), April 896 2014. 898 [BL73] Bell, D. and L. LaPadula, "Secure Computer Systems: 899 Mathematical Foundations and Model", Technical Report 900 M74-244, The MITRE Corporation Bedford, MA, May 1973. 902 [RFC2401] Kent, S. and R. Atkinson, "Security Architecture for the 903 Internet Protocol", RFC 2401, November 1998. 905 Appendix A. Acknowledgments 907 Andy Adamson would like to thank NetApp, Inc. for its funding of his 908 time on this project. 910 We thank Lars Eggert, Mike Eisler, Ben Kaduk, Bruce Fields, Tom 911 Haynes, and Dave Noveck for their most helpful reviews. 913 Appendix B. RFC Editor Notes 915 [RFC Editor: please remove this section prior to publishing this 916 document as an RFC] 918 [RFC Editor: prior to publishing this document as an RFC, please 919 replace all occurrences of RFCTBD10 with RFCxxxx where xxxx is the 920 RFC number of this document] 922 Authors' Addresses 924 William A. (Andy) Adamson 925 NetApp 926 3629 Wagner Ridge Ct 927 Ann Arbor, MI 48103 928 USA 930 Phone: +1 734 665 1204 931 Email: andros@netapp.com 933 Nico Williams 934 cryptonector.com 935 13115 Tamayo Dr 936 Austin, TX 78729 937 USA 939 Email: nico@cryptonector.com