Debian Codegraph @

rfc7861.html

raw
1 <pre>Internet Engineering Task Force (IETF) W. Adamson
2 Request for Comments: 7861 NetApp
3 Updates: <a href="./rfc5403">5403</a> N. Williams
4 Category: Standards Track Cryptonector
5 ISSN: 2070-1721 November 2016
6
7
8 <span class="h1">Remote Procedure Call (RPC) Security Version 3</span>
9
10 Abstract
11
12 This document specifies version 3 of the Remote Procedure Call (RPC)
13 security protocol (RPCSEC_GSS). This protocol provides support for
14 multi-principal authentication of client hosts and user principals to
15 a server (constructed by generic composition), security label
16 assertions for multi-level security and type enforcement, structured
17 privilege assertions, and channel bindings. This document updates
18 <a href="./rfc5403">RFC 5403</a>.
19
20 Status of This Memo
21
22 This is an Internet Standards Track document.
23
24 This document is a product of the Internet Engineering Task Force
25 (IETF). It represents the consensus of the IETF community. It has
26 received public review and has been approved for publication by the
27 Internet Engineering Steering Group (IESG). Further information on
28 Internet Standards is available in <a href="./rfc7841#section-2">Section&nbsp;2 of RFC 7841</a>.
29
30 Information about the current status of this document, any errata,
31 and how to provide feedback on it may be obtained at
32 <a href="http://www.rfc-editor.org/info/rfc7861">http://www.rfc-editor.org/info/rfc7861</a>.
33
34 Copyright Notice
35
36 Copyright (c) 2016 IETF Trust and the persons identified as the
37 document authors. All rights reserved.
38
39 This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
40 Provisions Relating to IETF Documents
41 (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of
42 publication of this document. Please review these documents
43 carefully, as they describe your rights and restrictions with respect
44 to this document. Code Components extracted from this document must
45 include Simplified BSD License text as described in Section 4.e of
46 the Trust Legal Provisions and are provided without warranty as
47 described in the Simplified BSD License.
48
49
50
51
52 <span class="grey">Adamson &amp; Williams Standards Track [Page 1]</span></pre>
53 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
54 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
55
56
57 Table of Contents
58
59 <a href="#section-1">1</a>. Introduction and Motivation .....................................<a href="#page-2">2</a>
60 <a href="#section-1.1">1.1</a>. Requirements Language ......................................<a href="#page-3">3</a>
61 <a href="#section-1.2">1.2</a>. Added Functionality ........................................<a href="#page-4">4</a>
62 <a href="#section-1.3">1.3</a>. XDR Code Extraction ........................................<a href="#page-5">5</a>
63 <a href="#section-2">2</a>. The RPCSEC_GSSv3 Protocol .......................................<a href="#page-6">6</a>
64 <a href="#section-2.1">2.1</a>. Compatibility with RPCSEC_GSSv2 ............................<a href="#page-6">6</a>
65 <a href="#section-2.2">2.2</a>. Version Negotiation ........................................<a href="#page-6">6</a>
66 <a href="#section-2.3">2.3</a>. New Reply Verifier .........................................<a href="#page-7">7</a>
67 <a href="#section-2.4">2.4</a>. XDR Code Preliminaries .....................................<a href="#page-8">8</a>
68 <a href="#section-2.5">2.5</a>. RPCSEC_GSS_BIND_CHANNEL Operation .........................<a href="#page-10">10</a>
69 <a href="#section-2.6">2.6</a>. New auth_stat Values ......................................<a href="#page-10">10</a>
70 <a href="#section-2.7">2.7</a>. New Control Procedures ....................................<a href="#page-10">10</a>
71 <a href="#section-2.7.1">2.7.1</a>. New Control Procedure - RPCSEC_GSS_CREATE ..........<a href="#page-12">12</a>
72 <a href="#section-2.7.2">2.7.2</a>. New Control Procedure - RPCSEC_GSS_LIST ............<a href="#page-20">20</a>
73 <a href="#section-2.8">2.8</a>. Extensibility .............................................<a href="#page-21">21</a>
74 <a href="#section-3">3</a>. Operational Recommendation for Deployment ......................<a href="#page-21">21</a>
75 <a href="#section-4">4</a>. Security Considerations ........................................<a href="#page-21">21</a>
76 <a href="#section-5">5</a>. IANA Considerations ............................................<a href="#page-22">22</a>
77 <a href="#section-5.1">5.1</a>. New RPC Authentication Status Numbers .....................<a href="#page-22">22</a>
78 <a href="#section-5.2">5.2</a>. Structured Privilege Name Definitions .....................<a href="#page-23">23</a>
79 <a href="#section-5.2.1">5.2.1</a>. Initial Registry ...................................<a href="#page-24">24</a>
80 <a href="#section-5.2.2">5.2.2</a>. Updating Registrations .............................<a href="#page-24">24</a>
81 <a href="#section-6">6</a>. References .....................................................<a href="#page-25">25</a>
82 <a href="#section-6.1">6.1</a>. Normative References ......................................<a href="#page-25">25</a>
83 <a href="#section-6.2">6.2</a>. Informative References ....................................<a href="#page-26">26</a>
84 Acknowledgments ...................................................<a href="#page-26">26</a>
85 Authors' Addresses ................................................<a href="#page-26">26</a>
86
87 <span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction and Motivation</span>
88
89 The original Remote Procedure Call (RPC) security protocol
90 (RPCSEC_GSS) [<a href="./rfc2203" title="&quot;RPCSEC_GSS Protocol Specification&quot;">RFC2203</a>] provided for authentication of RPC clients and
91 servers to each other using the Generic Security Service Application
92 Programming Interface (GSS-API) [<a href="./rfc2743" title="&quot;Generic Security Service Application Program Interface Version 2, Update 1&quot;">RFC2743</a>]. The second version of
93 RPCSEC_GSS [<a href="./rfc5403" title="&quot;RPCSEC_GSS Version 2&quot;">RFC5403</a>] added support for channel bindings [<a href="./rfc5056" title="&quot;On the Use of Channel Bindings to Secure Channels&quot;">RFC5056</a>].
94
95 Existing GSS-API mechanisms are insufficient for communicating
96 certain authorization and authentication information to a server.
97 The GSS-API and its mechanisms certainly could be extended to address
98 this shortcoming. However, it is addressed here at the application
99 layer, i.e., in RPCSEC_GSS.
100
101 A major motivation for version 3 of RPCSEC_GSS (RPCSEC_GSSv3) is to
102 add support for multi-level (labeled) security and server-side copy
103 for NFSv4.
104
105
106
107
108 <span class="grey">Adamson &amp; Williams Standards Track [Page 2]</span></pre>
109 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
110 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
111
112
113 Multi-Level Security (MLS) is a traditional model where subjects
114 (processes) are given a security level (Unclassified, Secret,
115 Top Secret, etc.) and objects (files) are given security labels that
116 mandate the access of the subject to the object (see <a href="./rfc7862#section-9.1">Section&nbsp;9.1 of
117 [RFC7862]</a>).
118
119 Labeled NFS (see <a href="./rfc7862#section-9">Section&nbsp;9 of [RFC7862]</a>) uses an MLS policy with
120 Mandatory Access Control (MAC) systems as defined in [<a href="./rfc4949" title="&quot;Internet Security Glossary, Version 2&quot;">RFC4949</a>].
121 Labeled NFS stores MAC file object labels on the NFS server and
122 enables client Guest Mode MAC as described in <a href="./rfc7862#section-9.5.3">Section&nbsp;9.5.3 of
123 [RFC7862]</a>. RPCSEC_GSSv3 label assertions assert client MAC process
124 subject labels to enable Full Mode MAC when combined with Labeled NFS
125 as described in <a href="./rfc7862#section-9.5.1">Section&nbsp;9.5.1 of [RFC7862]</a>.
126
127 A traditional inter-server file copy entails the user gaining access
128 to a file on the source, reading it, and writing it to a file on the
129 destination. In secure NFSv4 inter-server server-side copy (see
130 <a href="./rfc7862#section-4">Section&nbsp;4 of [RFC7862]</a>), the user first secures access to both source
131 and destination files and then uses NFSv4.2-defined RPCSEC_GSSv3
132 structured privileges to authorize the destination to copy the file
133 from the source on behalf of the user.
134
135 Multi-principal authentication can be used to address shared cache
136 poisoning attacks (see Section 9 of [<a href="#ref-AFS-RXGK">AFS-RXGK</a>]) on the client cache
137 by a user. As described in Section 7 of [<a href="#ref-AFS-RXGK">AFS-RXGK</a>], multi-user
138 machines with a single cache manager can fetch and cache data on a
139 user's behalf and re-display it for another user from the cache
140 without refetching the data from the server. The initial data
141 acquisition is authenticated by the first user's credentials, and if
142 only that user's credentials are used, it may be possible for a
143 malicious user or users to "poison" the cache for other users by
144 introducing bogus data into the cache.
145
146 Another use of the multi-principal assertion is the secure conveyance
147 of privilege information for processes running with more (or even
148 with less) privilege than the user normally would be accorded.
149
150 <span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>. Requirements Language</span>
151
152 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
153 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
154 document are to be interpreted as described in <a href="./rfc2119">RFC 2119</a> [<a href="./rfc2119" title="&quot;Key words for use in RFCs to Indicate Requirement Levels&quot;">RFC2119</a>].
155
156
157
158
159
160
161
162
163
164 <span class="grey">Adamson &amp; Williams Standards Track [Page 3]</span></pre>
165 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
166 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
167
168
169 <span class="h3"><a class="selflink" id="section-1.2" href="#section-1.2">1.2</a>. Added Functionality</span>
170
171 RPCSEC_GSS version 3 (RPCSEC_GSSv3) is the same as RPCSEC_GSSv2
172 [<a href="./rfc5403" title="&quot;RPCSEC_GSS Version 2&quot;">RFC5403</a>], except that the following assertions of authority have
173 been added:
174
175 o Security labels for Full Mode security type enforcement, and other
176 labeled security models (see <a href="./rfc7862#section-9.5.1">Section&nbsp;9.5.1 of [RFC7862]</a>).
177
178 o Application-specific structured privileges. These allow an RPC
179 application client to pass structured information to the
180 corresponding application code in a server to control the use of
181 the privilege and/or the conditions in which the privilege may be
182 exercised. For an example, see server-side copy as described in
183 [<a href="./rfc7862" title="&quot;Network File System (NFS) Version 4 Minor Version 2 Protocol&quot;">RFC7862</a>].
184
185 o Multi-principal authentication of the client host and user to the
186 server, done by binding two RPCSEC_GSS handles.
187
188 o Simplified channel binding.
189
190 Assertions of labels and privileges are evaluated by the server,
191 which may then map the asserted values to other values, all according
192 to server-side policy. See [<a href="./rfc7862" title="&quot;Network File System (NFS) Version 4 Minor Version 2 Protocol&quot;">RFC7862</a>].
193
194 An option for enumerating server-supported Label Format Specifiers
195 (LFSs) is provided. See <a href="./rfc7862#section-9.1">Section&nbsp;9.1 of [RFC7862]</a>.
196
197 Note that there is no RPCSEC_GSS_CREATE payload that is REQUIRED to
198 implement. RPCSEC_GSSv3 implementations are feature driven. Besides
199 implementing the RPCSEC_GSS_CREATE operation and payloads for the
200 desired features, all RPCSEC_GSSv3 implementations MUST implement:
201
202 o The new RPCSEC_GSS version number (<a href="#section-2.2">Section 2.2</a>).
203
204 o The new reply verifier (<a href="#section-2.3">Section 2.3</a>).
205
206 o The new auth_stat values (<a href="#section-2.6">Section 2.6</a>).
207
208
209
210
211
212
213
214
215
216
217
218
219
220 <span class="grey">Adamson &amp; Williams Standards Track [Page 4]</span></pre>
221 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
222 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
223
224
225 RPCSEC_GSSv3 targets implementing a desired feature MUST also
226 implement the RPCSEC_GSS_LIST operation, and the RPCSEC_GSS_CREATE
227 operation replies for unsupported features as follows:
228
229 o For label assertions, the target indicates no support by returning
230 the new RPCSEC_GSS_LABEL_PROBLEM auth_stat value (see
231 <a href="#section-2.7.1.3">Section 2.7.1.3</a>).
232
233 o For structured privilege assertions, the target indicates no
234 support by returning the new RPCSEC_GSS_UNKNOWN_MESSAGE auth_stat
235 value (see <a href="#section-2.7.1.4">Section 2.7.1.4</a>).
236
237 o For multi-principal authentication (<a href="#section-2.7.1.1">Section 2.7.1.1</a>), the target
238 indicates no support by not including an rgss3_gss_mp_auth value
239 in the rgss3_create_res.
240
241 o For channel bindings (<a href="#section-2.7.1.2">Section 2.7.1.2</a>), the target indicates no
242 support by not including an rgss3_chan_binding value in the
243 rgss3_create_res.
244
245 <span class="h3"><a class="selflink" id="section-1.3" href="#section-1.3">1.3</a>. XDR Code Extraction</span>
246
247 This document contains the External Data Representation (XDR)
248 [<a href="./rfc4506" title="&quot;XDR: External Data Representation Standard&quot;">RFC4506</a>] definitions for the RPCSEC_GSSv3 protocol. The XDR
249 description is provided in this document in a way that makes it
250 simple for the reader to extract it into a form that is ready to
251 compile. The reader can feed this document in the following shell
252 script to produce the machine-readable XDR description of
253 RPCSEC_GSSv3:
254
255 &lt;CODE BEGINS&gt;
256
257 #!/bin/sh
258 grep "^ *///" | sed 's?^ */// ??' | sed 's?^ *///$??'
259
260 &lt;CODE ENDS&gt;
261
262 That is, if the above script is stored in a file called "extract.sh"
263 and this document is in a file called "spec.txt", then the reader
264 can do:
265
266 &lt;CODE BEGINS&gt;
267
268 sh extract.sh &lt; spec.txt &gt; rpcsec_gss_v3.x
269
270 &lt;CODE ENDS&gt;
271
272
273
274
275
276 <span class="grey">Adamson &amp; Williams Standards Track [Page 5]</span></pre>
277 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
278 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
279
280
281 The effect of the script is to remove leading white space from each
282 line, plus a sentinel sequence of "///".
283
284 <span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. The RPCSEC_GSSv3 Protocol</span>
285
286 RPCSEC_GSS version 3 (RPCSEC_GSSv3) is very similar to RPCSEC_GSS
287 version 2 (RPCSEC_GSSv2) [<a href="./rfc5403" title="&quot;RPCSEC_GSS Version 2&quot;">RFC5403</a>]. The difference is that the new
288 support for assertions and channel bindings is implemented via a
289 different mechanism.
290
291 The entire RPCSEC_GSSv3 protocol is not presented here. Only the
292 differences between RPCSEC_GSSv3 and RPCSEC_GSSv2 are shown.
293
294 RPCSEC_GSSv3 is implemented as follows:
295
296 o A client uses an existing RPCSEC_GSSv3 context handle established
297 in the usual manner (see <a href="./rfc2203#section-5.2">Section&nbsp;5.2 of [RFC2203]</a>) to protect
298 RPCSEC_GSSv3 exchanges; this will be termed the "parent" handle.
299
300 o The server issues a "child" RPCSEC_GSSv3 handle in the
301 RPCSEC_GSS_CREATE response, which uses the underlying GSS-API
302 security context of the parent handle in all subsequent exchanges
303 that use the child handle.
304
305 o An RPCSEC_GSSv3 child handle MUST NOT be used as the parent handle
306 in an RPCSEC_GSS3_CREATE control message.
307
308 <span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. Compatibility with RPCSEC_GSSv2</span>
309
310 The functionality of RPCSEC_GSSv2 [<a href="./rfc5403" title="&quot;RPCSEC_GSS Version 2&quot;">RFC5403</a>] is fully supported by
311 RPCSEC_GSSv3, with the exception of the RPCSEC_GSS_BIND_CHANNEL
312 operation, which is not supported when RPCSEC_GSSv3 is in use (see
313 <a href="#section-2.5">Section 2.5</a>).
314
315 <span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a>. Version Negotiation</span>
316
317 An initiator that supports version 3 of RPCSEC_GSS simply issues an
318 RPCSEC_GSS request with the rgc_version field set to
319 RPCSEC_GSS_VERS_3. If the target does not recognize
320 RPCSEC_GSS_VERS_3, the target will return an RPC error per
321 <a href="./rfc2203#section-5.1">Section&nbsp;5.1 of [RFC2203]</a>.
322
323 The initiator MUST NOT attempt to use an RPCSEC_GSS handle returned
324 by version 3 of a target with version 1 or version 2 of the same
325 target. The initiator MUST NOT attempt to use an RPCSEC_GSS handle
326 returned by version 1 or version 2 of a target with version 3 of the
327 same target.
328
329
330
331
332 <span class="grey">Adamson &amp; Williams Standards Track [Page 6]</span></pre>
333 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
334 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
335
336
337 <span class="h3"><a class="selflink" id="section-2.3" href="#section-2.3">2.3</a>. New Reply Verifier</span>
338
339 A new reply verifier is needed for RPCSEC_GSSv3 because of a
340 situation that arises from the use of the same GSS context by child
341 and parent handles. Because the RPCSEC_GSSv3 child handle uses the
342 same GSS context as the parent handle, a child and parent
343 RPCSEC_GSSv3 handle could have the same RPCSEC_GSS sequence numbers.
344 Since the reply verifier of previous versions of RPCSEC_GSS computes
345 a Message Integrity Code (MIC) on just the sequence number, this
346 provides opportunities for man-in-the-middle attacks.
347
348 This issue is addressed in RPCSEC_GSS version 3 by computing the
349 verifier using exactly the same input as the information used to
350 compute the request verifier, except that the mtype is changed from
351 CALL to REPLY. The new reply verifier computes a MIC over the
352 following RPC reply header data:
353
354 unsigned int xid;
355 msg_type mtype; /* set to REPLY */
356 unsigned int rpcvers;
357 unsigned int prog;
358 unsigned int vers;
359 unsigned int proc;
360 opaque_auth cred; /* binds the RPCSEC_GSS handle */
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388 <span class="grey">Adamson &amp; Williams Standards Track [Page 7]</span></pre>
389 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
390 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
391
392
393 <span class="h3"><a class="selflink" id="section-2.4" href="#section-2.4">2.4</a>. XDR Code Preliminaries</span>
394
395 The following code fragment replaces the corresponding preliminary
396 code shown in Figure 1 of [<a href="./rfc5403" title="&quot;RPCSEC_GSS Version 2&quot;">RFC5403</a>]. The values in the code fragment
397 in <a href="#section-2.6">Section 2.6</a> are additions to the auth_stat enumeration.
398 Subsequent code fragments are additions to the code for version 2
399 that support the new procedures defined in version 3.
400
401 &lt;CODE BEGINS&gt;
402
403 /// /*
404 /// * Copyright (c) 2016 IETF Trust and the persons
405 /// * identified as the authors. All rights reserved.
406 /// *
407 /// * The authors of the code are identified in <a href="./rfc2203">RFC 2203</a>,
408 /// * <a href="./rfc5403">RFC 5403</a>, and <a href="./rfc7861">RFC 7861</a>.
409 /// *
410 /// * Redistribution and use in source and binary forms,
411 /// * with or without modification, are permitted
412 /// * provided that the following conditions are met:
413 /// *
414 /// * o Redistributions of source code must retain the above
415 /// * copyright notice, this list of conditions and the
416 /// * following disclaimer.
417 /// *
418 /// * o Redistributions in binary form must reproduce the
419 /// * above copyright notice, this list of
420 /// * conditions and the following disclaimer in
421 /// * the documentation and/or other materials
422 /// * provided with the distribution.
423 /// *
424 /// * o Neither the name of Internet Society, IETF or IETF
425 /// * Trust, nor the names of specific contributors, may be
426 /// * used to endorse or promote products derived from this
427 /// * software without specific prior written permission.
428 /// *
429 /// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
430 /// * AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
431 /// * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
432 /// * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
433 /// * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
434 /// * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
435 /// * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
436 /// * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
437 /// * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
438 /// * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
439 /// * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
440 /// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
441
442
443
444 <span class="grey">Adamson &amp; Williams Standards Track [Page 8]</span></pre>
445 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
446 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
447
448
449 /// * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
450 /// * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
451 /// * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
452 /// */
453 ///
454 /// /*
455 /// * This code was derived from <a href="./rfc2203">RFC 2203</a>, <a href="./rfc5403">RFC 5403</a>,
456 /// * and <a href="./rfc7861">RFC 7861</a>. Please reproduce this note if possible.
457 /// */
458 ///
459 /// enum rpc_gss_service_t {
460 /// /* Note: The enumerated value for 0 is reserved. */
461 /// rpc_gss_svc_none = 1,
462 /// rpc_gss_svc_integrity = 2,
463 /// rpc_gss_svc_privacy = 3,
464 /// rpc_gss_svc_channel_prot = 4
465 /// };
466 ///
467 /// enum rpc_gss_proc_t {
468 /// RPCSEC_GSS_DATA = 0,
469 /// RPCSEC_GSS_INIT = 1,
470 /// RPCSEC_GSS_CONTINUE_INIT = 2,
471 /// RPCSEC_GSS_DESTROY = 3,
472 /// RPCSEC_GSS_BIND_CHANNEL = 4, /* Not used */
473 /// RPCSEC_GSS_CREATE = 5, /* New */
474 /// RPCSEC_GSS_LIST = 6 /* New */
475 /// };
476 ///
477 /// struct rpc_gss_cred_vers_1_t {
478 /// rpc_gss_proc_t gss_proc; /* Control procedure */
479 /// unsigned int seq_num; /* Sequence number */
480 /// rpc_gss_service_t service; /* Service used */
481 /// opaque handle&lt;&gt;; /* Context handle */
482 /// };
483 ///
484 /// const RPCSEC_GSS_VERS_1 = 1;
485 /// const RPCSEC_GSS_VERS_2 = 2;
486 /// const RPCSEC_GSS_VERS_3 = 3; /* New */
487 ///
488 /// union rpc_gss_cred_t switch (unsigned int rgc_version) {
489 /// case RPCSEC_GSS_VERS_1:
490 /// case RPCSEC_GSS_VERS_2:
491 /// case RPCSEC_GSS_VERS_3: /* New */
492 /// rpc_gss_cred_vers_1_t rgc_cred_v1;
493 /// };
494 ///
495
496 &lt;CODE ENDS&gt;
497
498
499
500 <span class="grey">Adamson &amp; Williams Standards Track [Page 9]</span></pre>
501 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
502 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
503
504
505 As seen above, the RPCSEC_GSSv3 credential has the same format as the
506 RPCSEC_GSSv1 [<a href="./rfc2203" title="&quot;RPCSEC_GSS Protocol Specification&quot;">RFC2203</a>] and RPCSEC_GSSv2 [<a href="./rfc5403" title="&quot;RPCSEC_GSS Version 2&quot;">RFC5403</a>] credential.
507 Setting the rgc_version field to 3 indicates that the initiator and
508 target support the new RPCSEC_GSSv3 control procedures.
509
510 <span class="h3"><a class="selflink" id="section-2.5" href="#section-2.5">2.5</a>. RPCSEC_GSS_BIND_CHANNEL Operation</span>
511
512 RPCSEC_GSSv3 provides a channel-binding assertion that replaces the
513 RPCSEC_GSSv2 RPCSEC_GSS_BIND_CHANNEL operation.
514
515 The RPCSEC_GSS_BIND_CHANNEL operation is not supported on RPCSEC_GSS
516 version 3 handles. If a server receives an RPCSEC_GSS_BIND_CHANNEL
517 operation on an RPCSEC_GSSv3 handle, it MUST return a reply status of
518 MSG_ACCEPTED with an accept_stat of PROC_UNAVAIL [<a href="./rfc5531" title="&quot;RPC: Remote Procedure Call Protocol Specification Version 2&quot;">RFC5531</a>].
519
520 <span class="h3"><a class="selflink" id="section-2.6" href="#section-2.6">2.6</a>. New auth_stat Values</span>
521
522 RPCSEC_GSSv3 requires the addition of several values to the auth_stat
523 enumerated type definition. The use of these new auth_stat values is
524 explained throughout this document.
525
526 enum auth_stat {
527 ...
528 /*
529 * RPCSEC_GSSv3 errors
530 */
531 RPCSEC_GSS_INNER_CREDPROBLEM = 15,
532 RPCSEC_GSS_LABEL_PROBLEM = 16,
533 RPCSEC_GSS_PRIVILEGE_PROBLEM = 17,
534 RPCSEC_GSS_UNKNOWN_MESSAGE = 18
535 };
536
537 <span class="h3"><a class="selflink" id="section-2.7" href="#section-2.7">2.7</a>. New Control Procedures</span>
538
539 There are two new RPCSEC_GSSv3 control procedures: RPCSEC_GSS_CREATE
540 and RPCSEC_GSS_LIST.
541
542 The RPCSEC_GSS_CREATE procedure binds any combination of assertions
543 -- multi-principal authentication, labels, structured privileges, or
544 channel bindings -- to a new RPCSEC_GSSv3 context returned in the
545 rgss3_create_res rcr_handle field.
546
547 The RPCSEC_GSS_LIST procedure queries the target for supported
548 assertions.
549
550
551
552
553
554
555
556 <span class="grey">Adamson &amp; Williams Standards Track [Page 10]</span></pre>
557 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
558 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
559
560
561 RPCSEC_GSS version 3 control messages are similar to the RPCSEC_GSS
562 version 1 and version 2 RPCSEC_GSS_DESTROY control message (see
563 <a href="./rfc2203#section-5.4">Section&nbsp;5.4 of [RFC2203]</a>) in that the sequence number in the request
564 must be valid and the header checksum in the verifier must be valid.
565 As in RPCSEC_GSS version 1 and version 2, the RPCSEC_GSS version 3
566 control messages may contain call data following the verifier in the
567 body of the NULLPROC procedure. In other words, they look a lot like
568 an RPCSEC_GSS data message with the header procedure set to NULLPROC.
569
570 The client MUST use one of the following security services to protect
571 the RPCSEC_GSS_CREATE or RPCSEC_GSS_LIST control message:
572
573 o rpc_gss_svc_integrity
574
575 o rpc_gss_svc_privacy
576
577 Specifically, the client MUST NOT use rpc_gss_svc_none.
578
579 RPCSEC_GSS_LIST can also use rpc_gss_svc_channel_prot (see
580 RPCSEC_GSSv2 [<a href="./rfc5403" title="&quot;RPCSEC_GSS Version 2&quot;">RFC5403</a>]) if the request is sent using an RPCSEC_GSSv3
581 child handle with channel bindings enabled as described in
582 <a href="#section-2.7.1.2">Section 2.7.1.2</a>.
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612 <span class="grey">Adamson &amp; Williams Standards Track [Page 11]</span></pre>
613 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
614 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
615
616
617 <span class="h4"><a class="selflink" id="section-2.7.1" href="#section-2.7.1">2.7.1</a>. New Control Procedure - RPCSEC_GSS_CREATE</span>
618
619 &lt;CODE BEGINS&gt;
620
621 /// struct rgss3_create_args {
622 /// rgss3_gss_mp_auth *rca_mp_auth;
623 /// rgss3_chan_binding *rca_chan_bind_mic;
624 /// rgss3_assertion_u rca_assertions&lt;&gt;;
625 /// };
626 ///
627 /// struct rgss3_create_res {
628 /// opaque rcr_handle&lt;&gt;;
629 /// rgss3_gss_mp_auth *rcr_mp_auth;
630 /// rgss3_chan_binding *rcr_chan_bind_mic;
631 /// rgss3_assertion_u rcr_assertions&lt;&gt;;
632 /// };
633 ///
634 /// enum rgss3_assertion_type {
635 /// LABEL = 0,
636 /// PRIVS = 1
637 /// };
638 ///
639 /// union rgss3_assertion_u
640 /// switch (rgss3_assertion_type atype) {
641 /// case LABEL:
642 /// rgss3_label rau_label;
643 /// case PRIVS:
644 /// rgss3_privs rau_privs;
645 /// default:
646 /// opaque rau_ext&lt;&gt;;
647 /// };
648 ///
649
650 &lt;CODE ENDS&gt;
651
652 The call data for an RPCSEC_GSS_CREATE request consists of an
653 rgss3_create_args, which binds one or more items of several kinds to
654 the returned rcr_handle RPCSEC_GSSv3 context handle (the child
655 handle):
656
657 o Multi-principal authentication: another RPCSEC_GSS context handle
658
659 o A channel binding
660
661 o Authorization assertions: labels and/or privileges
662
663
664
665
666
667
668 <span class="grey">Adamson &amp; Williams Standards Track [Page 12]</span></pre>
669 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
670 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
671
672
673 The reply to this message consists of either an error or an
674 rgss3_create_res structure. As noted in Sections <a href="#section-2.7.1.3">2.7.1.3</a> and
675 2.7.1.4, successful rgss3_assertions are enumerated in rcr_assertions
676 and are REQUIRED to be enumerated in the same order as they appeared
677 in the rca_assertions argument.
678
679 Upon a successful RPCSEC_GSS_CREATE, both the client and the server
680 need to associate the resultant child rcr_handle context handle with
681 the parent context handle in their GSS context caches so as to be
682 able to reference the parent context given the child context handle.
683
684 RPCSEC_GSSv3 child handles MUST be destroyed upon the destruction of
685 the associated parent handle.
686
687 Server implementation and policy MAY result in labels, privileges,
688 and identities being mapped to concepts and values that are local to
689 the server. Server policies should take into account the identity of
690 the client and/or user as authenticated via the GSS-API.
691
692 <span class="h5"><a class="selflink" id="section-2.7.1.1" href="#section-2.7.1.1">2.7.1.1</a>. Multi-Principal Authentication</span>
693
694 &lt;CODE BEGINS&gt;
695
696 ///
697 /// struct rgss3_gss_mp_auth {
698 /// opaque rgmp_handle&lt;&gt;; /* Inner handle */
699 /// opaque rgmp_rpcheader_mic&lt;&gt;;
700 /// };
701 ///
702
703 &lt;CODE ENDS&gt;
704
705 RPCSEC_GSSv3 clients MAY assert a multi-principal authentication of
706 the RPC client host principal and a user principal. This feature is
707 needed, for example, when an RPC client host wishes to use authority
708 assertions that the server may only grant if a user and an RPC client
709 host are authenticated together to the server. Thus, a server may
710 refuse to grant requested authority to a user acting alone (e.g., via
711 an unprivileged user-space program) or to an RPC client host acting
712 alone (e.g., when an RPC client host is acting on behalf of a user)
713 but may grant requested authority to an RPC client host acting on
714 behalf of a user if the server identifies the user and trusts the RPC
715 client host.
716
717
718
719
720
721
722
723
724 <span class="grey">Adamson &amp; Williams Standards Track [Page 13]</span></pre>
725 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
726 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
727
728
729 It is assumed that an unprivileged user-space program would not have
730 access to RPC client host credentials needed to establish a GSS-API
731 security context authenticating the RPC client host to the server;
732 therefore, an unprivileged user-space program could not create an
733 RPCSEC_GSSv3 RPCSEC_GSS_CREATE message that successfully binds an RPC
734 client host and a user security context.
735
736 In addition to the parent handle (<a href="#section-2">Section 2</a>), the multi-principal
737 authentication call data has an RPCSEC_GSS version 3 handle
738 referenced via the rgmp_handle field termed the "inner" handle.
739 Clients using RPCSEC_GSSv3 multi-principal authentication MUST use an
740 RPCSEC_GSSv3 context handle that corresponds to a GSS-API security
741 context that authenticates the RPC client host for the parent handle.
742 The inner context handle of the multi-principal authentication
743 assertion MUST use an RPCSEC_GSSv3 context handle that corresponds to
744 a GSS-API security context that authenticates the user. The reverse
745 (parent handle authenticates user, inner context handle authenticates
746 an RPC client host) MUST NOT be used. Other multi-principal parent
747 and inner context handle uses might eventually make sense, but they
748 would need to be introduced in a new revision of the RPCSEC_GSS
749 protocol.
750
751 The child context handle returned by a successful multi-principal
752 assertion binds the inner RPCSEC_GSSv3 context handle to the parent
753 RPCSEC_GSS context handle and MUST be treated by servers as
754 authenticating the GSS-API initiator principal authenticated by the
755 inner context handle's GSS-API security context. This principal may
756 be mapped to a server-side notion of user or principal.
757
758 Multi-principal binding is done by including an assertion of type
759 rgss3_gss_mp_auth in the RPCSEC_GSS_CREATE rgss3_create_args call
760 data. The inner context handle is placed in the rgmp_handle field.
761 A MIC of the RPC header, up to and including the credential, is
762 computed using the GSS-API security context associated with the inner
763 context handle and is placed in the rgmp_rpcheader_mic field. Note
764 that the rgmp_rpcheader_mic only identifies the client host GSS
765 context by its context handle (the parent context handle) in the RPC
766 header.
767
768 An RPCSEC_GSS_CREATE control procedure with a multi-principal
769 authentication payload MUST use the rpc_gss_svc_privacy security
770 service for protection. This prevents an attacker from intercepting
771 the RPCSEC_GSS_CREATE control procedure, reassigning the (parent)
772 context handle, and stealing the user's identity.
773
774
775
776
777
778
779
780 <span class="grey">Adamson &amp; Williams Standards Track [Page 14]</span></pre>
781 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
782 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
783
784
785 The target verifies the multi-principal authentication by first
786 confirming that the parent context used is an RPC client host
787 context; the target then verifies the rgmp_rpcheader_mic using the
788 GSS-API security context associated with the rgmp_handle field.
789
790 On successful verification, the rgss3_gss_mp_auth field in the
791 rgss3_create_res reply MUST be filled in with the inner RPCSEC_GSSv3
792 context handle as the rgmp_handle and a MIC computed over the RPC
793 reply header (see <a href="#section-2.3">Section 2.3</a>) using the GSS-API security context
794 associated with the inner handle.
795
796 On failure, the rgss3_gss_mp_auth field is not sent
797 (rgss3_gss_mp_auth is an optional field). A MSG_DENIED reply to the
798 RPCSEC_GSS_CREATE call is formulated as usual.
799
800 As described in <a href="./rfc2203#section-5.3.3.3">Section&nbsp;5.3.3.3 of [RFC2203]</a>, the server maintains a
801 list of contexts for the clients that are currently in session with
802 it. When a client request comes in, there may not be a context
803 corresponding to its handle. When this occurs on an
804 RPCSEC_GSS3_CREATE request processing of the parent handle, the
805 server rejects the request with a reply status of MSG_DENIED with the
806 reject_stat of AUTH_ERROR and with an auth_stat value of
807 RPCSEC_GSS_CREDPROBLEM.
808
809 A new value, RPCSEC_GSS_INNER_CREDPROBLEM, has been added to the
810 auth_stat type. With a multi-principal authorization request, the
811 server must also have a context corresponding to the inner context
812 handle. When the server does not have a context handle corresponding
813 to the inner context handle of a multi-principal authorization
814 request, the server sends a reply status of MSG_DENIED with the
815 reject_stat of AUTH_ERROR and with an auth_stat value of
816 RPCSEC_GSS_INNER_CREDPROBLEM.
817
818 When processing the multi-principal authentication request, if the
819 GSS_VerifyMIC() call on the rgmp_rpcheader_mic fails to return
820 GSS_S_COMPLETE, the server sends a reply status of MSG_DENIED with
821 the reject_stat of AUTH_ERROR and with an auth_stat value of
822 RPCSEC_GSS_INNER_CREDPROBLEM.
823
824
825
826
827
828
829
830
831
832
833
834
835
836 <span class="grey">Adamson &amp; Williams Standards Track [Page 15]</span></pre>
837 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
838 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
839
840
841 <span class="h5"><a class="selflink" id="section-2.7.1.2" href="#section-2.7.1.2">2.7.1.2</a>. Channel Binding</span>
842
843 &lt;CODE BEGINS&gt;
844
845 ///
846 /// typedef opaque rgss3_chan_binding&lt;&gt;;
847 ///
848
849 &lt;CODE ENDS&gt;
850
851 RPCSEC_GSSv3 provides a different way to do channel binding than
852 RPCSEC_GSSv2 [<a href="./rfc5403" title="&quot;RPCSEC_GSS Version 2&quot;">RFC5403</a>]. Specifically:
853
854 a. RPCSEC_GSSv3 builds on RPCSEC_GSSv1 by reusing existing,
855 established context handles rather than providing a different RPC
856 security flavor for establishing context handles.
857
858 b. Channel-bindings data is not hashed because there is now general
859 agreement that it is the secure channel's responsibility to
860 produce channel-bindings data of manageable size.
861
862 (a) is useful in keeping RPCSEC_GSSv3 simple in general, not just for
863 channel binding. (b) is useful in keeping RPCSEC_GSSv3 simple
864 specifically for channel binding.
865
866 Channel binding is accomplished as follows. The client prefixes the
867 channel-bindings data octet string with the channel type as described
868 in [<a href="./rfc5056" title="&quot;On the Use of Channel Bindings to Secure Channels&quot;">RFC5056</a>]; then, the client calls GSS_GetMIC() to get a MIC of the
869 resulting octet string, using the parent RPCSEC_GSSv3 context
870 handle's GSS-API security context. The MIC is then placed in the
871 rca_chan_bind_mic field of RPCSEC_GSS_CREATE arguments
872 (rgss3_create_args).
873
874 If the rca_chan_bind_mic field of the arguments of an
875 RPCSEC_GSS_CREATE control message is set, then the server MUST verify
876 the client's channel-binding MIC if the server supports this feature.
877 If channel-binding verification succeeds, then the server MUST
878 generate a new MIC of the same channel bindings and place it in the
879 rcr_chan_bind_mic field of the RPCSEC_GSS_CREATE rgss3_create_res
880 results. If channel-binding verification fails or the server doesn't
881 support channel binding, then the server MUST indicate this in its
882 reply by not including an rgss3_chan_binding value in
883 rgss3_create_res (rgss3_chan_binding is an optional field).
884
885 The client MUST verify the result's rcr_chan_bind_mic value by
886 calling GSS_VerifyMIC() with the given MIC and the channel-bindings
887 data (including the channel-type prefix). If client-side channel-
888 binding verification fails, then the client MUST call
889
890
891
892 <span class="grey">Adamson &amp; Williams Standards Track [Page 16]</span></pre>
893 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
894 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
895
896
897 RPCSEC_GSS_DESTROY. If the client requested channel binding but the
898 server did not include an rcr_chan_binding_mic field in the results,
899 then the client MAY continue to use the resulting context handle as
900 though channel binding had never been requested. If the client
901 considers channel binding critical, it MUST call RPCSEC_GSS_DESTROY.
902
903 As per RPCSEC_GSSv2 [<a href="./rfc5403" title="&quot;RPCSEC_GSS Version 2&quot;">RFC5403</a>]:
904
905 Once a successful [channel-binding] procedure has been performed
906 on an [RPCSEC_GSSv3] context handle, the initiator's
907 implementation may map application requests for rpc_gss_svc_none
908 and rpc_gss_svc_integrity to rpc_gss_svc_channel_prot credentials.
909 And if the secure channel has privacy enabled, requests for
910 rpc_gss_svc_privacy can also be mapped to
911 rpc_gss_svc_channel_prot.
912
913 Any RPCSEC_GSSv3 child context handle that has been bound to a secure
914 channel in this way SHOULD be used only with the
915 rpc_gss_svc_channel_prot and SHOULD NOT be used with rpc_gss_svc_none
916 or rpc_gss_svc_integrity -- if the secure channel does not provide
917 privacy protection, then the client MAY use rpc_gss_svc_privacy where
918 privacy protection is needed or desired.
919
920 <span class="h5"><a class="selflink" id="section-2.7.1.3" href="#section-2.7.1.3">2.7.1.3</a>. Label Assertions</span>
921
922 &lt;CODE BEGINS&gt;
923
924 /// struct rgss3_label {
925 /// rgss3_lfs rl_lfs;
926 /// opaque rl_label&lt;&gt;;
927 /// };
928 ///
929 /// struct rgss3_lfs {
930 /// unsigned int rlf_lfs_id;
931 /// unsigned int rlf_pi_id;
932 /// };
933 ///
934
935 &lt;CODE ENDS&gt;
936
937 The client discovers, via the RPCSEC_GSS_LIST control message, which
938 LFSs the server supports. Full Mode MAC is enabled when an
939 RPCSEC_GSS version 3 process subject label assertion is combined with
940 a file object label provided by the NFSv4.2 sec_label attribute.
941
942 Label encoding is specified to mirror the NFSv4.2 sec_label attribute
943 described in <a href="./rfc7862#section-12.2.4">Section&nbsp;12.2.4 of [RFC7862]</a>. The LFS is an identifier
944 used by the client to establish the syntactic format of the security
945
946
947
948 <span class="grey">Adamson &amp; Williams Standards Track [Page 17]</span></pre>
949 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
950 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
951
952
953 label and the semantic meaning of its components. The Policy
954 Identifier (PI) is an optional part of the definition of an LFS that
955 allows clients and the server to identify specific security policies.
956 The opaque label field (rgss3_label) is dependent on the MAC model to
957 interpret and enforce.
958
959 If a label itself requires privacy protection (i.e., requires that
960 the user can assert that the label is a secret), then the client MUST
961 use the rpc_gss_svc_privacy protection service for the
962 RPCSEC_GSS_CREATE request.
963
964 RPCSEC_GSSv3 clients MAY assert a set of subject security labels in
965 some LFS by binding a label assertion to the RPCSEC_GSSv3 child
966 context handle. This is done by including an assertion of type
967 rgss3_label in the RPCSEC_GSS_CREATE rgss3_create_args rca_assertions
968 call data. The label assertion payload is the set of subject labels
969 asserted by the calling NFS client process. The resultant child
970 context is used for NFS requests asserting the client process subject
971 labels. The NFS server process that handles such requests then
972 asserts the (client) process subject label(s) as it attempts to
973 access a file that has associated Labeled NFS object labels.
974
975 Servers that support labeling in the requested LFS MAY map the
976 requested subject label to a different subject label as a result of
977 server-side policy evaluation.
978
979 The labels that are accepted by the target and bound to the
980 RPCSEC_GSSv3 context MUST be enumerated in the rcr_assertions field
981 of the rgss3_create_res RPCSEC_GSS_CREATE reply.
982
983 Servers that do not support labeling or that do not support the
984 requested LFS reject the label assertion with a reply status of
985 MSG_DENIED, a reject_status of AUTH_ERROR, and an auth_stat of
986 RPCSEC_GSS_LABEL_PROBLEM.
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004 <span class="grey">Adamson &amp; Williams Standards Track [Page 18]</span></pre>
1005 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
1006 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
1007
1008
1009 <span class="h5"><a class="selflink" id="section-2.7.1.4" href="#section-2.7.1.4">2.7.1.4</a>. Structured Privilege Assertions</span>
1010
1011 &lt;CODE BEGINS&gt;
1012
1013 ///
1014 /// typedef opaque utf8string&lt;&gt;; /* UTF-8 encoding */
1015 /// typedef utf8string utf8str_cs; /* Case-sensitive UTF-8 */
1016 ///
1017 /// struct rgss3_privs {
1018 /// utf8str_cs rp_name&lt;&gt;;
1019 /// opaque rp_privilege&lt;&gt;;
1020 /// };
1021
1022 &lt;CODE ENDS&gt;
1023
1024 A structured privilege is a capability defined by a specific RPC
1025 application. To support the assertion of this privilege, by a client
1026 using the application, in a server that also supports the
1027 application, the application may define a private data structure that
1028 is understood by clients and servers implementing the RPC
1029 application.
1030
1031 RPCSEC_GSSv3 clients MAY assert a structured privilege by binding the
1032 privilege to the RPCSEC_GSSv3 context handle. This is done by
1033 including an assertion of type rgss3_privs in the RPCSEC_GSS_CREATE
1034 rgss3_create_args rca_assertions call data.
1035
1036 The privilege is identified by the description string that is used by
1037 RPCSEC_GSSv3 to identify the privilege and communicate the private
1038 data between the relevant RPC application-specific code without
1039 needing to be aware of the details of the structure used. Thus, as
1040 far as RPCSEC_GSSv3 is concerned, the defined structure is passed
1041 between client and server as opaque data encoded in the
1042 rpc_gss3_privs rp_privilege field.
1043
1044 Encoding, server verification, and any server policies for structured
1045 privileges are described by the RPC application definition. The
1046 rp_name field of rpc_gss3_privs carries the description string used
1047 to identify and list the privilege. The utf8str_cs definition is
1048 from [<a href="./rfc7530" title="&quot;Network File System (NFS) Version 4 Protocol&quot;">RFC7530</a>].
1049
1050 A successful structured privilege assertion MUST be enumerated in the
1051 rcr_assertions field of the rgss3_create_res RPCSEC_GSS_CREATE reply.
1052
1053 If a server receives a structured privilege assertion that it does
1054 not recognize, the assertion is rejected with a reply status of
1055 MSG_DENIED, a reject_status of AUTH_ERROR, and an auth_stat of
1056 RPCSEC_GSS_UNKNOWN_MESSAGE.
1057
1058
1059
1060 <span class="grey">Adamson &amp; Williams Standards Track [Page 19]</span></pre>
1061 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
1062 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
1063
1064
1065 It is assumed that a client asserting more than one structured
1066 privilege to be bound to a context handle would not require all the
1067 privilege assertions to succeed.
1068
1069 The server MUST NOT reject RPCSEC_GSS_CREATE requests containing
1070 supported structured privilege assertions, even if some of those
1071 assertions are rejected (e.g., for local policy reasons).
1072
1073 If a server receives an RPCSEC_GSS_CREATE request containing one or
1074 more unsupported structured privilege assertions, the request MUST be
1075 rejected with a reply status of MSG_DENIED, a reject_status of
1076 AUTH_ERROR, and an auth_stat of RPCSEC_GSS_PRIVILEGE_PROBLEM.
1077
1078 <a href="./rfc7862#section-4.9.1.1">Section&nbsp;4.9.1.1 of [RFC7862]</a> ("Inter-Server Copy via ONC RPC with
1079 RPCSEC_GSSv3") shows an example of structured privilege definition
1080 and use.
1081
1082 <span class="h4"><a class="selflink" id="section-2.7.2" href="#section-2.7.2">2.7.2</a>. New Control Procedure - RPCSEC_GSS_LIST</span>
1083
1084 &lt;CODE BEGINS&gt;
1085
1086 /// enum rgss3_list_item {
1087 /// LABEL = 0,
1088 /// PRIVS = 1
1089 /// };
1090 ///
1091 /// struct rgss3_list_args {
1092 /// rgss3_list_item rla_list_what&lt;&gt;;
1093 /// };
1094 ///
1095 /// union rgss3_list_item_u
1096 /// switch (rgss3_list_item itype) {
1097 /// case LABEL:
1098 /// rgss3_label rli_labels&lt;&gt;;
1099 /// case PRIVS:
1100 /// rgss3_privs rli_privs&lt;&gt;;
1101 /// default:
1102 /// opaque rli_ext&lt;&gt;;
1103 /// };
1104 ///
1105 /// typedef rgss3_list_item_u rgss3_list_res&lt;&gt;;
1106 ///
1107
1108 &lt;CODE ENDS&gt;
1109
1110 The call data for an RPCSEC_GSS_LIST request consists of a list of
1111 integers (rla_list_what) indicating what assertions are to be listed,
1112 and the reply consists of an error or the requested list.
1113
1114
1115
1116 <span class="grey">Adamson &amp; Williams Standards Track [Page 20]</span></pre>
1117 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
1118 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
1119
1120
1121 The result of requesting a list of rgss3_list_item LABEL objects is a
1122 list of LFSs supported by the server. The client can then use the
1123 LFS list to assert labels via the RPCSEC_GSS_CREATE label assertions.
1124 See <a href="#section-2.7.1.3">Section 2.7.1.3</a>.
1125
1126 <span class="h3"><a class="selflink" id="section-2.8" href="#section-2.8">2.8</a>. Extensibility</span>
1127
1128 Assertion types may be added in the future by adding arms to the
1129 "rgss3_assertion_u" union (<a href="#section-2.7.1">Section 2.7.1</a>) and the "rgss3_list_item_u"
1130 union (<a href="#section-2.7.2">Section 2.7.2</a>). Examples of other potential assertion types
1131 include:
1132
1133 o Client-side assertions of identity:
1134
1135 * Primary client/user identity.
1136
1137 * Supplementary group memberships of the client/user, including
1138 support for specifying deltas to the membership list as seen on
1139 the server.
1140
1141 <span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Operational Recommendation for Deployment</span>
1142
1143 RPCSEC_GSSv3 is a superset of RPCSEC_GSSv2 [<a href="./rfc5403" title="&quot;RPCSEC_GSS Version 2&quot;">RFC5403</a>], which in turn
1144 is a superset of RPCSEC_GSSv1 [<a href="./rfc2203" title="&quot;RPCSEC_GSS Protocol Specification&quot;">RFC2203</a>], and so can be used in all
1145 situations where RPCSEC_GSSv2 is used, or where RPCSEC_GSSv1 is used
1146 and channel-bindings functionality is not needed. RPCSEC_GSSv3
1147 should be used when the new functionality is needed.
1148
1149 <span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Security Considerations</span>
1150
1151 This entire document deals with security issues.
1152
1153 The RPCSEC_GSSv3 protocol allows for client-side assertions of data
1154 that is relevant to server-side authorization decisions. These
1155 assertions must be evaluated by the server in the context of whether
1156 the client and/or user are authenticated, whether multi-principal
1157 authentication was used, whether the client is trusted, what ranges
1158 of assertions are allowed for the client and the user (separately or
1159 together), and any relevant server-side policy.
1160
1161 The security semantics of assertions carried by RPCSEC_GSSv3 are
1162 application protocol-specific.
1163
1164 Note that RPCSEC_GSSv3 is not a complete solution for labeling: it
1165 conveys the labels of actors but not the labels of objects. RPC
1166 application protocols may require extending in order to carry object
1167 label information.
1168
1169
1170
1171
1172 <span class="grey">Adamson &amp; Williams Standards Track [Page 21]</span></pre>
1173 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
1174 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
1175
1176
1177 There may be interactions with NFSv4's callback security scheme and
1178 NFSv4.1's [<a href="./rfc5661" title="&quot;Network File System (NFS) Version 4 Minor Version 1 Protocol&quot;">RFC5661</a>] GSS SSV (Secret State Verifier) mechanisms.
1179 Specifically, the NFSv4 callback scheme requires that the server
1180 initiate GSS-API security contexts, which does not work well in
1181 practice; in the context of client-side processes running as the same
1182 user but with different privileges and security labels, the NFSv4
1183 callback security scheme seems particularly unlikely to work well.
1184 NFSv4.1 has the server use an existing, client-initiated RPCSEC_GSS
1185 context handle to protect server-initiated callback RPCs. The
1186 NFSv4.1 callback security scheme lacks all the problems of the NFSv4
1187 scheme; however, it is important that the server pick an appropriate
1188 RPCSEC_GSS context handle to protect any callbacks. Specifically, it
1189 is important that the server use RPCSEC_GSS context handles that
1190 authenticate the client to protect any callbacks related to server
1191 state initiated by RPCs protected by RPCSEC_GSSv3 contexts.
1192
1193 As described in <a href="./rfc5661#section-2.10.10">Section&nbsp;2.10.10 of [RFC5661]</a>, the client is permitted
1194 to associate multiple RPCSEC_GSS handles with a single SSV GSS
1195 context. RPCSEC_GSSv3 handles will work well with SSV in that the
1196 man-in-the-middle attacks described in <a href="./rfc5661#section-2.10.10">Section&nbsp;2.10.10 of [RFC5661]</a>
1197 are solved by the new reply verifier (<a href="#section-2.3">Section 2.3</a>). Using an
1198 RPCSEC_GSSv3 handle backed by a GSS-SSV mechanism context as a parent
1199 handle in an RPCSEC_GSS_CREATE call, while permitted, is complicated
1200 by the lifetime rules of SSV contexts and their associated RPCSEC_GSS
1201 handles.
1202
1203 <span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. IANA Considerations</span>
1204
1205 This section uses terms that are defined in [<a href="./rfc5226" title="">RFC5226</a>].
1206
1207 <span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. New RPC Authentication Status Numbers</span>
1208
1209 The following new RPC Authentication Status Numbers have been added
1210 to the IANA registry:
1211
1212 o RPCSEC_GSS_INNER_CREDPROBLEM (15) "No credentials for
1213 multi-principal assertion inner context user". See
1214 <a href="#section-2.7.1.1">Section 2.7.1.1</a>.
1215
1216 o RPCSEC_GSS_LABEL_PROBLEM (16) "Problem with label assertion".
1217 See <a href="#section-2.7.1.3">Section 2.7.1.3</a>.
1218
1219 o RPCSEC_GSS_PRIVILEGE_PROBLEM (17) "Problem with structured
1220 privilege assertion". See <a href="#section-2.7.1.4">Section 2.7.1.4</a>.
1221
1222 o RPCSEC_GSS_UNKNOWN_MESSAGE (18) "Unknown structured privilege
1223 assertion". See <a href="#section-2.7.1.4">Section 2.7.1.4</a>.
1224
1225
1226
1227
1228 <span class="grey">Adamson &amp; Williams Standards Track [Page 22]</span></pre>
1229 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
1230 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
1231
1232
1233 <span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>. Structured Privilege Name Definitions</span>
1234
1235 IANA has created a registry called the "RPCSEC_GSS Structured
1236 Privilege Names Registry".
1237
1238 Structured privilege assertions (<a href="#section-2.7.1.4">Section 2.7.1.4</a>) are defined by a
1239 specific RPC application. The namespace identifiers for these
1240 assertions (the rp_name) are defined as string names. The
1241 RPCSEC_GSSv3 protocol does not define the specific assignment of the
1242 namespace for these structured privilege assertion names. The IANA
1243 registry promotes interoperability where common interests exist.
1244 While RPC application developers are allowed to define and use
1245 structured privileges as needed, they are encouraged to register
1246 structured privilege assertion names with IANA.
1247
1248 The registry is to be maintained using the Standards Action policy as
1249 defined in <a href="./rfc5226#section-4.1">Section&nbsp;4.1 of [RFC5226]</a>.
1250
1251 Under the RPCSEC_GSS version 3 specification, the name of a
1252 structured privilege can in theory be up to 2^32 - 1 bytes in length,
1253 but in practice RPC application clients and servers will be unable to
1254 handle a string that long. IANA should reject any assignment request
1255 with a structured privilege name that exceeds 128 UTF-8 characters.
1256 To give the IESG the flexibility to set up bases of assignment of
1257 Experimental Use, the prefix "EXPE" is Reserved. The structured
1258 privilege with a zero-length name is Reserved.
1259
1260 The prefix "PRIV" is allocated for Private Use. A site that wants to
1261 make use of unregistered named attributes without risk of conflicting
1262 with an assignment in IANA's registry should use the prefix "PRIV" in
1263 all of its structured privilege assertion names.
1264
1265 Because some RPC application clients and servers have case-
1266 insensitive semantics, the fifteen additional lower-case and mixed-
1267 case permutations of each of "EXPE" and "PRIV" are Reserved (e.g.,
1268 "expe", "expE", and "exPe" are Reserved). Similarly, IANA must not
1269 allow two assignments that would conflict if both structured
1270 privilege names were converted to a common case.
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284 <span class="grey">Adamson &amp; Williams Standards Track [Page 23]</span></pre>
1285 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
1286 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
1287
1288
1289 The registry of structured privilege names is a list of assignments,
1290 each containing three fields for each assignment.
1291
1292 1. A US-ASCII string name that is the actual name of the structured
1293 privilege. This name must be unique. This string name can be 1
1294 to 128 UTF-8 characters long.
1295
1296 2. A reference to the specification of the RPC-application-defined
1297 structured privilege. The reference can consume up to 256 bytes
1298 (or more if IANA permits).
1299
1300 3. The point of contact of the registrant. The point of contact can
1301 consume up to 256 bytes (or more if IANA permits).
1302
1303 <span class="h4"><a class="selflink" id="section-5.2.1" href="#section-5.2.1">5.2.1</a>. Initial Registry</span>
1304
1305 The initial registry consists of the three structured privileges
1306 defined in [<a href="./rfc7862" title="&quot;Network File System (NFS) Version 4 Minor Version 2 Protocol&quot;">RFC7862</a>].
1307
1308 1. NAME: copy_to_auth, REFERENCE: <a href="./rfc7862">RFC 7862</a>, CONTACT: William
1309 A.(Andy) Adamson, [email protected]
1310
1311 2. NAME: copy_from_auth, REFERENCE: <a href="./rfc7862">RFC 7862</a>, CONTACT: William
1312 A.(Andy) Adamson, [email protected]
1313
1314 3. NAME: copy_confirm_auth, REFERENCE: <a href="./rfc7862">RFC 7862</a>, CONTACT: William
1315 A.(Andy) Adamson, [email protected]
1316
1317 <span class="h4"><a class="selflink" id="section-5.2.2" href="#section-5.2.2">5.2.2</a>. Updating Registrations</span>
1318
1319 The registrant is always permitted to update the point of contact
1320 field. To make any other change will require Expert Review or IESG
1321 Approval.
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340 <span class="grey">Adamson &amp; Williams Standards Track [Page 24]</span></pre>
1341 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
1342 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
1343
1344
1345 <span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. References</span>
1346
1347 <span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>. Normative References</span>
1348
1349 [<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
1350 Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>,
1351 DOI 10.17487/RFC2119, March 1997,
1352 &lt;<a href="http://www.rfc-editor.org/info/rfc2119">http://www.rfc-editor.org/info/rfc2119</a>&gt;.
1353
1354 [<a id="ref-RFC2203">RFC2203</a>] Eisler, M., Chiu, A., and L. Ling, "RPCSEC_GSS Protocol
1355 Specification", <a href="./rfc2203">RFC 2203</a>, DOI 10.17487/RFC2203,
1356 September 1997, &lt;<a href="http://www.rfc-editor.org/info/rfc2203">http://www.rfc-editor.org/info/rfc2203</a>&gt;.
1357
1358 [<a id="ref-RFC2743">RFC2743</a>] Linn, J., "Generic Security Service Application Program
1359 Interface Version 2, Update 1", <a href="./rfc2743">RFC 2743</a>,
1360 DOI 10.17487/RFC2743, January 2000,
1361 &lt;<a href="http://www.rfc-editor.org/info/rfc2743">http://www.rfc-editor.org/info/rfc2743</a>&gt;.
1362
1363 [<a id="ref-RFC4506">RFC4506</a>] Eisler, M., Ed., "XDR: External Data Representation
1364 Standard", STD 67, <a href="./rfc4506">RFC 4506</a>, DOI 10.17487/RFC4506,
1365 May 2006, &lt;<a href="http://www.rfc-editor.org/info/rfc4506">http://www.rfc-editor.org/info/rfc4506</a>&gt;.
1366
1367 [<a id="ref-RFC5056">RFC5056</a>] Williams, N., "On the Use of Channel Bindings to Secure
1368 Channels", <a href="./rfc5056">RFC 5056</a>, DOI 10.17487/RFC5056, November 2007,
1369 &lt;<a href="http://www.rfc-editor.org/info/rfc5056">http://www.rfc-editor.org/info/rfc5056</a>&gt;.
1370
1371 [<a id="ref-RFC5403">RFC5403</a>] Eisler, M., "RPCSEC_GSS Version 2", <a href="./rfc5403">RFC 5403</a>,
1372 DOI 10.17487/RFC5403, February 2009,
1373 &lt;<a href="http://www.rfc-editor.org/info/rfc5403">http://www.rfc-editor.org/info/rfc5403</a>&gt;.
1374
1375 [<a id="ref-RFC5661">RFC5661</a>] Shepler, S., Ed., Eisler, M., Ed., and D. Noveck, Ed.,
1376 "Network File System (NFS) Version 4 Minor Version 1
1377 Protocol", <a href="./rfc5661">RFC 5661</a>, DOI 10.17487/RFC5661, January 2010,
1378 &lt;<a href="http://www.rfc-editor.org/info/rfc5661">http://www.rfc-editor.org/info/rfc5661</a>&gt;.
1379
1380 [<a id="ref-RFC7530">RFC7530</a>] Haynes, T., Ed., and D. Noveck, Ed., "Network File System
1381 (NFS) Version 4 Protocol", <a href="./rfc7530">RFC 7530</a>, DOI 10.17487/RFC7530,
1382 March 2015, &lt;<a href="http://www.rfc-editor.org/info/rfc7530">http://www.rfc-editor.org/info/rfc7530</a>&gt;.
1383
1384 [<a id="ref-RFC7862">RFC7862</a>] Haynes, T., "Network File System (NFS) Version 4 Minor
1385 Version 2 Protocol", <a href="./rfc7862">RFC 7862</a>, DOI 10.17487/RFC7862,
1386 November 2016, &lt;<a href="http://www.rfc-editor.org/info/rfc7862">http://www.rfc-editor.org/info/rfc7862</a>&gt;.
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396 <span class="grey">Adamson &amp; Williams Standards Track [Page 25]</span></pre>
1397 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
1398 <span class="grey"><a href="./rfc7861">RFC 7861</a> NFSv4 RPC Security November 2016</span>
1399
1400
1401 <span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>. Informative References</span>
1402
1403 [<a id="ref-AFS-RXGK">AFS-RXGK</a>]
1404 Wilkinson, S. and B. Kaduk, <a style="text-decoration: none" href='https://www.google.com/search?sitesearch=datatracker.ietf.org%2Fdoc%2Fhtml%2F&amp;q=inurl:draft-+%22Integrating+rxgk+with+AFS%22'>"Integrating rxgk with AFS"</a>,
1405 Work in Progress, <a href="./draft-wilkinson-afs3-rxgk-afs-08">draft-wilkinson-afs3-rxgk-afs-08</a>,
1406 May 2015.
1407
1408 [<a id="ref-RFC4949">RFC4949</a>] Shirey, R., "Internet Security Glossary, Version 2",
1409 FYI 36, <a href="./rfc4949">RFC 4949</a>, DOI 10.17487/RFC4949, August 2007,
1410 &lt;<a href="http://www.rfc-editor.org/info/rfc4949">http://www.rfc-editor.org/info/rfc4949</a>&gt;.
1411
1412 [<a id="ref-RFC5226">RFC5226</a>] Narten, T. and H. Alvestrand, "Guidelines for Writing an
1413 IANA Considerations Section in RFCs", <a href="https://www.rfc-editor.org/bcp/bcp26">BCP 26</a>, <a href="./rfc5226">RFC 5226</a>,
1414 DOI 10.17487/RFC5226, May 2008,
1415 &lt;<a href="http://www.rfc-editor.org/info/rfc5226">http://www.rfc-editor.org/info/rfc5226</a>&gt;.
1416
1417 [<a id="ref-RFC5531">RFC5531</a>] Thurlow, R., "RPC: Remote Procedure Call Protocol
1418 Specification Version 2", <a href="./rfc5531">RFC 5531</a>, DOI 10.17487/RFC5531,
1419 May 2009, &lt;<a href="http://www.rfc-editor.org/info/rfc5531">http://www.rfc-editor.org/info/rfc5531</a>&gt;.
1420
1421 Acknowledgments
1422
1423 Andy Adamson would like to thank NetApp, Inc. for its funding of his
1424 time on this project.
1425
1426 We thank Lars Eggert, Mike Eisler, Ben Kaduk, Bruce Fields, Tom
1427 Haynes, and Dave Noveck for their most helpful reviews.
1428
1429 Authors' Addresses
1430
1431 William A. (Andy) Adamson
1432 NetApp
1433 3629 Wagner Ridge Ct.
1434 Ann Arbor, MI 48103
1435 United States of America
1436
1437 Phone: +1 734 665 1204
1438 Email: [email protected]
1439
1440
1441 Nico Williams
1442 cryptonector.com
1443 13115 Tamayo Dr.
1444 Austin, TX 78729
1445 United States of America
1446
1447 Email: [email protected]
1448
1449
1450
1451
1452 Adamson &amp; Williams Standards Track [Page 26]
1453 </pre>