idnits 2.17.1 draft-ietf-nfsv4-rpcsec-gssv3-12.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 438 has weird spacing: '...3_label rau_l...' == Line 440 has weird spacing: '...3_privs rau_p...' -- The document date (July 06, 2015) is 3207 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: January 7, 2016 Cryptonector 6 July 06, 2015 8 Remote Procedure Call (RPC) Security Version 3 9 draft-ietf-nfsv4-rpcsec-gssv3-12 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 January 7, 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 . . . . . . . . . . . . . . . . . 8 71 2.7.1. New Control Procedure - RPCSEC_GSS_CREATE . . . . . . 9 72 2.7.2. New Control Procedure - RPCSEC_GSS_LIST . . . . . . . 16 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 verifier using the exact same input as is used to compute the request 244 verifier, except for the mtype is changed from CALL to REPLY. The 245 new reply verifier computes a MIC over the following RPC reply header 246 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 2.4. XDR Code Preliminaries 258 260 /// /* 261 /// * Copyright (c) 2013 IETF Trust and the persons 262 /// * identified as the document authors. All rights 263 /// * reserved. 264 /// * 265 /// * The document authors are identified in [RFC2203], 266 /// * [RFC5403], and [RFCxxxx]. 267 /// * 268 /// * Redistribution and use in source and binary forms, 269 /// * with or without modification, are permitted 270 /// * provided that the following conditions are met: 271 /// * 272 /// * o Redistributions of source code must retain the above 273 /// * copyright notice, this list of conditions and the 274 /// * following disclaimer. 275 /// * 276 /// * o Redistributions in binary form must reproduce the 277 /// * above copyright notice, this list of 278 /// * conditions and the following disclaimer in 279 /// * the documentation and/or other materials 280 /// * provided with the distribution. 281 /// * 282 /// * o Neither the name of Internet Society, IETF or IETF 283 /// * Trust, nor the names of specific contributors, may be 284 /// * used to endorse or promote products derived from this 285 /// * software without specific prior written permission. 286 /// * 287 /// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 288 /// * AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 289 /// * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 290 /// * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 291 /// * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 292 /// * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 293 /// * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 294 /// * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 295 /// * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 296 /// * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 297 /// * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 298 /// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 299 /// * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 300 /// * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 301 /// * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 302 /// */ 303 /// 304 /// /* 305 /// * This code was derived from [RFC2203]. Please 306 /// * reproduce this note if possible. 307 /// */ 308 /// 309 /// enum rpc_gss_service_t { 310 /// /* Note: the enumerated value for 0 is reserved. */ 311 /// rpc_gss_svc_none = 1, 312 /// rpc_gss_svc_integrity = 2, 313 /// rpc_gss_svc_privacy = 3, 314 /// rpc_gss_svc_channel_prot = 4 315 /// }; 316 /// 317 /// enum rpc_gss_proc_t { 318 /// RPCSEC_GSS_DATA = 0, 319 /// RPCSEC_GSS_INIT = 1, 320 /// RPCSEC_GSS_CONTINUE_INIT = 2, 321 /// RPCSEC_GSS_DESTROY = 3, 322 /// RPCSEC_GSS_BIND_CHANNEL = 4, /* not used */ 323 /// RPCSEC_GSS_CREATE = 5, /* new */ 324 /// RPCSEC_GSS_LIST = 6 /* new */ 325 /// }; 326 /// 327 /// struct rpc_gss_cred_vers_1_t { 328 /// rpc_gss_proc_t gss_proc; /* control procedure */ 329 /// unsigned int seq_num; /* sequence number */ 330 /// rpc_gss_service_t service; /* service used */ 331 /// opaque handle<>; /* context handle */ 332 /// }; 333 /// 334 /// const RPCSEC_GSS_VERS_1 = 1; 335 /// const RPCSEC_GSS_VERS_2 = 2; 336 /// const RPCSEC_GSS_VERS_3 = 3; /* new */ 337 /// 338 /// union rpc_gss_cred_t switch (unsigned int rgc_version) { 339 /// case RPCSEC_GSS_VERS_1: 340 /// case RPCSEC_GSS_VERS_2: 341 /// case RPCSEC_GSS_VERS_3: /* new */ 342 /// rpc_gss_cred_vers_1_t rgc_cred_v1; 343 /// }; 344 /// 346 348 As seen above, the RPCSEC_GSSv3 credential has the same format as the 349 RPCSEC_GSSv1 [RFC2203] and RPCSEC_GSSv2 [RFC5403] credential. 350 Setting the rgc_version field to 3 indicates that the initiator and 351 target support the new RPCSEC_GSSv3 control procedures. 353 2.5. RPCSEC_GSS_BIND_CHANNEL Operation 355 RPCSEC_GSSv3 provides a channel binding assertion that replaces the 356 RPCSEC_GSSv2 RPCSEC_GSS_BIND_CHANNEL operation. 358 RPCSEC_GSS_BIND_CHANNEL MUST NOT be used on RPCSEC_GSS version 3 359 handles. 361 2.6. New auth_stat Values 363 RPCSEC_GSSv3 requires the addition of several values to the auth_stat 364 enumerated type definition. The use of these new auth_stat values is 365 explained throughout this document. 367 enum auth_stat { 368 ... 369 /* 370 * RPCSEC_GSSv3 errors 371 */ 372 RPCSEC_GSS_INNER_CREDPROBLEM = 15, 373 RPCSEC_GSS_LABEL_PROBLEM = 16, 374 RPCSEC_GSS_PRIVILEGE_PROBLEM = 17, 375 RPCSEC_GSS_UNKNOWN_MESSAGE = 18 376 }; 378 2.7. New Control Procedures 380 There are two new RPCSEC_GSSv3 control procedures: RPCSEC_GSS_CREATE, 381 RPCSEC_GSS_LIST. 383 The RPCSEC_GSS_CREATE procedure binds any combination of assertions: 384 multi-principal authentication, labels, structured privileges, or 385 channel bindings to a new RPCSEC_GSSv3 context returned in the 386 rgss3_create_res rcr_handle field. 388 The RPCSEC_GSS_LIST procedure queries the target for supported 389 assertions. 391 RPCSEC_GSS version 3 control messages are similar to the RPCSEC_GSS 392 version 1 and version 2 RPCSEC_GSS_DESTROY control message (see 393 section 5.4 [RFC2203]) in that the sequence number in the request 394 must be valid, and the header checksum in the verifier must be valid. 395 As in RPCSEC_GSS version 1 and version 2, the RPCSEC_GSSv version 3 396 control messages may contain call data following the verifier in the 397 body of the NULLPROC procedure. In other words, they look a lot like 398 an RPCSEC_GSS data message with the header procedure set to NULLPROC. 400 The client MUST use one of the following security services to protect 401 the RPCSEC_GSS_CREATE or RPCSEC_GSS_LIST control message: 403 o rpc_gss_svc_integrity 405 o rpc_gss_svc_privacy 407 Specifically the client MUST NOT use rpc_gss_svc_none. 409 RPCSEC_GSS_LIST can also use rpc_gss_svc_channel_prot (see 410 RPCSEC_GSSv2 [RFC5403]) if the request is sent using an RPCSEC_GSSv3 411 child handle with channel bindings enabled as described in 412 Section 2.7.1.2. 414 2.7.1. New Control Procedure - RPCSEC_GSS_CREATE 416 417 /// struct rgss3_create_args { 418 /// rgss3_gss_mp_auth *rca_mp_auth; 419 /// rgss3_chan_binding *rca_chan_bind_mic; 420 /// rgss3_assertion_u rca_assertions<>; 421 /// }; 422 /// 423 /// struct rgss3_create_res { 424 /// opaque rcr_handle<>; 425 /// rgss3_gss_mp_auth *rcr_mp_auth; 426 /// rgss3_chan_binding *rcr_chan_bind_mic; 427 /// rgss3_assertion_u rcr_assertions<>; 428 /// }; 429 /// 430 /// enum rgss3_assertion_type { 431 /// LABEL = 0, 432 /// PRIVS = 1 433 /// }; 434 /// 435 /// union rgss3_assertion_u 436 /// switch (rgss3_assertion_type atype) { 437 /// case LABEL: 438 /// rgss3_label rau_label; 439 /// case PRIVS: 440 /// rgss3_privs rau_privs; 441 /// default: 442 /// opaque rau_ext<>; 443 /// }; 444 /// 446 448 The call data for an RPCSEC_GSS_CREATE request consists of an 449 rgss3_create_args which binds one or more items of several kinds to 450 the returned rcr_handle RPCSEC_GSSv3 context handle called the 451 "child" handle: 453 o Multi-principal authentication: another RPCSEC_GSS context handle 455 o A channel binding 457 o Authorization assertions: labels and or privileges 459 The reply to this message consists of either an error or an 460 rgss3_create_res structure. As noted in Section 2.7.1.3 and 461 Section 2.7.1.4 successful rgss3_assertions are enumerated in 462 rcr_assertions, and are REQUIRED be enumerated in the same order as 463 they appeared in the rca_assertions argument. 465 Upon successful RPCSEC_GSS_CREATE, both the client and the server 466 SHOULD associate the resultant child rcr_handle context handle with 467 the parent context handle in their GSS context caches so as to be 468 able to reference the parent context given the child context handle. 470 RPCSEC_GSSv3 child handles MUST be destroyed upon the destruction of 471 the associated parent handle. 473 Server implementation and policy MAY result in labels, privileges, 474 and identities being mapped to concepts and values that are local to 475 the server. Server policies should take into account the identity of 476 the client and/or user as authenticated via the GSS-API. 478 2.7.1.1. Multi-principal Authentication 480 482 /// 483 /// struct rgss3_gss_mp_auth { 484 /// opaque rgmp_handle<>; /* inner handle */ 485 /// opaque rgmp_rpcheader_mic<>; 486 /// }; 487 /// 489 491 RPCSEC_GSSv3 clients MAY assert a multi-principal authentication of 492 the RPC client host principal and a user principal. This feature is 493 needed, for example, when an RPC client host wishes to use authority 494 assertions that the server may only grant if a user and an RPC client 495 host are authenticated together to the server. Thus a server may 496 refuse to grant requested authority to a user acting alone (e.g., via 497 an unprivileged user-space program), or to an RPC client host acting 498 alone (e.g. when an RPC client host is acting on behalf of a user) 499 but may grant requested authority to an RPC client host acting on 500 behalf of a user if the server identifies the user and trusts the RPC 501 client host. 503 It is assumed that an unprivileged user-space program would not have 504 access to RPC client host credentials needed to establish a GSS-API 505 security context authenticating the RPC client host to the server, 506 therefore an unprivileged user-space program could not create an 507 RPCSEC_GSSv3 RPCSEC_GSS_CREATE message that successfully binds an RPC 508 client host and a user security context. 510 In addition to the parent handle (Section 2), the multi-principal 511 authentication call data has an RPCSEC_GSS version 3 handle 512 referenced via the rgmp_handle field termed the "inner" handle. 514 Clients using RPCSEC_GSSv3 multi-principal authentication MUST use an 515 RPCSEC_GSSv3 context handle that corresponds to a GSS-API security 516 context that authenticates the RPC client host for the parent handle. 517 The inner context handle it SHOULD use a context handle to 518 authenticate a user. The reverse (parent handle authenticates user, 519 inner authenticates an RPC client host) MUST NOT be used. Other 520 multi-principal parent and inner context handle uses might eventually 521 make sense, but would need to be introduced in a new revision of the 522 RPCSEC_GSS protocol. 524 The child context handle returned by a successful multi-principal 525 assertion binds the inner RPCSEC_GSSv3 context handle to the parent 526 RPCSEC_GSS context and MUST be treated by servers as authenticating 527 the GSS-API initiator principal authenticated by the inner context 528 handle's GSS-API security context. This principal may be mapped to a 529 server-side notion of user or principal. 531 Multi-principal binding is done by including an assertion of type 532 rgss3_gss_mp_auth in the RPCSEC_GSS_CREATE rgss3_create_args call 533 data. The inner context handle is placed in the rgmp_handle field. 534 A MIC of the RPC call header up to and including the credential is 535 computed using the GSS-API security context associated with the inner 536 context handle is placed in rgmp_rpcheader_mic field. 538 The target verifies the multi-principal authentication by first 539 confirming that the parent context used is an RPC client host 540 context, and then verifies the rgmp_rpcheader_mic using the GSS-API 541 security context associated with the rgmp_handle field. 543 On a successful verification, the rgss3_gss_mp_auth field in the 544 rgss3_create_res reply MUST be filled in with the inner RPCSEC_GSSv3 545 context handle as the rgmp_handle, and a MIC computed over the RPC 546 reply header (see section Section 2.3) using the GSS-API security 547 context associated with the inner handle. 549 On failure, the rgss3_gss_mp_auth field is not sent 550 (rgss3_gss_mp_auth is an optional field). A MSG_DENIED reply to the 551 RPCSEC_GSS_CREATE call is formulated as usual. 553 As described in Section 5.3.3.3 of [RFC2203] the server maintains a 554 list of contexts for the clients that are currently in session with 555 it. When a client request comes in, there may not be a context 556 corresponding to its handle. When this occurs on an 557 RPCSEC_GSS3_CREATE request processing of the parent handle, the 558 server rejects the request with a reply status of MSG_DENIED with the 559 reject_stat of AUTH_ERROR and with an auth_stat value of 560 RPCSEC_GSS_CREDPROBLEM. 562 A new value, RPCSEC_GSS_INNER_CREDPROBLEM, has been added to the 563 auth_stat type. With a multi-pricipal authorization request, the 564 server must also have a context corresponding to the inner context 565 handle. When the server does not have a context handle corresponding 566 to the inner context handle of a multi-pricipal authorization 567 request, the server sends a reply status of MSG_DENIED with the 568 reject_stat of AUTH_ERROR and with an auth_stat value of 569 RPCSEC_GSS_INNER_CREDPROBLEM. 571 When processing the multi-principal authentication request, if the 572 GSS_VerifyMIC() call on the rgmp_rpcheader_mic fails to return 573 GSS_S_COMPLETE, the server sends a reply status of MSG_DENIED with 574 the reject_stat of AUTH_ERROR and with an auth_stat value of 575 RPCSEC_GSS_INNER_CREDPROBLEM. 577 2.7.1.2. Channel Binding 579 581 /// 582 /// typedef opaque rgss3_chan_binding<>; 583 /// 585 587 RPCSEC_GSSv3 provides a different way to do channel binding than 588 RPCSEC_GSSv2 [RFC5403]. Specifically: 590 a. RPCSEC_GSSv3 builds on RPCSEC_GSSv1 by reusing existing, 591 established context handles rather than providing a different RPC 592 security flavor for establishing context handles, 594 b. channel bindings data are not hashed because there is now general 595 agreement that it is the secure channel's responsibility to 596 produce channel bindings data of manageable size. 598 (a) is useful in keeping RPCSEC_GSSv3 simple in general, not just for 599 channel binding. (b) is useful in keeping RPCSEC_GSSv3 simple 600 specifically for channel binding. 602 Channel binding is accomplished as follows. The client prefixes the 603 channel bindings data octet string with the channel type as described 604 in [RFC5056], then the client calls GSS_GetMIC() to get a MIC of 605 resulting octet string, using the parent RPCSEC_GSSv3 context 606 handle's GSS-API security context. The MIC is then placed in the 607 rca_chan_bind_mic field of RPCSEC_GSS_CREATE arguments 608 (rgss3_create_args). 610 If the rca_chan_bind_mic field of the arguments of a 611 RPCSEC_GSS_CREATE control message is set, then the server MUST verify 612 the client's channel binding MIC if the server supports this feature. 613 If channel binding verification succeeds then the server MUST 614 generate a new MIC of the same channel bindings and place it in the 615 rcr_chan_bind_mic field of the RPCSEC_GSS_CREATE rgss3_create_res 616 results. If channel binding verification fails or the server doesn't 617 support channel binding then the server MUST indicate this in its 618 reply by not including a rgss3_chan_binding value in rgss3_create_res 619 (rgss3_chan_binding is an optional field). 621 The client MUST verify the result's rcr_chan_bind_mic value by 622 calling GSS_VerifyMIC() with the given MIC and the channel bindings 623 data (including the channel type prefix). If client-side channel 624 binding verification fails then the client MUST call 625 RPCSEC_GSS_DESTROY. If the client requested channel binding but the 626 server did not include an rcr_chan_binding_mic field in the results, 627 then the client MAY continue to use the resulting context handle as 628 though channel binding had never been requested. If the client 629 considers channel binding critical, it MUST call RPCSEC_GSS_DESTROY. 631 As per-RPCSEC_GSSv2 [RFC5403]: 633 "Once a successful [channel binding] procedure has been performed 634 on an [RPCSEC_GSSv3] context handle, the initiator's 635 implementation may map application requests for rpc_gss_svc_none 636 and rpc_gss_svc_integrity to rpc_gss_svc_channel_prot credentials. 637 And if the secure channel has privacy enabled, requests for 638 rpc_gss_svc_privacy can also be mapped to 639 rpc_gss_svc_channel_prot." 641 Any RPCSEC_GSSv3 child context handle that has been bound to a secure 642 channel in this way SHOULD be used only with the 643 rpc_gss_svc_channel_prot, and SHOULD NOT be used with 644 rpc_gss_svc_none nor rpc_gss_svc_integrity -- if the secure channel 645 does not provide privacy protection then the client MAY use 646 rpc_gss_svc_privacy where privacy protection is needed or desired. 648 2.7.1.3. Label Assertions 650 651 /// struct rgss3_label { 652 /// rgss3_lfs rl_lfs; 653 /// opaque rl_label<>; 654 /// }; 655 /// 656 /// struct rgss3_lfs { 657 /// unsigned int rlf_lfs_id; 658 /// unsigned int rlf_pi_id; 659 /// }; 660 /// 662 664 The client discovers which labels the server supports via the 665 RPCSEC_GSS_LIST control message. Asserting a server supported label 666 via RPCSEC_GSS_CREATE enables server guest mode labels. Full mode is 667 enabled when an RPCSEC_GSS_CREATE label assertion is combined with 668 asserting the same label with the NFSv4.2 sec_label attribute. 670 Label encoding is specified to mirror the NFSv4.2 sec_label attribute 671 described in Section 12.2.2 of [NFSv4.2]. The label format specifier 672 (LFS) is an identifier used by the client to establish the syntactic 673 format of the security label and the semantic meaning of its 674 components. The policy identifier (PI) is an optional part of the 675 definition of an LFS which allows for clients and server to identify 676 specific security policies. The opaque label field of rgss3_label is 677 dependent on the MAC model to interpret and enforce. 679 If a label itself requires privacy protection (i.e., that the user 680 can assert that label is a secret) then the client MUST use the 681 rpc_gss_svc_privacy protection service for the RPCSEC_GSS_CREATE 682 request. 684 RPCSEC_GSSv3 clients MAY assert a server security label in some LSF 685 by binding a label assertion to the RPCSEC_GSSv3 context handle. 686 This is done by including an assertion of type rgss3_label in the 687 RPCSEC_GSS_CREATE rgss3_create_args rca_assertions call data. 689 Servers that support labeling in the requested LFS MAY map the 690 requested label to different label as a result of server-side policy 691 evaluation. 693 The labels that are accepted by the target and bound to the 694 RPCSEC_GSSv3 context MUST be enumerated in the rcr_assertions field 695 of the rgss3_create_res RPCSEC_GSS_CREATE reply. 697 Servers that do not support labeling or that do not support the 698 requested LFS reject the label assertion with a reply status of 699 MSG_DENIED, a reject_status of AUTH_ERROR, and an auth_stat of 700 RPCSEC_GSS_LABEL_PROBLEM. 702 2.7.1.4. Structured Privilege Assertions 704 706 /// 707 /// struct rgss3_privs { 708 /// string rp_name<>; /* human readable */ 709 /// opaque rp_privilege<>; 710 /// }; 712 714 A structured privilege is an RPC application defined privilege. 715 RPCSEC_GSSv3 clients MAY assert a structured privilege by binding the 716 privilege to the RPCSEC_GSSv3 context handle. This is done by 717 including an assertion of type rgss3_privs in the RPCSEC_GSS_CREATE 718 rgss3_create_args rca_assertions call data. Encoding, server 719 verification and any policies for structured privileges are described 720 by the RPC application definition. 722 A successful structured privilege assertion MUST be enumerated in the 723 rcr_assertions field of the rgss3_create_res RPCSEC_GSS_CREATE reply. 725 If a server receives a structured privilege assertion that it does 726 not recognize the assertion is rejected with a reply status of 727 MSG_DENIED, a reject_status of AUTH_ERROR, and an auth_stat of 728 RPCSEC_GSS_UNKNOWN_MESSAGE. 730 If a server receives a structured privilege assertion that it fails 731 to verify according to the requirements of the RPC application 732 defined behavior, the assertion is rejected with a reply status of 733 MSG_DENIED, a reject_status of AUTH_ERROR, and an auth_stat of 734 RPCSEC_GSS_PRIVILEGE_PROBLEM. 736 Section 3.4.1.2. "Inter-Server Copy with RPCSEC_GSSv3" of [NFSv4.2] 737 shows an example of structured privilege definition and use. 739 2.7.2. New Control Procedure - RPCSEC_GSS_LIST 741 742 /// enum rgss3_list_item { 743 /// LABEL = 0, 744 /// PRIVS = 1 745 /// }; 746 /// 747 /// struct rgss3_list_args { 748 /// rgss3_list_item rla_list_what<>; 749 /// }; 750 /// 751 /// union rgss3_list_item_u 752 /// switch (rgss3_list_item itype) { 753 /// case LABEL: 754 /// rgss3_label rli_labels<>; 755 /// case PRIVS: 756 /// rgss3_privs rli_privs<>; 757 /// }; 758 /// 759 /// typedef rgss3_list_item_u rgss3_list_res<>; 760 /// 762 764 The call data for an RPCSEC_GSS_LIST request consists of a list of 765 integers (rla_list_what) indicating what assertions to be listed, and 766 the reply consists of an error or the requested list. 768 The result of requesting a list of rgss3_list_item LABEL is a list of 769 LFSs supported by the server. The client can then use the LFS list 770 to assert labels via the RPCSEC_GSS_CREATE label assertions. See 771 Section 2.7.1.3. 773 2.8. Extensibility 775 Assertion types may be added in the future by adding arms to the 776 'rgss3_assertion_u' union. Other assertion types are described 777 elsewhere and include: 779 o Client-side assertions of identity: 781 * Primary client/user identity 783 * Supplementary group memberships of the client/user, including 784 support for specifying deltas to the membership list as seen on 785 the server. 787 3. Operational Recommendation for Deployment 789 RPCSEC_GSSv3 is a superset of RPCSEC_GSSv2 [RFC5403] which in turn is 790 a superset of RPCSEC_GSSv1 [RFC2203], and so can be used in all 791 situations where RPCSEC_GSSv1 or RPCSEC_GSSv2 is used. RPCSEC_GSSv3 792 should be used when the new functionality is needed. 794 4. Security Considerations 796 This entire document deals with security issues. 798 The RPCSEC_GSSv3 protocol allows for client-side assertions of data 799 that is relevant to server-side authorization decisions. These 800 assertions must be evaluated by the server in the context of whether 801 the client and/or user are authenticated, whether multi-principal 802 authentication was used, whether the client is trusted, what ranges 803 of assertions are allowed for the client and the user (separately or 804 together), and any relevant server-side policy. 806 The security semantics of assertions carried by RPCSEC_GSSv3 are 807 application protocol-specific. 809 Note that RPSEC_GSSv3 is not a complete solution for labeling: it 810 conveys the labels of actors, but not the labels of objects. RPC 811 application protocols may require extending in order to carry object 812 label information. 814 There may be interactions with NFSv4's callback security scheme and 815 NFSv4.1's [RFC5661] GSS-API "SSV" mechanisms. Specifically, the 816 NFSv4 callback scheme requires that the server initiate GSS-API 817 security contexts, which does not work well in practice, and in the 818 context of client- side processes running as the same user but with 819 different privileges and security labels the NFSv4 callback security 820 scheme seems particularly unlikely to work well. NFSv4.1 has the 821 server use an existing, client-initiated RPCSEC_GSS context handle to 822 protect server-initiated callback RPCs. The NFSv4.1 callback 823 security scheme lacks all the problems of the NFSv4 scheme, however, 824 it is important that the server pick an appropriate RPCSEC_GSS 825 context handle to protect any callbacks. Specifically, it is 826 important that the server use RPCSEC_GSS context handles which 827 authenticate the client to protect any callbacks relating to server 828 state initiated by RPCs protected by RPCSEC_GSSv3 contexts. 830 As described in Section 2.10.10 [RFC5661] the client is permitted to 831 associate multiple RPCSEC_GSS handles with a single SSV GSS context. 832 RPCSEC_GSSv3 handles will work well with SSV in that the man-in-the- 833 middle attacks described in Section 2.10.10 [RFC5661] are solved by 834 the new reply verifier (Section 2.3). Using an RPCSEC_GSSv3 handle 835 backed by a GSS-SSV mechanism context as a parent handle in an 836 RPCSEC_GSS_CREATE call while permitted is complicated by the lifetime 837 rules of SSV contexts and their associated RPCSEC_GSS handles. 839 5. IANA Considerations 841 There are no IANA considerations in this document. 843 6. References 845 6.1. Normative References 847 [NFSv4.2] Haynes, T., "NFS Version 4 Minor Version 2", draft-ietf- 848 nfsv4-minorversion2-29 (Work In Progress), December 2014. 850 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 851 Requirement Levels", RFC 2119, March 1997. 853 [RFC2203] Eisler, M., Chiu, A., and L. Ling, "RPCSEC_GSS Protocol 854 Specification", RFC 2203, September 1997. 856 [RFC2743] Linn, J., "Generic Security Service Application Program 857 Interface Version 2, Update 1", RFC 2743, January 2000. 859 [RFC4506] Eisler, M., "XDR: External Data Representation Standard", 860 RFC 4506, May 2006. 862 [RFC5056] Williams, N., "On the Use of Channel Bindings to Secure 863 Channels", RFC 5056, November 2007. 865 [RFC5403] Eisler, M., "RPCSEC_GSS Version 2", RFC 5403, February 866 2009. 868 [RFC5661] Shepler, S., Eisler, M., and D. Noveck, "Network File 869 System (NFS) Version 4 Minor Version 1 Protocol", RFC 870 5661, January 2010. 872 [RFC7204] Haynes, T., "Requirements for Labeled NFS", RFC 7204, 873 April 2014. 875 6.2. Informative References 877 [AFS-RXGK] 878 Wilkinson, S. and B. Kaduk, "Integrating rxgk with AFS", 879 draft-wilkinson-afs3-rxgk-afs (work in progress), April 880 2014. 882 [BL73] Bell, D. and L. LaPadula, "Secure Computer Systems: 883 Mathematical Foundations and Model", Technical Report 884 M74-244, The MITRE Corporation Bedford, MA, May 1973. 886 [RFC2401] Kent, S. and R. Atkinson, "Security Architecture for the 887 Internet Protocol", RFC 2401, November 1998. 889 Appendix A. Acknowledgments 891 Andy Adamson would like to thank NetApp, Inc. for its funding of his 892 time on this project. 894 We thank Lars Eggert, Mike Eisler, Ben Kaduk, Bruce Fields, Tom 895 Haynes, and Dave Noveck for their most helpful reviews. 897 Appendix B. RFC Editor Notes 899 [RFC Editor: please remove this section prior to publishing this 900 document as an RFC] 902 [RFC Editor: prior to publishing this document as an RFC, please 903 replace all occurrences of RFCTBD10 with RFCxxxx where xxxx is the 904 RFC number of this document] 906 Authors' Addresses 908 William A. (Andy) Adamson 909 NetApp 910 3629 Wagner Ridge Ct 911 Ann Arbor, MI 48103 912 USA 914 Phone: +1 734 665 1204 915 Email: andros@netapp.com 917 Nico Williams 918 cryptonector.com 919 13115 Tamayo Dr 920 Austin, TX 78729 921 USA 923 Email: nico@cryptonector.com