idnits 2.17.1 draft-ietf-nfsv4-rpcsec-gssv3-03.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 357 has weird spacing: '... bool cri...' == Line 358 has weird spacing: '... opaque data<...' == Line 362 has weird spacing: '...ned int ver...' == Line 372 has weird spacing: '...ss3_doi doi...' == Line 384 has weird spacing: '...up_list grou...' == (4 more instances...) == The document seems to contain a disclaimer for pre-RFC5378 work, but was first submitted on or after 10 November 2008. The disclaimer is usually necessary only for documents that revise or obsolete older RFCs, and that take significant amounts of text from those RFCs. If you can contact all authors of the source material and they are willing to grant the BCP78 rights to the IETF Trust, you can and should remove the disclaimer. Otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (October 15, 2012) is 4209 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) == Unused Reference: '9' is defined on line 969, but no explicit reference was found in the text -- Possible downref: Non-RFC (?) normative reference: ref. '1' ** Obsolete normative reference: RFC 1831 (ref. '4') (Obsoleted by RFC 5531) == Outdated reference: A later version (-35) exists of draft-ietf-nfsv4-rfc3530bis-09 ** Obsolete normative reference: RFC 5226 (ref. '8') (Obsoleted by RFC 8126) ** Obsolete normative reference: RFC 5661 (ref. '9') (Obsoleted by RFC 8881) Summary: 3 errors (**), 0 flaws (~~), 10 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 NFSv4 T. Haynes 3 Internet-Draft NetApp 4 Intended status: Standards Track N. Williams 5 Expires: April 18, 2013 Cryptonector 6 October 15, 2012 8 Remote Procedure Call (RPC) Security Version 3 9 draft-ietf-nfsv4-rpcsec-gssv3-03.txt 11 Abstract 13 This document specifies version 3 of the Remote Procedure Call (RPC) 14 security protocol (RPCSEC_GSS). This protocol provides for: compound 15 authentication of client hosts and users to server (constructed by 16 generic composition), channel binding, security label assertions for 17 multi-level and type enforcement, privilege assertions, and identity 18 assertions. 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 April 18, 2013. 43 Copyright Notice 45 Copyright (c) 2012 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 This document may contain material from IETF Documents or IETF 59 Contributions published or made publicly available before November 60 10, 2008. The person(s) controlling the copyright in some of this 61 material may not have granted the IETF Trust the right to allow 62 modifications of such material outside the IETF Standards Process. 63 Without obtaining an adequate license from the person(s) controlling 64 the copyright in such materials, this document may not be modified 65 outside the IETF Standards Process, and derivative works of it may 66 not be created outside the IETF Standards Process, except to format 67 it for publication as an RFC or to translate it into languages other 68 than English. 70 Table of Contents 72 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 73 1.1. Motivation . . . . . . . . . . . . . . . . . . . . . . . . 5 74 1.2. Applications of RPCSEC_GSSv3 . . . . . . . . . . . . . . . 6 75 2. The RPCSEC_GSSv3 protocol . . . . . . . . . . . . . . . . . . 6 76 2.1. Control messages . . . . . . . . . . . . . . . . . . . . . 12 77 2.1.1. New auth_stat values . . . . . . . . . . . . . . . . . 12 78 2.1.2. Create request . . . . . . . . . . . . . . . . . . . . 12 79 2.1.3. Context handle destruction . . . . . . . . . . . . . . 18 80 2.1.4. List request . . . . . . . . . . . . . . . . . . . . . 18 81 2.1.5. Extensibility . . . . . . . . . . . . . . . . . . . . 18 82 3. Privileges and identity representation for NFSv4 . . . . . . . 19 83 4. Security Considerations . . . . . . . . . . . . . . . . . . . 20 84 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 21 85 6. Normative References . . . . . . . . . . . . . . . . . . . . . 21 86 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . . 22 87 Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 22 88 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 22 90 1. Introduction 92 The original RPCSEC_GSS protocol [2] provided for authentication of 93 RPC clients and servers to each other using the Generic Security 94 Services Application Programming Interface (GSS-API) [3]. The second 95 version of RPCSEC_GSS [4] added support for channel binding [5]. 97 We find that GSS-API mechanisms are insufficient for communicating 98 certain aspects of a client's identity and authority to a server. 99 The GSS-API and its mechanisms certainly could be extended to address 100 this shortcomming, but it seems be far simpler to address it at the 101 application layer, namely, in this case, RPCSEC_GSS. 103 We therefore provide a new version of RPCSEC_GSS that allows for the 104 following: 106 o compound authentication of the client host and user to the server 107 (done by binding of two RPCSEC_GSS handles) 109 o channel binding (even though RPCSEC_GSSv2 provides this also; see 110 below) 112 o client-side assertions of authority: 114 * security labels (for multi-level, type enforcement, and other 115 labeled security models) [add refs. for labeled security] 117 * application-specific privileges 119 o client-side assertions of identity: 121 * primary client/user identity 123 * supplementary group memberships of the client/user, including 124 support for specifying deltas to the membership list as seen on 125 the server 127 Assertions of labels, privilege and identity are evaluated by the 128 server, which may then map the asserted values to other values, all 129 according to server-side policy. 131 We also add an option for enumerating server-side domains of 132 interpretation (DOI), though this seems likely to be unnecessary. 134 RPCSEC_GSSv3 is patterned as follows: 136 o a client uses an existing RPCSEC_GSS context handle (of any 137 RPCSEC_GSS version) to protect RPCSEC_GSSv3 exchanges (this will 138 be termed the "parent" or "outer" handle) 140 o the server issues a "child" RPCSEC_GSSv3 handle, but the 141 underlying GSS-API security context for the parent handle is used 142 in all subsequent exchanges using the child handle (this works 143 because the RPCSEC_GSS handle is included in the integrity 144 protected RPCSEC_GSS auth/verifier header for all versions of 145 RPCSEC_GSS) 147 This means that RPCSEC_GSSv3 depends on RPCSEC_GSS versions 1 and/or 148 2 for actual GSS-API security context establishment. This keeps the 149 specification of RPCSEC_GSSv3 simple by avoiding the need to 150 duplicate the core functionality of RPCSEC_GSS version 1. 152 1.1. Motivation 154 The initial motivation for RPCSEC_GSSv3 is to add support for labeled 155 security. Several alternatives to revising RPCSEC_GSS were 156 considered: 158 a. application-level protocol extensions, such as new operations for 159 the Network File System version 4 (NFSv4) protocol [6]; 161 b. a stackable GSS-API pseudo-mechanism that could be composed with 162 concrete GSS-API mechanisms to provide both, authentication and 163 protected security label assertions; 165 c. per-GSS-API mechanism extensions for transporting security label 166 assertions; 168 Alternative (c) is not sufficiently general. One possible benefit of 169 (c) might be the ability to have per-{user, label} credentials, 170 though that might be difficult to manage (and, anyways, can be 171 emulated with regular GSS-API mechanisms through principal naming 172 conventions), whereas with the other approaches there is a single 173 credential per-user that can be used to assert multiple security 174 labels. 176 Alternative (a) is not general either, though for the purpose of the 177 NFSv4 community it would suffice. However, a solution at the 178 RPCSEC_GSS or GSS-API layers does, or arguably should, fit more 179 naturally into most, if not all, NFSv4 implementations. 181 Alternative (b) is certainly general enough. In fact, it is more 182 general than the RPCSEC_GSSv3 solution in that it could be used in 183 non-RPC protocols that support the use of the GSS-API. However, the 184 RPCSEC_GSSv3 approach is attractively simple. For example, to pursue 185 (b) would likely entail having to specify a framework for mechanism 186 composition, as well as GSS-API interfaces to access assertions that 187 would typically be very platform-specific. (The KITTEN WG has 188 explored stackable pseudo-mechanisms in the past, but that work is 189 currently stagnant.) It is possible that stackable pseudo-mechanisms 190 may materialize in the future; such mechanisms would be usable 191 through all versions of RPCSEC_GSS so far. 193 As we considered these alternatives we also realized that we needed 194 other features that could all be packed into a single solution. For 195 example, the assertion of security label is conceptually equivalent, 196 protocol-wise, to assertions of privilege and identity. 198 Additionally, assertions need to be verified, and in this case the 199 one party that can verify an assertion is the client host, which can 200 authenticate to the server using its own credentials. Yet we want to 201 continue authenticating users as well. This calls for compound 202 authentication. 204 Finally, because the design of RPCSEC_GSSv3 relies on RPCSEC_GSSv1 205 (though v2 can also be used) to do the actual GSS-API security 206 context establishment, we add support for channel binding so that 207 implementors who have implemented RPCSEC_GSSv1 but not version 2 can 208 still provide channel binding without having to implement version 2. 209 Channel binding is accomplished in a more simple manner in v3 also. 211 1.2. Applications of RPCSEC_GSSv3 213 The common uses of RPCSEC_GSSv3, particularly for NFSv4, are expected 214 to be: 216 a. labeled security: client-side process label assertion [+ 217 privilege assertion] + compound client host & user 218 authentication; 220 b. compound client host & user authentication [+ privilege 221 assertion]; 223 c. client-side process credentials assertion [+ privilege assertion] 224 as a replacement for AUTH_SYS that is more secure than AUTH_SYS 225 while not requiring per-user credentials 227 2. The RPCSEC_GSSv3 protocol 229 This document contains the External Data Representation (XDR) ([7]) 230 definitions for the RPCSEC_GSSv3 protocol. 232 The XDR description is provided in this document in a way that makes 233 it simple for the reader to extract into ready to compile form. The 234 reader can feed this document in the following shell script to 235 produce the machine readable XDR description of RPCSEC_GSSv3: 237 #!/bin/sh 238 grep "^ *///" | sed 's?^ */// ??' | sed 's?^ *///$??' 240 I.e. if the above script is stored in a file called "extract.sh", and 241 this document is in a file called "spec.txt", then the reader can do: 243 sh extract.sh < spec.txt > rpcsec_gss_v3.x 245 The effect of the script is to remove leading white space from each 246 line, plus a sentinel sequence of "///". 248 The XDR description, with the sentinel sequence follows: 250 /// /* 251 /// * Copyright (c) 2011 IETF Trust and the persons 252 /// * identified as the document authors. All rights 253 /// * reserved. 254 /// * 255 /// * The document authors are identified in [RFC2203], 256 /// * [RFC5403], and [RFCxxxx]. 257 /// * 258 /// * Redistribution and use in source and binary forms, 259 /// * with or without modification, are permitted 260 /// * provided that the following conditions are met: 261 /// * 262 /// * o Redistributions of source code must retain the above 263 /// * copyright notice, this list of conditions and the 264 /// * following disclaimer. 265 /// * 266 /// * o Redistributions in binary form must reproduce the 267 /// * above copyright notice, this list of 268 /// * conditions and the following disclaimer in 269 /// * the documentation and/or other materials 270 /// * provided with the distribution. 271 /// * 272 /// * o Neither the name of Internet Society, IETF or IETF 273 /// * Trust, nor the names of specific contributors, may be 274 /// * used to endorse or promote products derived from this 275 /// * software without specific prior written permission. 276 /// * 277 /// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 278 /// * AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 279 /// * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 280 /// * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 281 /// * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 282 /// * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 283 /// * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 284 /// * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 285 /// * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 286 /// * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 287 /// * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 288 /// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 289 /// * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 290 /// * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 291 /// * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 292 /// */ 293 /// 294 /// /* 295 /// * This code was derived from [RFC2203]. Please 296 /// * reproduce this note if possible. 297 /// */ 298 /// 299 /// /* 300 /// * rpcsec_gss_v3.x 301 /// */ 302 /// 303 /// enum rpc_gss_service_t { 304 /// /* Note: the enumerated value for 0 is reserved. */ 305 /// rpc_gss_svc_none = 1, 306 /// rpc_gss_svc_integrity = 2, 307 /// rpc_gss_svc_privacy = 3, 308 /// rpc_gss_svc_channel_prot = 4 309 /// }; 310 /// 311 /// enum rpc_gss_proc_t { 312 /// RPCSEC_GSS_DATA = 0, 313 /// RPCSEC_GSS_INIT = 1, 314 /// RPCSEC_GSS_CONTINUE_INIT = 2, 315 /// RPCSEC_GSS_DESTROY = 3, 316 /// RPCSEC_GSS_BIND_CHANNEL = 4 317 /// }; 318 /// 319 /// struct rpc_gss_cred_vers_1_t { 320 /// rpc_gss_proc_t gss_proc; /* control procedure */ 321 /// unsigned int seq_num; /* sequence number */ 322 /// rpc_gss_service_t service; /* service used */ 323 /// opaque handle<>; /* context handle */ 324 /// }; 325 /// 326 /// enum rpc_gss3_proc_t { 327 /// RPCSEC_GSS3_DATA = 0, 328 /// RPCSEC_GSS3_LIST = 5, 329 /// RPCSEC_GSS3_CREATE = 6, 330 /// RPCSEC_GSS3_DESTROY = 7 331 /// }; 332 /// 333 /// struct rpc_gss_cred_vers_3_t { 334 /// rpc_gss3_proc_t gss_proc; 335 /// unsigned int seq_num; 336 /// rpc_gss_service_t service; 337 /// opaque handle<>; 338 /// unsigned int handle_version; 339 /// }; 340 /// 341 /// const RPCSEC_GSS_VERS_1 = 1; 342 /// const RPCSEC_GSS_VERS_2 = 2; 343 /// const RPCSEC_GSS_VERS_3 = 3; /* new */ 344 /// 345 /// union rpc_gss_cred_t switch (unsigned int rgc_version) { 346 /// case RPCSEC_GSS_VERS_1: 347 /// case RPCSEC_GSS_VERS_2: 348 /// rpc_gss_cred_vers_1_t rgc_cred_v1; 349 /// case RPCSEC_GSS_VERS_3: /* new */ 350 /// rpc_gss_cred_vers_3_t rgc_cred_v3; 351 /// }; 352 /// 353 /// const MAXSEQ = 0x80000000; 354 /// 355 /// struct rpc_gss3_extension { 356 /// int type; 357 /// bool critical; 358 /// opaque data<>; 359 /// }; 360 /// 361 /// struct rpc_gss3_gss_binding { 362 /// unsigned int vers; 363 /// opaque handle<>; 364 /// opaque nonce<>; 365 /// opaque mic<>; 366 /// }; 367 /// 368 /// typedef opaque rpc_gss3_chan_binding<>; 369 /// 370 /// typedef opaque rpc_gss3_doi<>; 371 /// struct rpc_gss3_label { 372 /// rpc_gss3_doi doi; 373 /// opaque label<>; 374 /// }; 375 /// 376 /// typedef opaque rpc_gss3_privs<>; 377 /// 378 /// typedef opaque rpc_gss3_name<>; 379 /// 380 /// typedef rpc_gss3_name rpc_gss3_group_list<>; 381 /// struct rpc_gss3_id { 382 /// rpc_gss3_name *username; 383 /// rpc_gss3_group_list *groups; 384 /// rpc_gss3_group_list groups_add; 385 /// rpc_gss3_group_list groups_remove; 386 /// }; 387 /// 388 /// enum rpc_gss3_assertion_type { 389 /// LABEL = 0, 390 /// PRIVS = 1, 391 /// IDENTITY = 2 392 /// }; 393 /// 394 /// union rpc_gss3_assertion_u 395 /// switch (rpc_gss3_assertion_type atype) { 396 /// case LABEL: 397 /// rpc_gss3_label label; 398 /// case PRIVILEGES: 399 /// rpc_gss3_privs privs; 400 /// case IDENTITY: 401 /// rpc_gss3_id id; 402 /// default: 403 /// opaque ext<>; 404 /// }; 405 /// 406 /// struct rpc_gss3_assertion { 407 /// bool critical; 408 /// rpc_gss3_assertion_u assertion; 409 /// }; 410 /// 411 /// struct rpc_gss3_create_args { 412 /// rpc_gss3_gss_binding *compound_binding; 413 /// rpc_gss3_chan_binding *chan_binding_mic; 414 /// rpc_gss3_assertion assertions<>; 415 /// rpc_gss3_extension extensions<>; 416 /// }; 417 /// 418 /// struct rpc_gss3_create_res { 419 /// opaque handle<>; 420 /// rpc_gss3_chan_binding *chan_binding_mic; 421 /// rpc_gss3_assertion granted_assertions<>; 422 /// rpc_gss3_assertion assertions_denied<>; 423 /// rpc_gss3_assertion assertions_not_understood<>; 424 /// rpc_gss3_assertion server_assertions<>; 425 /// rpc_gss3_extension extensions<>; 426 /// }; 427 /// 428 /// enum rpc_gss3_list_item { 429 /// DOI = 0, 430 /// PRIV = 1, 431 /// PRIV_GROUP = 2 432 /// }; 433 /// 434 /// struct rpc_gss3_list_args { 435 /// rpc_gss3_list_item list_what<>; 436 /// }; 437 /// 438 /// union rpc_gss3_list_item_u 439 /// switch (rpc_gss3_list_item itype) { 440 /// case DOI: 441 /// rpc_gss3_doi dois<>; 442 /// case PRIV: 443 /// string privs<>; 444 /// case PRIV_GROUP: 445 /// string priv_groups<>; 446 /// default: 447 /// opaque ext<>; 448 /// }; 449 /// 450 /// typedef rpc_gss3_list_item_u rpc_gss3_list_res<>; 452 The rpc_gss_cred_vers_3_t type is used in much the same way that 453 rpc_gss_cred_vers_1_t is used in RPCSEC_GSSv1, that is: as the arm of 454 the rpc_gss_cred_t discriminated union corresponding to version 3 455 (RPCSEC_GSS_VERS_3). It differs from rpc_gss_cred_vers_1_t in that: 457 a. the values for gss_proc corresponding to control messages are 458 different, 460 b. the presence of a field indicating the version of RPCSEC_GSS used 461 to established the context handle used, if any. 463 RPC data messages using RPCSEC_GSSv3 context handles differ from 464 RPCSEC_GSSv1 only in that the version number used MUST be '3' instead 465 of '1' and, as described above, in that there is one more field in 466 the RPCSEC_GSS header to name the version of RPCSEC_GSS used to 467 establish the context handle used to protect this message. All other 468 protocol elements from RPCSEC_GSSv1-protected RPC data messages MUST 469 remain the same in v3 as in v1. 471 RPCSEC_GSSv3 control messages are the same as RPCSEC_GSSv3 data 472 messages, but with a gss_proc value that indicates a control message 473 is contained in the data payload. 475 2.1. Control messages 477 There are two RPCSEC_GSSv3 control messages: RPCSEC_GSS3_CREATE and 478 RPCSEC_GSS3_LIST. 480 The client MUST use one of the following security services to protect 481 any RPCSEC_GSSv3 control message: 483 o rpc_gss_svc_channel_prot (see RPCSEC_GSSv2) 485 o rpc_gss_svc_integrity 487 o rpc_gss_svc_privacy 489 Specifically the client MUST NOT use rpc_gss_svc_none. 491 2.1.1. New auth_stat values 493 RPCSEC_GSSv3 requires the addition of several values to the auth_stat 494 enumerated type definition: 496 enum auth_stat { 497 ... 498 /* 499 * RPCSEC_GSS errors 500 */ 501 RPCSEC_GSS3_COMPOUND_PROBEM = <>, 502 RPCSEC_GSS3_LABEL_PROBLEM = <>, 503 RPCSEC_GSS3_IDENTITY_PROBLEM = <> 504 RPCSEC_GSS3_UNKNOWN_ASSERTION = <> 505 RPCSEC_GSS3_UNKNOWN_EXTENSION = <> 506 RPCSEC_GSS3_UNKNOWN_MESSAGE = <> 507 }; 509 XXX: fix above into YYY. All the entries are TBD... 511 2.1.2. Create request 513 The RPCSEC_GSS3_CREATE call message consists of inputs to bind into a 514 new RPCSEC_GSSv3 handle. The context handle used to protect the 515 RPCSEC_GSS3_CREATE call message is termed the "parent" (or "outer") 516 handle. The reply to this message consists of either an error or a 517 new RPCSEC_GSSv3 handle, termed the "child" handle. 519 All uses of a child context handle MUST use the GSS-API security 520 context associated with the parent context handle of the 521 RPCSEC_GSS3_CREATE request that produced the child context handle. 522 The child context, however, has its own sequence number space and 523 window, distinct from that of the parent. 525 As described in the introduction, the RPCSEC_GSS3_CREATE call message 526 binds one or more items of several kinds into a new RPCSEC_GSSv3 527 context handle: 529 o another RPCSEC_GSS (version 1, 2, or 3) context handle 531 o a channel binding 533 o authorization assertions (label, privileges) 535 o identity assertions 537 Servers MUST either ignore, reject or apply policy to the 538 authorization and identity assertions. Policies should take into 539 account the identity of the client and/or user as authenticated via 540 the GSS-API. Server implementation and policy MAY result in labels, 541 privileges and identities being mapped to concepts and values that 542 are local to the server. 544 2.1.2.1. Compound authentication 546 RPCSEC_GSSv3 allows for compound authentication of client hosts and 547 users to servers. This is done by using an integrity protected 548 RPCSEC_GSSv3 message of RPCSEC_GSS3_CREATE type which includes a 549 reference to the context handle to bind, a nonce and a MIC of that 550 nonce using the GSS-API security context associated with the named 551 context handle. We'll term the two context handles "parent" (or 552 "outer") and "inner," and the resulting context handle the "child" 553 handle, where the outer context handle is the context handle 554 providing integrity protection to the RPCSEC_GSS3_CREATE message, and 555 the inner context handle is the one referenced via the 556 compound_binding field of the RPCSEC_GSS3_CREATE arguments structure 557 (rpc_gss3_create_args). 559 All uses of a child context handle that is bound to an inner context 560 MUST be treated as speaking for the initiator principal (as modified 561 by any assertions in the RPCSEC_GSS3_CREATE message) of the inner 562 context handle's GSS-API security context. 564 This feature is needed, for example, when a client wishes to use 565 authority assertions that the server may only grant if a user and a 566 client are authenticated together to the server. Thus a server may 567 refuse to grant requested authority to a user acting alone (e.g., via 568 an unprivileged user-space program), but may grant requested 569 authority to a client acting on behalf of a user if the server trusts 570 the client. 572 It is assumed that an unprivileged user-space program would not have 573 access to client host credentials needed to establish a GSS-API 574 security context authenticating the client to the server, therefore 575 an unprivileged user-space program could not create an RPCSEC_GSSv3 576 RPCSEC_GSS3_CREATE message that successfully binds a client and a 577 user security context. 579 Clients using RPCSEC_GSS context binding MUST use, as the outer 580 context handle, an RPCSEC_GSS context handle that corresponds to a 581 GSS-API security context that authenticates the client host, and for 582 the inner context handle it SHOULD use a context handle to 583 authenticates a user. The reverse (outer handle authenticates user, 584 inner authenticates client) MUST NOT be used. Other compounds might 585 eventually make sense. 587 An RPCSEC_GSSv3 context handle that is bound to another RPCSEC_GSS 588 context MUST be treated by servers as authenticating the GSS-API 589 initiator principal authenticated by the inner context handle's GSS- 590 API security context. This principal may be mapped to a server-side 591 notion of user or principal as modified by any identity assertions by 592 the client in the same RPCSEC_GSS3_CREATE request that the server 593 accepts. 595 2.1.2.2. Channel binding 597 RPCSEC_GSSv3 provides a different way to do channel binding than 598 RPCSEC_GSSv2. Specifically: 600 a. RPCSEC_GSSv3 builds on RPCSEC_GSSv1 by reusing existing, 601 established context handles rather than providing a different RPC 602 security flavor for establishing context handles, 604 b. channel bindings data are not hashed because the community now 605 agrees that it is the secure channel's responsibility to produce 606 channel bindings data of manageable size. 608 (a) is useful in keeping RPCSEC_GSSv3 simple in general, not just for 609 channel binding. (b) is useful in keeping RPCSEC_GSSv3 simple 610 specifically for channel binding. 612 Channel binding is accomplished as follows. The client prefixes the 613 channel bindings data octet string with the channel type as described 614 in [5], then the client calls GSS_GetMIC() to get a MIC of resulting 615 octet string, using the outer RPCSEC_GSS context handle's GSS-API 616 security context. The MIC is then placed in the chan_binding_mic 617 field of RPCSEC_GSS3_CREATE arguments (rpc_gss3_create_args). 619 If the chan_binding_mic field of the arguments of a 620 RPCSEC_GSS3_CREATE control message is set, then the server MUST 621 verify the client's channel binding MIC if the server supports this 622 feature. If channel binding verification succeeds then the server 623 MUST generate a new MIC of the same channel bindings and place it in 624 the chan_binding_mic field of the RPCSEC_GSS3_CREATE results. If 625 channel binding verification fails or the server doesn't support 626 channel binding then the server MUST indicate this in its reply by 627 not including a chan_binding_mic value (chan_binding_mic is an 628 optional field). 630 The client MUST verify the result's chan_binding_mic value, if the 631 server included it, by calling GSS_VerifyMIC() with the given MIC and 632 the channel bindings data (including the channel type prefix). If 633 client-side channel binding verification fails then the client MUST 634 call RPCSEC_GSS3_DESTROY. If the client requested channel binding 635 but the server did not include a chan_binding_mic field in the 636 results, then the client MAY continue to use the resulting context 637 handle as though channel binding had never been requested, otherwise 638 (if the client really wanted channel binding) it MUST call 639 RPCSEC_GSS3_DESTROY. 641 As per-RPCSEC_GSSv2: 643 o "Once a successful [channel binding] procedure has been performed 644 on an [RPCSEC_GSSv3] context handle, the initiator's 645 implementation may map application requests for rpc_gss_svc_none 646 and rpc_gss_svc_integrity to rpc_gss_svc_channel_prot credentials. 647 And if the secure channel has privacy enabled, requests for 648 rpc_gss_svc_privacy can also be mapped to 649 rpc_gss_svc_channel_prot." 651 o ... 653 Any RPCSEC_GSSv3 context handle that has been bound to a secure 654 channel in this way SHOULD be used only with the 655 rpc_gss_svc_channel_prot, and SHOULD NOT be used with 656 rpc_gss_svc_none nor rpc_gss_svc_integrity -- if the secure channel 657 does not provide privacy protection then the client MAY use 658 rpc_gss_svc_privacy where privacy protection is needed or desired. 660 2.1.2.3. Label assertions 662 RPCSEC_GSSv3 clients MAY assert a security label in some DOI by 663 binding this assertion into an RPCSEC_GSSv3 context handle. This is 664 done by including an assertion of type rpc_gss3_label in the 665 'assertions' field (discriminant: 'LABEL') of the RPCSEC_GSS3_CREATE 666 arguments to the desired DOI and label. 668 Label encoding is specific to each DOI and not described herein. DOI 669 encoding is TBD [fill in... Solaris uses integers to name DOIs, and 670 there is an IANA registry of DOIs as 32-bit integers, and IPsec 671 (whence the IANA registry) and CALIPSO use 32-bit integers for DOIs 672 as well. So a 32-bit unsinged integer seems to be the way to go. 673 Add references... -Nico] 675 If a label itself requires privacy protection (i.e., that the user 676 can assert that label is a secret) then the client MUST use the 677 rpc_gss_svc_privacy protection service for the RPCSEC_GSS3_CREATE 678 request or, if the parent handle is bound to a secure channel that 679 provides privacy protection, rpc_gss_svc_channel_prot. 681 If a client wants to ensure that the server understands the asserted 682 label then it MUST set the 'critical' field of the label assertion to 683 TRUE, otherwise it MUST set it to FALSE. 685 Servers that don't support labeling MUST ignore non-critical label 686 assertions. Servers that don't support the requested DOI MUST either 687 ignore non-critical label assertions or map them to a suitable label 688 in a supported DOI. Servers that don't support labeling or don't 689 support the requested DOI MUST return an error if the label request 690 is critical. Servers that support labeling in the requested DOI MAY 691 map the requested label to different label as a result of server-side 692 policy evaluation. 694 2.1.2.4. Privilege assertions 696 Privilege assertions are similar to label assertions, except that 697 there is no DOI, and the privileges supported are specified by the 698 RPC application. 700 Privileges are encoded US-ASCII strings containing comma-separated 701 privilege names, as well as up to one privilege group name and zero 702 or more exclusions, where each exclusion is a privilege name or 703 privilege group name prefixed with an exclamation point. Two special 704 privilege group names are defined here: "all" (which represents all 705 possible privileges) and "basic" (which represents privileges 706 normally granted to all users). 708 RPC applications that wish to use this facility must define the set 709 of known privileges, and must specify which privileges are in the 710 "basic" privilege group. For example, NFSv4 might specify privileges 711 for reading, writing, chowning, linking, etcetera. 713 2.1.2.5. Identity assertions 715 Identity assertions can be used either to modify the set of groups 716 assigned on the server-side to a given user (authenticated by the 717 GSS-API) or to implement an AUTH_SYS-like [4]. In the latter case 718 the client specifies at least a user-name and possibly groups that it 719 thinks the user belongs to. 721 Clients may set a username, a group list, and/or lists of groups to 722 be added or removed from the group list that the server would 723 normally use for the given user. 725 The server MUST decide whether to accept identity assertions by 726 applying local policy. Such policies is not described herein. 727 Example policies: 729 o "always accept identity assertions" 731 o "always accept identity assertions where the identities are 732 understood" 734 o "accept identity assertions ... only from trusted clients" (where 735 the identity of the client is taken from the initiator principal 736 of the outer context handle's GSS-API security context, or from 737 the network address of the client...) 739 o "accept identity assertions ... only from trusted clients where 740 IPsec policy protects this application's packet flows between the 741 clients and this server" 743 o "accept only removals of groups from a user's group membership 744 list as determined by the server" 746 o "never accept identity assertions" 748 o etcetera 750 Clients may mark an identity assertion as being critical, in which 751 case the server MUST respond with an error if the server does not 752 accept the identity assertion as-is. 754 The representation of users and groups is not given here, but is left 755 to the application. It is expected that RPCSEC_GSSv3 identity 756 assertions in the context of the NFSv4 application would consist of 757 NFSv4 user and group representations as used on the wire in NFSv4 758 access control lists (ACLs). 760 2.1.2.6. Server assertions 762 Servers MAY inform clients of assertions were granted by setting the 763 'granted_assertions' field of the RPCSEC_GSS3_CREATE reply. 765 The protocol provides a field ('server_assertions') for servers to 766 make assertions about themselves. At this time there is not much use 767 for this field, though servers MAY assert a single security label, 768 indicating that all contents on the server is at that label. The 769 client MUST, of course, either evaluate or ignore any server-side 770 assertions. 772 2.1.3. Context handle destruction 774 The RPCSEC_GSS3_DESTROY procedure is the same as for RPCSEC_GSSv1, 775 but with the version 3 header. 777 2.1.4. List request 779 The RPCSEC_GSS3_LIST call message consists of a single integer 780 indicating what should be listed, and the reply consists of an error 781 or the requested list. 783 The client may list DOIs, privilege names, or privilege group names. 785 The result is an opaque octet string containing a list of DOIs 786 [encoding TBD] or a US-ASCII string containing a comma-separated list 787 of privilege names or privilege group names. 789 2.1.5. Extensibility 791 Assertion types may be added in the future by adding arms to the 792 'rpc_gss3_assertion_u' union. Every assertion has a 'critical' flag 793 that can be used to indicate criticality. 795 New fields may be added through the 'extensions' typed hole. All 796 such extensions have a 'critical' flag. 798 New message types may be added. 800 Clients receiving unknown critical server assertions MUST destroy the 801 established RPCSEC_GSSv3 context handle. Servers receiving unknown 802 critical client assertions or unknown RPCSEC_GSS_v3 extensions MUST 803 return an error. 805 There is no IANA or other registry for RPCSEC_GSSv3 extensions. All 806 extensions MUST be done by IETF Protocol Action. 808 3. Privileges and identity representation for NFSv4 810 The representation of users and groups for use in identity assertions 811 in RPCSEC_GSSv3 SHALL be the same as the user and group 812 representations used by NFSv4 for access control list subjects on the 813 wire, cast as an octet string ("opaque"). 815 The following privileges are defined for use with the NFSv4 protocol: 817 file_chown Generally allows the caller to change a file's owner 818 regardless of who owns the file. 820 file_chown_self Generally allows the caller to change the owner of a 821 file it owns. 823 file_dac_execute Generally allows the caller to read any file for 824 execution. 826 file_dac_read Generally allows the caller to read any file or 827 directory. 829 file_dac_search Generally allows the caller to search any directory. 831 file_dac_write Generally allows the caller to write to any file (or 832 create/delete/link objects in directories). 834 file_link_any Generally allows the caller to create hardlinks to 835 files not owned by the caller. 837 file_owner Generally allows the caller to modify the access, 838 modification and other timestamps of a filesystem object, as well 839 as its permissions and ACL. 841 file_setid Generally allows the caller to set the set-user-ID and 842 set-group-ID bits of a file. 844 file_downgrade_sl Generally allows the caller to downgrade the 845 security label of a filesystem object. 847 file_update_sl Generally allows the caller to upgrade the security 848 label of a filesystem object. 850 [What about NFSv3? The representation of privs would be the same for 851 v3 as for v4, though there'd be no privs for dealing with labels 852 (file_downgrade_sl and file_update_sl). And the representation of 853 users/groups would NFSv3's representation thereof. But should we 854 bother to specify this? -Nico] 856 [Also, this is derived from Solaris' notion of privileges. We should 857 look at how well this scheme relates to other operating systems as 858 NFSv4 clients and servers. -Nico] 860 The contents of the 'basic' privilege set is not defined herein. 861 Note that 'file_link_any' and 'file_chown_self' may be present in the 862 server's notion of the basic privilege set. 864 The NFSv4-specific privileges may be limited by the server in ways 865 not specified above. For example, the server may deny access for 866 certain operations that would normally be granted given the granted 867 assertion of a given privilege (e.g., "no one may write to files 868 owned by such and such user"), or the server may require that all 869 privileges be asserted (and granted, of course) in order to allow 870 certain operations (e.g., "all privileges are required in order to 871 write to files owned by such and such user, not just 872 file_dac_write"). 874 4. Security Considerations 876 This entire document deals with security issues. 878 The RPCSEC_GSSv3 protocol allows for client-side assertions of data 879 that is relevant to server-side authorization decisions. These 880 assertions must be evaludated by the server in the context of whether 881 the client and/or user are authenticated, whether compound 882 authentication was used, whether the client is trusted, what ranges 883 of assertions are allowed for the client and the user (separately or 884 together), and any relevant server-side policy. 886 The security semantics of assertions carried by RPCSEC_GSSv3 are 887 application protocol-specific. 889 RPCSEC_GSSv3 supports a notion of critical assertions (and 890 extensions), but there's no need for peers to tell each other what 891 assertions were granted, or what they were mapped to. 893 Note that RPSEC_GSSv3 is not a complete solution for labeling: it 894 conveys the labels of actors, but not the labels of objects. RPC 895 application protocols may require extending in order to carry object 896 label information. 898 The RPCSEC_GSSv3 protocol also provides for a replacement of the old 899 AUTH_SYS RPC authentication flavor. AUTH_SYS relies on "privileged 900 port numbers" for "authentication," and was quite limited in what 901 assertions it supported and incompatible with NFSv4 representations 902 of identity. To replace AUTH_SYS with RPCSEC_GSSv3 simply use a GSS- 903 API mechanism to authenticate the client (but not the user) and let 904 the client assert the user's identity. This is more secure than 905 AUTH_SYS in that at least the client can be strongly authenticated 906 using GSS-API mechanisms, and it is more functional than AUTH_SYS in 907 that identity representations are defined by the application layer. 909 It is possible that a GSS-API mechanism that does not provide any 910 security services could be created so as to make it possible to 911 replace AUTH_SYS with RPCSEC_GSSv3 while retaining the same 912 privileged port semantics. Such a mechanism is out of scope for this 913 document and would have its own security considerations. 915 There may be interactions with NFSv4's callback security scheme and 916 NFSv4.1's GSS-API "SSV" mechanisms. Specifically, the NFSv4 callback 917 scheme requires that the server initiate GSS-API security contexts, 918 which does not work well in practice, and in the context of client- 919 side processes running as the same user but with different privileges 920 and security labels the NFSv4 callback security scheme seems 921 particularly unlikely to work well. NFSv4.1 has the server use an 922 existing, client-initiated RPCSEC_GSS context handle to protect 923 server-initiated callback RPCs. The NFSv4.1 callback security scheme 924 lacks all the problems of the NFSv4 scheme, however, it is important 925 that the server pick an appropriate RPCSEC_GSS context handle to 926 protect any callbacks. Specifically, it is important that the server 927 use RPCSEC_GSS context handles which authenticate the client to 928 protect any callbacks relating to server state initiated by RPCs 929 protected by RPCSEC_GSSv3 contexts. [Add text about interaction with 930 GSS-SSV...] 932 [Anything else?] 934 5. IANA Considerations 936 This section uses terms that are defined in [8]. 938 There are no IANA considerations in this document. TBDs in this 939 document will be assigned by the ONC RPC registrart (which is not 940 IANA, XXX: verify). 942 6. Normative References 944 [1] Bradner, S., "Key words for use in RFCs to Indicate Requirement 945 Levels", March 1997. 947 [2] Eisler, M., Chiu, A., and L. Ling, "RPCSEC_GSS Protocol 948 Specification", RFC 2203, September 1997. 950 [3] Linn, J., "Generic Security Service Application Program 951 Interface Version 2, Update 1", RFC 2743, January 2000. 953 [4] Srinivasan, R., "RPC: Remote Procedure Call Protocol 954 Specification Version 2", RFC 1831, August 1995. 956 [5] Williams, N., "On the Use of Channel Bindings to Secure 957 Channels", RFC 5056, November 2007. 959 [6] Haynes, T. and D. Noveck, "Network File System (NFS) version 4 960 Protocol", draft-ietf-nfsv4-rfc3530bis-09 (Work In Progress), 961 March 2011. 963 [7] Eisler, M., "XDR: External Data Representation Standard", 964 RFC 4506, May 2006. 966 [8] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA 967 Considerations Section in RFCs", BCP 26, RFC 5226, May 2008. 969 [9] Shepler, S., Eisler, M., and D. Noveck, "Network File System 970 (NFS) Version 4 Minor Version 1 Protocol", RFC 5661, 971 January 2010. 973 Appendix A. Acknowledgments 975 Appendix B. RFC Editor Notes 977 [RFC Editor: please remove this section prior to publishing this 978 document as an RFC] 980 [RFC Editor: prior to publishing this document as an RFC, please 981 replace all occurrences of RFCTBD10 with RFCxxxx where xxxx is the 982 RFC number of this document] 984 Authors' Addresses 986 Thomas Haynes 987 NetApp 988 9110 E 66th St 989 Tulsa, OK 74133 990 USA 992 Phone: +1 918 307 1415 993 Email: thomas@netapp.com 994 Nico Williams 995 cryptonector.com 996 13115 Tamayo Dr 997 Austin, TX 78729 998 USA 1000 Email: nico@cryptonector.com