idnits 2.17.1 draft-ietf-nfsv4-rpcsec-gssv3-08.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 219 has weird spacing: '...ue_auth cred;...' == Line 392 has weird spacing: '...3_label rau_l...' == Line 394 has weird spacing: '...3_privs rau_p...' -- The document date (June 27, 2014) is 3591 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-27 ** Obsolete normative reference: RFC 5226 (ref. '8') (Obsoleted by RFC 8126) Summary: 1 error (**), 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: December 29, 2014 Cryptonector 6 June 27, 2014 8 Remote Procedure Call (RPC) Security Version 3 9 draft-ietf-nfsv4-rpcsec-gssv3-08.txt 11 Abstract 13 This document specifies version 3 of the Remote Procedure Call (RPC) 14 security protocol (RPCSEC_GSS). This protocol provides for multi- 15 principal authentication of client hosts and user principals to 16 server (constructed by generic composition), security label 17 assertions for multi-level and type enforcement, structured privilege 18 assertions, and channel bindings. 20 Requirements Language 22 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 23 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 24 document are to be interpreted as described in RFC 2119 [1]. 26 Status of this Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at http://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on December 29, 2014. 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 . . . . . . . . . . . . . . . . . 3 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. New auth_stat Values . . . . . . . . . . . . . . . . . . . 8 67 2.6. New Control Procedures . . . . . . . . . . . . . . . . . . 8 68 2.6.1. New Control Procedure - RPCSEC_GSS_CREATE . . . . . . 9 69 2.6.2. New Control Procedure - RPCSEC_GSS_LIST . . . . . . . 15 70 2.7. Extensibility . . . . . . . . . . . . . . . . . . . . . . 16 71 3. Operational Recommendation for Deployment . . . . . . . . . . 17 72 4. Security Considerations . . . . . . . . . . . . . . . . . . . 17 73 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 74 6. References . . . . . . . . . . . . . . . . . . . . . . . . . . 18 75 6.1. Normative References . . . . . . . . . . . . . . . . . . . 18 76 6.2. Informative References . . . . . . . . . . . . . . . . . . 19 77 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . . 19 78 Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 19 79 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 19 81 1. Introduction and Motivation 83 The original RPCSEC_GSS protocol [2] provided for authentication of 84 RPC clients and servers to each other using the Generic Security 85 Services Application Programming Interface (GSS-API) [3]. The second 86 version of RPCSEC_GSS [4] added support for channel bindings [5]. 88 We find that GSS-API mechanisms are insufficient for communicating 89 certain aspects of authority to a server. The GSS-API and its 90 mechanisms certainly could be extended to address this shortcoming, 91 but it seems be far simpler to address it at the application layer, 92 namely, in this case, RPCSEC_GSS. 94 The motivation for RPCSEC_GSSv3 is to add support for labeled 95 security and server-side copy for NFSv4. 97 Labeled NFS (see Section 8 of [6]) uses the subject label provided by 98 the client via the RPCSEC_GSSv3 layer to enforce MAC access to 99 objects owned by the server to enable server guest mode or full mode 100 labeled NFS. 102 A traditional inter-server file copy entails the user gaining access 103 to a file on the source, reading it, and writing it to a file on the 104 destination. In secure NFSv4 inter-server server-side copy (see 105 Section 3.4.1 of [6]), the user first secures access to both source 106 and destination files, and then uses RPCSEC_GSSv3 multi-principal 107 authentication and structured privileges to authorize the destination 108 to copy the file from the source on behalf of the user. 110 We therefore describe RPCSEC_GSS version 3 (RPCSEC_GSSv3). 111 RPCSEC_GSSv3 is the same as RPCSEC_GSSv2 [4], except that the 112 following assertions of authority have been added. 114 o Security labels for multi-level, type enforcement, and other 115 labeled security models. See [9], [10], [11], [6] and [12]. 117 o Application-specific structured privileges. For an example see 118 server-side copy [6]. 120 o Multi-principal authentication of the client host and user to the 121 server done by binding two RPCSEC_GSS handles. For an example see 122 server-side copy [6]. 124 o Simplified channel binding. 126 Assertions of labels and privileges are evaluated by the server, 127 which may then map the asserted values to other values, all according 128 to server-side policy. 130 We add an option for enumerating server supported label format 131 specifiers (LFS). The LFS and Label Format Registry are described in 132 detail in [13]. 134 This document contains the External Data Representation (XDR) ([7]) 135 definitions for the RPCSEC_GSSv3 protocol. The XDR description is 136 provided in this document in a way that makes it simple for the 137 reader to extract into ready to compile form. The reader can feed 138 this document in the following shell script to produce the machine 139 readable XDR description of RPCSEC_GSSv3: 141 143 #!/bin/sh 144 grep "^ *///" | sed 's?^ */// ??' | sed 's?^ *///$??' 146 148 I.e. if the above script is stored in a file called "extract.sh", and 149 this document is in a file called "spec.txt", then the reader can do: 151 153 sh extract.sh < spec.txt > rpcsec_gss_v3.x 155 157 The effect of the script is to remove leading white space from each 158 line, plus a sentinel sequence of "///". 160 2. The RPCSEC_GSSv3 Protocol 162 RPCSEC_GSSv3 is the same as RPCSEC_GSSv2 [4], except that support for 163 assertions has been added. The entire RPCSEC_GSSv3 protocol is not 164 presented. Instead the differences between RPCSEC_GSSv3 and 165 RPCSEC_GSSv2 are shown. 167 RPCSEC_GSSv3 is patterned as follows: 169 o A client uses an existing RPCSEC_GSSv3 context handle to protect 170 RPCSEC_GSSv3 exchanges, this will be termed the "parent" handle. 172 o The server issues a "child" RPCSEC_GSSv3 handle in the 173 RPCSEC_GSS_CREATE response which uses the underlying GSS-API 174 security context of the parent handle in all subsequent exchanges 175 that uses the child handle. 177 o An RPCSEC_GSSv3 child handle MUST NOT be used as the parent handle 178 in an RPCSEC_GSS3_CREATE control message. 180 2.1. Compatibility with RPCSEC_GSSv2 182 The functionality of RPCSEC_GSSv2 [4] is fully supported by 183 RPCSEC_GSSv3. 185 2.2. Version Negotiation 187 An initiator that supports version 3 of RPCSEC_GSS simply issues an 188 RPCSEC_GSS request with the rgc_version field set to 189 RPCSEC_GSS_VERS_3. If the target does not recognize 190 RPCSEC_GSS_VERS_3, the target will return an RPC error per Section 191 5.1 of [2]. 193 The initiator MUST NOT attempt to use an RPCSEC_GSS handle returned 194 by version 3 of a target with version 1 or version 2 of the same 195 target. The initiator MUST NOT attempt to use an RPCSEC_GSS handle 196 returned by version 1 or version 2 of a target with version 3 of the 197 same target. 199 2.3. New REPLY verifier 201 The RPCSEC_GSSv3 child handle uses the same GSS context as the parent 202 handle. Since a child and parent RPCSEC_GSSv3 handle could have the 203 same RPCSEC_GSS sequence numbers, and the verifier of RPCSEC_GSS 204 replies computes a MIC on just the sequence number, this provides 205 opportunities for man in the middle attacks. 207 This is easily addressed: RPCSEC_GSS version 3 MUST change the 208 verifier of the reply to compute the verifier using the exact same 209 input as that is used for verifier of the request, except for the 210 mtype change from CALL to REPLY. The new reply verifier computes a 211 MIC over the following data: 213 unsigned int xid; 214 msg_type mtype; /* set to REPLY */ 215 unsigned int rpcvers; 216 unsigned int prog; 217 unsigned int vers; 218 unsigned int proc; 219 opaque_auth cred; /* captures the RPCSEC_GSS handle */ 221 2.4. New Version Number 223 225 /// /* 226 /// * Copyright (c) 2013 IETF Trust and the persons 227 /// * identified as the document authors. All rights 228 /// * reserved. 229 /// * 230 /// * The document authors are identified in [RFC2203], 231 /// * [RFC5403], and [RFCxxxx]. 232 /// * 233 /// * Redistribution and use in source and binary forms, 234 /// * with or without modification, are permitted 235 /// * provided that the following conditions are met: 236 /// * 237 /// * o Redistributions of source code must retain the above 238 /// * copyright notice, this list of conditions and the 239 /// * following disclaimer. 240 /// * 241 /// * o Redistributions in binary form must reproduce the 242 /// * above copyright notice, this list of 243 /// * conditions and the following disclaimer in 244 /// * the documentation and/or other materials 245 /// * provided with the distribution. 246 /// * 247 /// * o Neither the name of Internet Society, IETF or IETF 248 /// * Trust, nor the names of specific contributors, may be 249 /// * used to endorse or promote products derived from this 250 /// * software without specific prior written permission. 251 /// * 252 /// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 253 /// * AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 254 /// * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 255 /// * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 256 /// * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 257 /// * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 258 /// * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 259 /// * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 260 /// * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 261 /// * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 262 /// * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 263 /// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 264 /// * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 265 /// * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 266 /// * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 267 /// */ 268 /// 269 /// /* 270 /// * This code was derived from [RFC2203]. Please 271 /// * reproduce this note if possible. 272 /// */ 273 /// 274 /// enum rpc_gss_service_t { 275 /// /* Note: the enumerated value for 0 is reserved. */ 276 /// rpc_gss_svc_none = 1, 277 /// rpc_gss_svc_integrity = 2, 278 /// rpc_gss_svc_privacy = 3, 279 /// rpc_gss_svc_channel_prot = 4 280 /// }; 281 /// 282 /// enum rpc_gss_proc_t { 283 /// RPCSEC_GSS_DATA = 0, 284 /// RPCSEC_GSS_INIT = 1, 285 /// RPCSEC_GSS_CONTINUE_INIT = 2, 286 /// RPCSEC_GSS_DESTROY = 3, 287 /// RPCSEC_GSS_BIND_CHANNEL = 4, /* not used */ 288 /// RPCSEC_GSS_CREATE = 5, /* new */ 289 /// RPCSEC_GSS_LIST = 6 /* new */ 290 /// }; 291 /// 292 /// struct rpc_gss_cred_vers_1_t { 293 /// rpc_gss_proc_t gss_proc; /* control procedure */ 294 /// unsigned int seq_num; /* sequence number */ 295 /// rpc_gss_service_t service; /* service used */ 296 /// opaque handle<>; /* context handle */ 297 /// }; 298 /// 299 /// const RPCSEC_GSS_VERS_1 = 1; 300 /// const RPCSEC_GSS_VERS_2 = 2; 301 /// const RPCSEC_GSS_VERS_3 = 3; /* new */ 302 /// 303 /// union rpc_gss_cred_t switch (unsigned int rgc_version) { 304 /// case RPCSEC_GSS_VERS_1: 305 /// case RPCSEC_GSS_VERS_2: 306 /// case RPCSEC_GSS_VERS_3: /* new */ 307 /// rpc_gss_cred_vers_1_t rgc_cred_v1; 308 /// }; 309 /// 311 313 As seen above, the RPCSEC_GSSv3 credential has the same format as the 314 RPCSEC_GSSv1 [2] and RPCSEC_GSSv2 [4] credential. Setting the 315 rgc_version field to 3 indicates that the initiator and target 316 support the new RPCSEC_GSSv3 control procedures. 318 2.5. New auth_stat Values 320 RPCSEC_GSSv3 requires the addition of several values to the auth_stat 321 enumerated type definition. The use of each of these new auth_stat 322 values is explained later in this document. 324 enum auth_stat { 325 ... 326 /* 327 * RPCSEC_GSSv3 errors 328 */ 329 RPCSEC_GSS_INNER_CREDPROBLEM = 15, 330 RPCSEC_GSS_LABEL_PROBLEM = 16, 331 RPCSEC_GSS_PRIVILEGE_PROBLEM = 17, 332 RPCSEC_GSS_UNKNOWN_MESSAGE = 18 333 }; 335 2.6. New Control Procedures 337 There are two new RPCSEC_GSSv3 control procedures: RPCSEC_GSS_CREATE, 338 RPCSEC_GSS_LIST. 340 The RPCSEC_GSS_CREATE procedure binds any combination of assertions: 341 multi-principal authentication, labels, structured privileges, or 342 channel bindings to a new RPCSEC_GSSv3 context returned in the 343 rgss3_create_res rcr_handle field. 345 The RPCSEC_GSS_LIST procedure queries the target for supported 346 assertions. 348 RPCSEC_GSS version 3 control messages are similar to the RPCSEC_GSS 349 version 1 and version2 RPCSEC_GSS_DESTROY control message (see 350 section 5.4 [2]) in that the sequence number in the request must be 351 valid, and the header checksum in the verifier must be valid. As in 352 RPCSEC_GSS version 1 and version 2, the RPCSEC_GSSv version 3 control 353 messages may contain call data following the verifier in the body of 354 the NULLPROC procedure. In other words, they look a lot like an 355 RPCSEC_GSS data message with the header procedure set to NULLPROC. 357 The client MUST use one of the following security services to protect 358 the RPCSEC_GSS_CREATE or RPCSEC_GSS_LIST control message: 360 o rpc_gss_svc_channel_prot (see RPCSEC_GSSv2 [4]) 362 o rpc_gss_svc_integrity 364 o rpc_gss_svc_privacy 365 Specifically the client MUST NOT use rpc_gss_svc_none. 367 2.6.1. New Control Procedure - RPCSEC_GSS_CREATE 369 371 /// struct rgss3_create_args { 372 /// rgss3_gss_mp_auth *rca_mp_auth; 373 /// rgss3_chan_binding *rca_chan_bind_mic; 374 /// rgss3_assertion rca_assertions<>; 375 /// }; 376 /// 377 /// struct rgss3_create_res { 378 /// opaque rcr_handle<>; 379 /// rgss3_gss_mp_auth *rcr_mp_auth; 380 /// rgss3_chan_binding *rcr_chan_bind_mic; 381 /// rgss3_assertion rcr_assertions<>; 382 /// }; 383 /// 384 /// enum rgss3_assertion_type { 385 /// LABEL = 0, 386 /// PRIVS = 1 387 /// }; 388 /// 389 /// union rgss3_assertion_u 390 /// switch (rgss3_assertion_type atype) { 391 /// case LABEL: 392 /// rgss3_label rau_label; 393 /// case PRIVS: 394 /// rgss3_privs rau_privs; 395 /// default: 396 /// opaque rau_ext<>; 397 /// }; 398 /// 399 /// struct rgss3_assertion { 400 /// bool ra_critical; 401 /// rgss3_assertion_u ra_assertion; 402 /// }; 403 /// 405 407 The call data for an RPCSEC_GSS_CREATE request consists of an 408 rgss3_create_args which binds one or more items of several kinds to 409 the returned rcr_handle RPCSEC_GSSv3 context handle called the 410 "child" handle: 412 o Multi-principal authentication: another RPCSEC_GSS context handle 414 o Authorization assertions: labels and or privileges 416 o A channel binding 418 The reply to this message consists of either an error or an 419 rgss3_create_res structure. 421 Upon successful RPCSEC_GSS_CREATE, both the client and the server 422 SHOULD associate the resultant child rcr_handle context handle with 423 the parent context handle in their GSS context caches so as to be 424 able to reference the parent context given the child context handle. 426 RPCSEC_GSSv3 child handles MUST be destroyed upon the destruction of 427 the associated parent handle. 429 Server implementation and policy MAY result in labels, privileges, 430 and identities being mapped to concepts and values that are local to 431 the server. Server policies should take into account the identity of 432 the client and/or user as authenticated via the GSS-API. 434 2.6.1.1. Multi-principal Authentication 436 438 /// 439 /// struct rgss3_gss_mp_auth { 440 /// opaque rgmp_handle<>; /* inner handle */ 441 /// opaque rgmp_nonce<>; 442 /// opaque rgmp_nounc_mic<>; 443 /// }; 444 /// 446 448 RPCSEC_GSSv3 clients MAY assert a multi-principal authentication of 449 the client host principal and a user principal. This feature is 450 needed, for example, when a client wishes to use authority assertions 451 that the server may only grant if a user and a client are 452 authenticated together to the server. Thus a server may refuse to 453 grant requested authority to a user acting alone (e.g., via an 454 unprivileged user-space program), or to a client acting alone (e.g. 455 when a client is acting on behalf of a user) but may grant requested 456 authority to a client acting on behalf of a user if the server 457 identifies the user and trusts the client. 459 It is assumed that an unprivileged user-space program would not have 460 access to client host credentials needed to establish a GSS-API 461 security context authenticating the client to the server, therefore 462 an unprivileged user-space program could not create an RPCSEC_GSSv3 463 RPCSEC_GSS_CREATE message that successfully binds a client and a user 464 security context. 466 In addition to the parent handle (Section 2), the multi-principal 467 authentication call data has an RPCSEC_GSS version 3 handle 468 referenced via the rgmp_handle field termed the "inner" handle. 469 Clients using RPCSEC_GSSv3 multi-principal authentication MUST use an 470 RPCSEC_GSSv3 context handle that corresponds to a GSS-API security 471 context that authenticates the client host for the parent handle. 472 The inner context handle it SHOULD use a context handle to 473 authenticate a user. The reverse (parent handle authenticates user, 474 inner authenticates client) MUST NOT be used. Other multi-principal 475 parent and inner context handle uses might eventually make sense. 477 An inner RPCSEC_GSSv3 context handle that is bound to a parent 478 RPCSEC_GSS context through multi-principal authentication MUST be 479 treated by servers as authenticating the GSS-API initiator principal 480 authenticated by the inner context handle's GSS-API security context. 481 This principal may be mapped to a server-side notion of user or 482 principal. 484 Multi-principal binding is done by including an assertion of type 485 rgss3_gss_mp_auth in the RPCSEC_GSS_CREATE rgss3_create_args call 486 data. The inner context handle is place in the rbmp_handle field. A 487 nonce and a MIC of that nounce created using the GSS-API security 488 context associated with the inner handle is also provided. 490 The target verifies the multi-principal authentication by verifying 491 the rgmp_nouce_mic. On a successful reply, the rgss3_gss_mp_auth 492 field in the rgss3_create_res reply uses the parent RPCSEC_GSSv3 493 context as the rgmp_handle, the same rgmp_nounce as was sent in the 494 call data with the rgmp_nounce_mic created using the GSS-API security 495 context associate with the parent handle. Verification of the 496 rbg_nounce_mic by the initiator demonstrates that the target agrees 497 to the multi-principal authentication. 499 On failure, the rgss3_gss_mp_auth field is not sent 500 (rgss3_gss_mp_auth is an optional field). A MSG_DENIED reply to an 501 RPCSEC_GSS_CREATE formulated as usual. A new value, 502 RPCSEC_GSS_INNER_CREDPROBLEM, has been added to the auth_stat type. 503 As described in Section 5.3.3.3 of [2] the server maintains a list of 504 contexts for the clients that are currently in session with it. When 505 a client request comes in, there may not be a context corresponding 506 to its handle. When this occurs on an RPCSEC_GSS3_CREATE request 507 processing of the parent handle, the server rejects the request with 508 a reply status of MSG_DENIED with the reject_stat of AUTH_ERROR and 509 with an auth_stat value of RPCSEC_GSS_CREDPROBLEM. 511 With a multi-pricipal authorization request, the server must also 512 have a context corresponding to the inner context handle. When the 513 server does not have a context handle corresponding to the inner 514 context handle of a multi-pricipal authorization request, the server 515 send a reply status of MSG_DENIED with the reject_stat of AUTH_ERROR 516 and with an auth_stat value of RPCSEC_GSS_INNER_CREDPROBLEM. 518 When processing the multi-principal authentication request, if the 519 GSS_VerifyMIC() call on the inner handle nouce fails to return 520 GSS_S_COMPLETE, the server sends a reply status of MSG_DENIED with 521 the reject_stat of AUTH_ERROR and with an auth_stat value of 522 RPCSEC_GSS_INNER_CREDPROBLEM. 524 2.6.1.2. Label Assertions 526 528 /// struct rgss3_label { 529 /// rgss3_lfs rl_lfs; 530 /// opaque rl_label<>; 531 /// }; 532 /// 533 /// struct rgss3_lfs { 534 /// unsigned int rlf_lfs_id; 535 /// unsigned int rlf_pi_id; 536 /// }; 537 /// 539 541 The client discovers which labels the server supports via the 542 RPCSEC_GSS_LIST control message. 544 RPCSEC_GSSv3 clients MAY assert a server security label in some LSF 545 by binding a label assertion to the RPCSEC_GSSv3 context handle. 546 This is done by including an assertion of type rgss3_label in the 547 RPCSEC_GSS_CREATE rgss3_create_args rca_assertions call data. 549 The labels that are accepted by the target and bound to the 550 RPCSEC_GSSv3 context will be enumerated in the rcr_assertions field 551 of the rgss3_create_res RPCSEC_GSS_CREATE reply. 553 Label encoding is specified to mirror the NFSv4.2 sec_label attribute 554 described in Section 12.2.2 of [6]. The label format specifier (LFS) 555 is an identifier used by the client to establish the syntactic format 556 of the security label and the semantic meaning of its components. 557 The policy identifier (PI) is an optional part of the definition of 558 an LFS which allows for clients and server to identify specific 559 security policies. The opaque label field of rgss3_label is 560 dependent on the MAC model to interpret and enforce. 562 Asserting a server supported label via RPCSEC_GSS_CREATE enables 563 server guest mode labels. Full mode is enabled when an 564 RPCSEC_GSS_CREATE label assertion is combined with asserting the same 565 label with the NFSv4.2 sec_label attribute. 567 If a label itself requires privacy protection (i.e., that the user 568 can assert that label is a secret) then the client MUST use the 569 rpc_gss_svc_privacy protection service for the RPCSEC_GSS_CREATE 570 request or, if the parent handle is bound to a secure channel that 571 provides privacy protection, rpc_gss_svc_channel_prot. 573 If a client wants to ensure that the server understands the asserted 574 label then it MUST set the 'critical' field of the label assertion to 575 TRUE, otherwise it MUST set it to FALSE. 577 Servers that do not support labeling MUST ignore non-critical label 578 assertions. Servers that do not support the requested LFS MUST 579 either ignore non-critical label assertions or map them to a suitable 580 label in a supported LFS. Servers that do not support labeling or do 581 not support the requested LFS MUST return an error if the label 582 request is critical. Servers that support labeling in the requested 583 LFS MAY map the requested label to different label as a result of 584 server-side policy evaluation. 586 2.6.1.3. Structured Privilege Assertions 588 590 /// 591 /// struct rgss3_privs { 592 /// string rp_name<>; /* human readable */ 593 /// opaque rp_privilege<>; 594 /// }; 596 598 A structured privilege is an RPC application defined privilege. 599 RPCSEC_GSSv3 clients MAY assert a structured privilege by binding the 600 privilege to the RPCSEC_GSSv3 context handle. This is done by 601 including an assertion of type rgss3_privs in the RPCSEC_GSS_CREATE 602 rgss3_create_args rca_assertions call data. Encoding, server 603 verification and any policies for structured privileges are described 604 by the RPC application definition. 606 A successful structured privilege assertion will be enumerated in the 607 rcr_assertions field of the rgss3_create_res RPCSEC_GSS_CREATE reply. 609 If a server receives a structured privilege assertion that it does 610 not recognize the assertion is rejected with MSG_DENIED, a 611 reject_status of AUTH_ERROR, and an auth_stat of 612 RPCSEC_GSS_UNKNOWN_MESSAGE. If the server fails the RPC application 613 defined server verification for a structured privilege, the assertion 614 is rejected with MSG_DENIED, a reject_status of AUTH_ERROR, and an 615 auth_stat of RPCSEC_GSS_PRIVILEGE_PROBLEM. 617 Section 3.4.1.2. "Inter-Server Copy with RPCSEC_GSSv3" of [6] shows 618 an example of structured privilege definition and use. 620 2.6.1.4. Channel Binding 622 624 /// 625 /// typedef opaque rgss3_chan_binding<>; 626 /// 628 630 RPCSEC_GSSv3 provides a different way to do channel binding than 631 RPCSEC_GSSv2 [4]. Specifically: 633 a. RPCSEC_GSSv3 builds on RPCSEC_GSSv1 by reusing existing, 634 established context handles rather than providing a different RPC 635 security flavor for establishing context handles, 637 b. channel bindings data are not hashed because the community now 638 agrees that it is the secure channel's responsibility to produce 639 channel bindings data of manageable size. 641 (a) is useful in keeping RPCSEC_GSSv3 simple in general, not just for 642 channel binding. (b) is useful in keeping RPCSEC_GSSv3 simple 643 specifically for channel binding. 645 Channel binding is accomplished as follows. The client prefixes the 646 channel bindings data octet string with the channel type as described 647 in [5], then the client calls GSS_GetMIC() to get a MIC of resulting 648 octet string, using the RPCSEC_GSSv3 context handle's GSS-API 649 security context. The MIC is then placed in the rca_chan_bind_mic 650 field of RPCSEC_GSS_CREATE arguments (rgss3_create_args). 652 If the rca_chan_bind_mic field of the arguments of a 653 RPCSEC_GSS_CREATE control message is set, then the server MUST verify 654 the client's channel binding MIC if the server supports this feature. 655 If channel binding verification succeeds then the server MUST 656 generate a new MIC of the same channel bindings and place it in the 657 rcr_chan_bind_mic field of the RPCSEC_GSS_CREATE rgss3_create_res 658 results. If channel binding verification fails or the server doesn't 659 support channel binding then the server MUST indicate this in its 660 reply by not including a rgss3_chan_binding value in rgss3_create_res 661 (rgss3_chan_binding is an optional field). 663 The client MUST verify the result's rcr_chan_bind_mic value by 664 calling GSS_VerifyMIC() with the given MIC and the channel bindings 665 data (including the channel type prefix). If client-side channel 666 binding verification fails then the client MUST call 667 RPCSEC_GSS_DESTROY. If the client requested channel binding but the 668 server did not include an rcr_chan_binding_mic field in the results, 669 then the client MAY continue to use the resulting context handle as 670 though channel binding had never been requested, otherwise (if the 671 client really wanted channel binding) it MUST call 672 RPCSEC_GSS_DESTROY. 674 As per-RPCSEC_GSSv2 [4]: 676 "Once a successful [channel binding] procedure has been performed 677 on an [RPCSEC_GSSv3] context handle, the initiator's 678 implementation may map application requests for rpc_gss_svc_none 679 and rpc_gss_svc_integrity to rpc_gss_svc_channel_prot credentials. 680 And if the secure channel has privacy enabled, requests for 681 rpc_gss_svc_privacy can also be mapped to 682 rpc_gss_svc_channel_prot." 684 Any RPCSEC_GSSv3 context handle that has been bound to a secure 685 channel in this way SHOULD be used only with the 686 rpc_gss_svc_channel_prot, and SHOULD NOT be used with 687 rpc_gss_svc_none nor rpc_gss_svc_integrity -- if the secure channel 688 does not provide privacy protection then the client MAY use 689 rpc_gss_svc_privacy where privacy protection is needed or desired. 691 2.6.2. New Control Procedure - RPCSEC_GSS_LIST 693 694 /// enum rgss3_list_item { 695 /// LABEL = 0, 696 /// PRIVS = 1 697 /// }; 698 /// 699 /// struct rgss3_list_args { 700 /// rgss3_list_item rla_list_what<>; 701 /// }; 702 /// 703 /// union rgss3_list_item_u 704 /// switch (rgss3_list_item itype) { 705 /// case LABEL: 706 /// rgss3_label rli_labels<>; 707 /// case PRIVS: 708 /// rgss3_privs rli_privs<>; 709 /// default: 710 /// opaque rli_ext<>; 711 /// }; 712 /// 713 /// typedef rgss3_list_item_u rgss3_list_res<>; 714 /// 716 718 The call data for an RPCSEC_GSS_LIST request consists of a list of 719 integers (rla_list_what<>) indicating what assertions to be listed, 720 and the reply consists of an error or the requested list. 722 [[Comment.1: What good is the rli_ext field? How should we describe 723 it's use? --AA]] 725 The result of requesting a list of rgss3_list_item LABEL is a list of 726 LFSs supported by the server. The client can then use the LFS list 727 to assert labels via the RPCSEC_GSS_CREATE label assertions. See 728 Section 2.6.1.2. 730 2.7. Extensibility 732 Assertion types may be added in the future by adding arms to the 733 'rgss3_assertion_u' union. Every assertion has a 'critical' flag 734 that can be used to indicate criticality. Other assertion types are 735 described elsewhere and include: 737 o Client-side assertions of identity: 739 * Primary client/user identity 740 * Supplementary group memberships of the client/user, including 741 support for specifying deltas to the membership list as seen on 742 the server. 744 New control message types may be added. 746 Servers receiving unknown critical client assertions MUST return an 747 error. 749 3. Operational Recommendation for Deployment 751 RPCSEC_GSSv3 is a superset of RPCSEC_GSSv2 [4] which in turn is a 752 superset of RPCSEC_GSSv1 [2], and so can be used in all situations 753 where RPCSEC_GSSv1 or RPCSEC_GSSv2 is used. RPCSEC_GSSv3 should be 754 used when the new functionality is needed. 756 4. Security Considerations 758 This entire document deals with security issues. 760 The RPCSEC_GSSv3 protocol allows for client-side assertions of data 761 that is relevant to server-side authorization decisions. These 762 assertions must be evaludated by the server in the context of whether 763 the client and/or user are authenticated, whether multi-principal 764 authentication was used, whether the client is trusted, what ranges 765 of assertions are allowed for the client and the user (separately or 766 together), and any relevant server-side policy. 768 The security semantics of assertions carried by RPCSEC_GSSv3 are 769 application protocol-specific. 771 RPCSEC_GSSv3 supports a notion of critical assertions but there's no 772 need for peers to tell each other what assertions were granted, or 773 what they were mapped to. 775 Note that RPSEC_GSSv3 is not a complete solution for labeling: it 776 conveys the labels of actors, but not the labels of objects. RPC 777 application protocols may require extending in order to carry object 778 label information. 780 There may be interactions with NFSv4's callback security scheme and 781 NFSv4.1's GSS-API "SSV" mechanisms. Specifically, the NFSv4 callback 782 scheme requires that the server initiate GSS-API security contexts, 783 which does not work well in practice, and in the context of client- 784 side processes running as the same user but with different privileges 785 and security labels the NFSv4 callback security scheme seems 786 particularly unlikely to work well. NFSv4.1 has the server use an 787 existing, client-initiated RPCSEC_GSS context handle to protect 788 server-initiated callback RPCs. The NFSv4.1 callback security scheme 789 lacks all the problems of the NFSv4 scheme, however, it is important 790 that the server pick an appropriate RPCSEC_GSS context handle to 791 protect any callbacks. Specifically, it is important that the server 792 use RPCSEC_GSS context handles which authenticate the client to 793 protect any callbacks relating to server state initiated by RPCs 794 protected by RPCSEC_GSSv3 contexts. 796 [[Comment.2: [Add text about interaction with GSS-SSV...] --NW]] 798 [[Comment.3: AFAICS the reason to use SSV is to avoid using a client 799 machine credential which means multi-principal authentication can not 800 be used. --AA]] 802 5. IANA Considerations 804 This section uses terms that are defined in [8]. 806 There are no IANA considerations in this document. TBDs in this 807 document will be assigned by the ONC RPC registrar (which is not 808 IANA, XXX: verify). 810 6. References 812 6.1. Normative References 814 [1] Bradner, S., "Key words for use in RFCs to Indicate Requirement 815 Levels", RFC 2119, March 1997. 817 [2] Eisler, M., Chiu, A., and L. Ling, "RPCSEC_GSS Protocol 818 Specification", RFC 2203, September 1997. 820 [3] Linn, J., "Generic Security Service Application Program 821 Interface Version 2, Update 1", RFC 2743, January 2000. 823 [4] Eisler, M., "RPCSEC_GSS Version 2", RFC 5403, February 2009. 825 [5] Williams, N., "On the Use of Channel Bindings to Secure 826 Channels", RFC 5056, November 2007. 828 [6] Haynes, T., "NFS Version 4 Minor Version 2", 829 draft-ietf-nfsv4-minorversion2-27 (Work In Progress), 830 June 2014. 832 [7] Eisler, M., "XDR: External Data Representation Standard", 833 RFC 4506, May 2006. 835 [8] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA 836 Considerations Section in RFCs", BCP 26, RFC 5226, May 2008. 838 6.2. Informative References 840 [9] "Section 46.6. Multi-Level Security (MLS) of Deployment Guide: 841 Deployment, configuration and administration of Red Hat 842 Enterprise Linux 5, Edition 6", 2011. 844 [10] Smalley, S., "The Distributed Trusted Operating System (DTOS) 845 Home Page", 846 . 848 [11] Carter, J., "Implementing SELinux Support for NFS", 849 . 851 [12] Haynes, T., "Requirements for Labeled NFS", 852 draft-ietf-nfsv4-labreqs-05 (work in progress). 854 [13] Quigley, D. and J. Lu, "Registry Specification for MAC Security 855 Label Formats", draft-quigley-label-format-registry (work in 856 progress), 2011. 858 Appendix A. Acknowledgments 860 Andy Adamson would like to thank NetApp, Inc. for its funding of his 861 time on this project. 863 Lars Eggert and Mike Eisler for their most helpful reviews. 865 Appendix B. RFC Editor Notes 867 [RFC Editor: please remove this section prior to publishing this 868 document as an RFC] 870 [RFC Editor: prior to publishing this document as an RFC, please 871 replace all occurrences of RFCTBD10 with RFCxxxx where xxxx is the 872 RFC number of this document] 874 Authors' Addresses 876 William A. (Andy) Adamson 877 NetApp 878 3629 Wagner Ridge Ctt 879 Ann Arbor, MI 48103 880 USA 882 Phone: +1 734 665 1204 883 Email: andros@netapp.com 885 Nico Williams 886 cryptonector.com 887 13115 Tamayo Dr 888 Austin, TX 78729 889 USA 891 Email: nico@cryptonector.com