-
Notifications
You must be signed in to change notification settings - Fork 1
/
draft-ietf-nfsv4-rpc-tls.xml
1974 lines (1894 loc) · 61.6 KB
/
draft-ietf-nfsv4-rpc-tls.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
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
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
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
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?>
<rfc
category="std"
docName="draft-ietf-nfsv4-rpc-tls-latest"
ipr="trust200902"
obsoletes=""
scripts="Common,Latin"
sortRefs="true"
submissionType="IETF"
symRefs="true"
tocDepth="3"
tocInclude="true"
updates="5531"
version="3"
xml:lang="en">
<front>
<title abbrev="RPC-With-TLS">
Towards Remote Procedure Call Encryption By Default
</title>
<seriesInfo name="Internet-Draft" value="draft-ietf-nfsv4-rpc-tls-latest"/>
<author initials="T." surname="Myklebust" fullname="Trond Myklebust">
<organization abbrev="Hammerspace" showOnFrontPage="true">
Hammerspace Inc
</organization>
<address>
<postal>
<street>4300 El Camino Real Ste 105</street>
<city>Los Altos</city>
<region>CA</region>
<code>94022</code>
<country>United States of America</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<author initials="C." surname="Lever" fullname="Charles Lever" role="editor">
<organization abbrev="Oracle" showOnFrontPage="true">
Oracle Corporation
</organization>
<address>
<postal>
<street/>
<city/>
<region/>
<code/>
<country>United States of America</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<date/>
<area>Transport</area>
<workgroup>Network File System Version 4</workgroup>
<abstract>
<t>
This document describes a mechanism that,
through the use of opportunistic Transport Layer Security (TLS),
enables encryption of Remote Procedure Call (RPC) transactions
while they are in-transit.
The proposed mechanism interoperates with ONC RPC implementations
that do not support it.
This document updates RFC 5531.
</t>
</abstract>
<note removeInRFC="true">
<t>
Discussion of this draft takes place
on the NFSv4 working group mailing list ([email protected]),
which is archived at
<eref target="https://mailarchive.ietf.org/arch/browse/nfsv4/"/>.
Working Group information can be found at
<eref target="https://datatracker.ietf.org/wg/nfsv4/about/"/>.
</t>
<t>
The source for this draft is maintained in GitHub.
Suggested changes should be submitted as pull requests at
<eref target="https://github.com/chucklever/i-d-rpc-tls"/>.
Instructions are on that page as well.
</t>
</note>
</front>
<middle>
<section
anchor="section_8F035331-8EB8-4FBC-973A-673FBA5FE952"
numbered="true"
removeInRFC="false"
toc="default">
<name>Introduction</name>
<t>
In 2014 the IETF published
a document entitled "Pervasive Monitoring Is an Attack"
<xref target="RFC7258" format="default" sectionFormat="of"/>,
which recognized that unauthorized observation
of network traffic had become widespread
and
was a subversive threat
to all who make use of the Internet at large.
It strongly recommended that newly defined Internet protocols
should make a genuine effort to mitigate monitoring attacks.
Typically this mitigation includes encrypting data in transit.
</t>
<t>
The Remote Procedure Call version 2 protocol
has been a Proposed Standard for three decades
(see
<xref target="RFC5531" format="default" sectionFormat="of"/>
and its antecedents).
Over twenty years ago,
Eisler et al. first introduced RPCSEC GSS
as an in-transit encryption mechanism for RPC
<xref target="RFC2203" format="default" sectionFormat="of"/>.
However, experience has shown
that RPCSEC GSS with in-transit encryption
can be challenging to use in practice:
</t>
<ul spacing="normal" bare="false" empty="false">
<li>
Parts of each RPC header remain in clear-text,
constituting a loss of metadata confidentiality.
</li>
<li>
Offloading the GSS privacy service is not practical
in large multi-user deployments
since each message is encrypted using a key based
on the issuing RPC user.
</li>
</ul>
<t>
However strong GSS-provided confidentiality is,
it cannot provide any security if the challenges
of using it result in choosing not to deploy it at all.
</t>
<t>
Moreover, the use of AUTH_SYS
remains common despite the adverse effects
that acceptance of UIDs and GIDs
from unauthenticated clients brings with it.
Continued use is in part because:
</t>
<ul spacing="normal" bare="false" empty="false">
<li>
Per-client deployment and administrative costs
for the only well-defined alternative to AUTH_SYS
are expensive at scale.
For instance, administrators must provide keying material
for each RPC client, including transient clients.
</li>
<li>
GSS host identity management and user identity management
typically must be enforced in the same security realm.
However, cloud providers, for instance, might prefer
to remain authoritative for host identity
but
allow tenants to manage user identities within their private networks.
</li>
</ul>
<t>
In view of the challenges with the
currently available mechanisms
for
authenticating
and
protecting the confidentiality
of RPC transactions,
this document specifies a transport-layer security mechanism
that complements the existing ones.
The
Transport Layer Security
<xref target="RFC8446" format="default" sectionFormat="of"/>
(TLS)
and
Datagram Transport Layer Security
<xref target="I-D.ietf-tls-dtls13" format="default" sectionFormat="of"/>
(DTLS)
protocols are a well-established Internet building blocks
that protect many standard Internet protocols
such as the Hypertext Transport Protocol (HTTP)
<xref target="RFC2818" format="default" sectionFormat="of"/>.
</t>
<t>
Encrypting at the RPC transport layer accords several significant benefits:
</t>
<dl newline="false" spacing="normal">
<dt>Encryption By Default:</dt>
<dd>
Transport encryption can be enabled
without additional administrative tasks such as
identifying client systems to a trust authority
and
providing each with keying material.
</dd>
<dt>Encryption Offload:</dt>
<dd>
Hardware support for the GSS privacy service has not appeared in the marketplace.
However, the use of a well-established transport encryption mechanism
that is employed by other ubiquitous network protocols
makes it more likely that encryption offload for RPC
is practicable.
</dd>
<dt>Securing AUTH_SYS:</dt>
<dd>
Most critically, transport encryption can
significantly reduce several security issues
inherent in the current widespread use of AUTH_SYS
(i.e., acceptance of UIDs and GIDs
generated by an unauthenticated client).
</dd>
<dt>Decoupled User and Host Identities:</dt>
<dd>
TLS can be used to authenticate peer hosts
while other security mechanisms can handle user authentication.
</dd>
<dt>Compatibility:</dt>
<dd>
The imposition of encryption at the transport layer
protects any upper-layer protocol that employs RPC,
without alteration of the upper-layer protocol.
</dd>
</dl>
<t>
Further,
<xref target="section_2AE49383-E6B2-4830-8407-995FEBF727F2" format="default" sectionFormat="of"/>
of the current document defines policies in line with
<xref target="RFC7435" format="default" sectionFormat="of"/>
which enable RPC-with-TLS to be deployed opportunistically
in environments that contain RPC implementations that do not support TLS.
However, specifications for RPC-based upper-layer protocols
should choose to require even stricter policies that guarantee
encryption
and
host authentication
is used for all RPC transactions
to mitigate against pervasive monitoring attacks
<xref target="RFC7258" format="default" sectionFormat="of"/>.
Enforcing the use of RPC-with-TLS is of particular importance
for existing upper-layer protocols whose security infrastructure is weak.
</t>
<t>
The protocol specification in the current document assumes
that support for
ONC RPC
<xref target="RFC5531" format="default" sectionFormat="of"/>,
TLS
<xref target="RFC8446" format="default" sectionFormat="of"/>,
PKIX
<xref target="RFC5280" format="default" sectionFormat="of"/>,
DNSSEC/DANE
<xref target="RFC6698" format="default" sectionFormat="of"/>,
and optionally
RPCSEC_GSS
<xref target="RFC2203" format="default" sectionFormat="of"/>
is available within the platform
where RPC-with-TLS support is to be added.
</t>
</section>
<section
anchor="section_024237C9-5504-49B4-A2D3-2D2A5EFBB967"
numbered="true"
removeInRFC="false"
toc="default">
<name>Requirements Language</name>
<t>
The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
"<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>",
"<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>",
"<bcp14>SHOULD NOT</bcp14>",
"<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>"
in this document are to be interpreted
as described in BCP 14
<xref target="RFC2119" format="default" sectionFormat="of"/>
<xref target="RFC8174" format="default" sectionFormat="of"/>
when, and only when, they appear in all capitals, as shown here.
</t>
</section>
<section
anchor="section_0EB1100E-DAA8-4B2C-98AE-94258CFDCB1B"
numbered="true"
removeInRFC="false"
toc="default">
<name>Terminology</name>
<t>
This document adopts the terminology introduced in
<xref target="RFC6973" section="3" format="default" sectionFormat="of"/>
and assumes a working knowledge of
the Remote Procedure Call (RPC) version 2 protocol
<xref target="RFC5531" format="default" sectionFormat="of"/>
and
the Transport Layer Security (TLS) version 1.3 protocol
<xref target="RFC8446" format="default" sectionFormat="of"/>.
</t>
<t>
Note also that the NFS community long ago adopted the
use of the term "privacy" from documents such as
<xref target="RFC2203" format="default" sectionFormat="of"/>.
In the current document, the authors use the term
"privacy" only when referring specifically
to the historic GSS privacy service defined in
<xref target="RFC2203" format="default" sectionFormat="of"/>.
Otherwise, the authors use the term "confidentiality",
following the practices of contemporary security communities.
</t>
<t>
We adhere to the convention that a "client"
is a network host that actively initiates an association,
and
a "server" is a network host that passively accepts an association request.
</t>
<t>
RPC documentation historically refers to
the authentication of a connecting host as "machine authentication"
or "host authentication".
TLS documentation refers to the same as "peer authentication".
In the current document there is little distinction between these terms.
</t>
<t>
The term "user authentication" in the current document refers specifically
to the RPC caller's credential, provided in the
"cred"
and
"verf"
fields in each RPC Call.
</t>
</section>
<section
anchor="section_EC3FEED5-1DE0-454B-9AB3-CE47BA901583"
numbered="true"
removeInRFC="false"
toc="default">
<name>RPC-With-TLS in Operation</name>
<section
anchor="section_0A03673B-14BA-4228-8A8A-F76AA318CA73"
numbered="true"
removeInRFC="false"
toc="default">
<name>Discovering Server-side TLS Support</name>
<t>
The mechanism described in the current document
interoperates fully with RPC implementations
that do not support RPC-with-TLS.
When an RPC-with-TLS-enabled peer encounters a peer that
does not support RPC-with-TLS,
policy settings on the RPC-with-TLS-enabled peer determine
whether RPC operation continues without the use of TLS,
or RPC operation is not permitted.
</t>
<t>
To achieve this interoperability,
we introduce a new RPC authentication flavor called AUTH_TLS.
The AUTH_TLS authentication flavor signals that the client wants
to initiate TLS negotiation if the server supports it.
Except for the modifications described in this section,
the RPC protocol is unaware of security encapsulation
at the transport layer.
The value of AUTH_TLS is defined in
<xref target="section_2CD51855-CE40-4B8D-A220-F211C477964F" format="default" sectionFormat="of"/>.
</t>
<t>
An RPC client begins its communication with an RPC server
by selecting a transport and destination port.
The choice of transport and port is
typically based on the RPC program that is to be used.
The RPC client might query the RPC server's RPCBIND service
to make this selection
(The RPCBIND service is described in
<xref target="RFC1833" format="default" sectionFormat="of"/>).
The mechanism described in the current document
does not support RPC transports other than TCP and UDP.
In all cases, an RPC server <bcp14>MUST</bcp14> listen on the same ports
for (D)TLS-protected RPC programs
as the ports used when (D)TLS is not available.
</t>
<t>
To protect RPC traffic to a TCP port,
the RPC client opens a TCP connection to that port
and sends a NULL RPC procedure
with an auth_flavor of AUTH_TLS on that connection.
To protect RPC traffic to a UDP port,
the RPC client sends a UDP datagram to that port
containing a NULL RPC procedure with an auth_flavor of AUTH_TLS.
The client constructs this RPC procedure as follows:
</t>
<ul spacing="normal" bare="false" empty="false">
<li>
The length of the opaque data constituting the credential
sent in the RPC Call message <bcp14>MUST</bcp14> be zero.
</li>
<li>
The verifier accompanying the credential <bcp14>MUST</bcp14> be an AUTH_NONE
verifier of length zero.
</li>
<li>
The flavor value of the verifier in the RPC Reply message
received from the server <bcp14>MUST</bcp14> be AUTH_NONE.
</li>
<li>
The length of the verifier's body field is eight.
</li>
<li>
The bytes of the verifier's body field encode the ASCII characters
"STARTTLS" as a fixed-length opaque.
</li>
</ul>
<t>
The RPC server signals its corresponding support for RPC-with-TLS
by replying with
a reply_stat of MSG_ACCEPTED
and
an AUTH_NONE verifier containing the "STARTTLS" token.
The client <bcp14>SHOULD</bcp14> proceed with TLS session establishment,
even if the Reply's accept_stat is not SUCCESS.
If the AUTH_TLS probe was done via TCP,
the RPC client <bcp14>MUST</bcp14> send the "ClientHello" message
on the same connection.
If the AUTH_TLS probe was done via UDP,
the RPC client <bcp14>MUST</bcp14> send the "ClientHello" message
to the same UDP destination port.
</t>
<t>
Conversely,
if the Reply's reply_stat is not MSG_ACCEPTED,
if its verifier flavor is not AUTH_NONE,
or if its verifier does not contain the "STARTTLS" token,
the RPC client <bcp14>MUST NOT</bcp14> send a "ClientHello" message.
RPC operation may continue,
depending on local policy, but without
confidentiality,
integrity,
or
peer authentication protection
from (D)TLS.
</t>
<t>
If, after a successful RPC AUTH_TLS probe,
the subsequent (D)TLS handshake should fail for any reason,
the RPC client reports this failure
to the upper-layer application
the same way it reports an AUTH_ERROR rejection
from the RPC server.
</t>
<t>
If an RPC client uses the AUTH_TLS authentication flavor
on any procedure other than the NULL procedure,
or an RPC client sends an RPC AUTH_TLS probe within
an existing (D)TLS session,
the RPC server <bcp14>MUST</bcp14> reject that RPC Call
by returning a reply_stat of MSG_DENIED
with a reject_stat of AUTH_ERROR
and an auth_stat of AUTH_BADCRED.
</t>
<t>
Once the TLS session handshake is complete,
the RPC client and server have established
a secure channel for exchanging RPC transactions.
A successful AUTH_TLS probe on one particular port/transport tuple
does not imply that RPC-with-TLS is available on that same server
using a different port/transport tuple,
nor does it imply that
RPC-with-TLS will be available in the future
using the successfully probed port.
</t>
</section>
<section
anchor="section_6EDEF553-C95A-47D7-ABBA-0B537FE3A959"
numbered="true"
removeInRFC="false"
toc="default">
<name>Authentication</name>
<t>
There is some overlap between the authentication
capabilities of RPC and TLS.
The goal of interoperability with implementations
that do not support TLS requires
limiting the combinations that are allowed
and
precisely specifying the role that each layer plays.
</t>
<t>
Each RPC server that supports RPC-with-TLS <bcp14>MUST</bcp14> possess a unique global identity
(e.g., a certificate that is signed by a well-known trust anchor).
Such an RPC server <bcp14>MUST</bcp14> request a TLS peer identity from each client
upon first contact.
There are two different modes of client deployment:
</t>
<dl newline="true" spacing="normal">
<dt>Server-only Host Authentication</dt>
<dd>
In this type of deployment,
the client can authenticate the server host
using the presented server peer TLS identity,
but the server cannot authenticate the client.
In this situation,
RPC-with-TLS clients are anonymous.
They present no globally unique identifier to the server peer.
</dd>
<dt>Mutual Host Authentication</dt>
<dd>
In this type of deployment,
the client possesses an identity that is backed by a trusted entity
(e.g. a pre-shared key or a certificate validated with a certification path).
As part of the TLS handshake, both peers authenticate using the presented TLS identities.
If authentication of either peer fails,
or
if authorization based on those identities blocks access to the server,
the peers <bcp14>MUST</bcp14> reject the association.
Further explanation appears in
<xref target="section_936921ED-67BB-46BF-B316-6740E07F6652" format="default" sectionFormat="of"/>.
</dd>
</dl>
<t>
In either of these modes, RPC user authentication is not affected
by the use of transport layer security.
When a client presents a TLS peer identity to an RPC server,
the protocol extension described in the current document
provides no way for the server to know
whether that identity represents one RPC user on that client,
or
is shared amongst many RPC users.
Therefore, a server implementation cannot utilize
the remote TLS peer identity to authenticate RPC users.
</t>
<section
anchor="section_12D92596-F310-48C8-A4E0-B6CA038524E5"
numbered="true"
removeInRFC="false"
toc="default">
<name>Using TLS with RPCSEC GSS</name>
<t>
To use GSS, an RPC server has to possess a GSS service principal.
On a TLS session, GSS mutual (peer) authentication occurs as usual,
but only after a TLS session has been established for communication.
Authentication of RPCSEC GSS users is unchanged by the use of TLS.
</t>
<t>
RPCSEC GSS can also perform
per-request integrity or confidentiality protection.
When operating over a TLS session,
these GSS services become largely redundant.
An RPC implementation capable of concurrently using TLS and RPCSEC GSS
<bcp14>MUST</bcp14>
use GSS-API channel binding, as defined in
<xref target="RFC5056" format="default" sectionFormat="of"/>,
to determine when an underlying transport
provides a sufficient degree of confidentiality.
RPC-with-TLS implementations
<bcp14>MUST</bcp14>
provide the "tls-exporter" channel binding type, as defined in
<xref target="I-D.ietf-kitten-tls-channel-bindings-for-tls13" format="default" sectionFormat="of"/>.
</t>
</section>
</section>
</section>
<section
anchor="section_D93526DA-7B9D-419B-BE84-4AD8DA48577E"
numbered="true"
removeInRFC="false"
toc="default">
<name>TLS Requirements</name>
<t>
When peers negotiate a TLS session that is to transport RPC,
the following restrictions apply:
</t>
<ul spacing="normal" bare="false" empty="false">
<li>
Implementations <bcp14>MUST NOT</bcp14> negotiate TLS versions prior to v1.3
(for TLS
<xref target="RFC8446" format="default" sectionFormat="of"/>
or DTLS
<xref target="I-D.ietf-tls-dtls13" format="default" sectionFormat="of"/>
respectively).
Support for mandatory-to-implement ciphersuites
for the negotiated TLS version is <bcp14>REQUIRED</bcp14>.
</li>
<li>
Implementations
<bcp14>MUST</bcp14>
conform to the recommendations for TLS usage specified in BCP 195
<xref target="RFC7525" format="default" sectionFormat="of"/>.
Although RFC 7525 permits the use of TLS v1.2,
the requirement to use TLS v1.3 or later for RPC-with-TLS takes precedence.
Further, because TLS v1.3 ciphers
are qualitatively different than cipher suites in previous versions of TLS
and RFC 7525 predates TLS v1.3,
the cipher suite recommendations in RFC 7525 do not apply to RPC-with-(D)TLS.
A strict TLS mode for RPC-with-TLS that protects against STRIPTLS attacks
is discussed in detail in
<xref target="section_8894BDD2-0E0B-47A3-A2CB-70E4D93B55B0" format="default" sectionFormat="of"/>.
</li>
<li>
Implementations <bcp14>MUST</bcp14> support
certificate-based mutual authentication.
Support for PSK mutual authentication
is <bcp14>OPTIONAL</bcp14>;
see
<xref target="section_6DA9ED5F-BAD9-4126-95B7-E2331655A01E" format="default" sectionFormat="of"/>
for further details.
</li>
<li>
Negotiation of a ciphersuite providing confidentiality as
well as integrity protection is <bcp14>REQUIRED</bcp14>.
</li>
</ul>
<t>
Client implementations <bcp14>MUST</bcp14> include the
"application_layer_protocol_negotiation(16)" extension
<xref target="RFC7301" format="default" sectionFormat="of"/>
in their "ClientHello" message
and <bcp14>MUST</bcp14> include the protocol identifier
defined in
<xref target="section_58905D7A-06B1-4469-964A-DAC607DAC500" format="default" sectionFormat="of"/>
in that message's ProtocolNameList value.
</t>
<t>
Similarly, in response to the "ClientHello" message,
server implementations <bcp14>MUST</bcp14> include the
"application_layer_protocol_negotiation(16)" extension
<xref target="RFC7301" format="default" sectionFormat="of"/>
in their "ServerHello" message
and <bcp14>MUST</bcp14> include only the protocol identifier
defined in
<xref target="section_58905D7A-06B1-4469-964A-DAC607DAC500" format="default" sectionFormat="of"/>
in that message's ProtocolNameList value.
</t>
<t>
If the server responds incorrectly
(for instance, if the "ServerHello" message does not conform to the above requirements),
the client <bcp14>MUST NOT</bcp14> establish a TLS session for use with RPC
on this connection.
See
<xref target="RFC7301" format="default" sectionFormat="of"/>
for further details about how to form these messages properly.
</t>
<section
anchor="section_CC204592-F561-49BD-B1C9-DE0FF7F0E7AB"
numbered="true"
removeInRFC="false"
toc="default">
<name>Base Transport Considerations</name>
<t>
There is traditionally a strong association between an RPC program
and a destination port number.
The use of TLS or DTLS does not change that association.
Thus it is frequently --
though not always --
the case that a single TLS session
carries traffic for only one RPC program.
</t>
<section
anchor="section_74B43C7E-5ADC-4FBD-B4EA-FF8F470994A8"
numbered="true"
removeInRFC="false"
toc="default">
<name>Protected Operation on TCP</name>
<t>
The use of the Transport Layer Security (TLS) protocol
<xref target="RFC8446" format="default" sectionFormat="of"/>
protects RPC on TCP connections.
Typically,
once an RPC client completes the TCP handshake,
it uses the mechanism described in
<xref target="section_0A03673B-14BA-4228-8A8A-F76AA318CA73" format="default" sectionFormat="of"/>
to discover RPC-with-TLS support for that RPC program on that connection.
Until an AUTH_TLS probe is done on a connection,
the RPC server treats all traffic as RPC messages.
If spurious traffic appears on a TCP connection
between the initial clear-text AUTH_TLS probe
and
the TLS session handshake,
receivers <bcp14>MUST</bcp14> discard that data without response
and then <bcp14>SHOULD</bcp14> drop the connection.
</t>
<t>
The protocol convention specified in the current document
assumes there can be no more than one concurrent TLS session
per TCP connection.
This is true of current generations of TLS,
but might be different in a future version of TLS.
</t>
<t>
Once a TLS session is established on a TCP connection,
no further clear-text communication can occur on that connection
until the session is terminated.
The use of TLS does not alter RPC record framing used on TCP transports.
</t>
<t>
Furthermore,
if an RPC server responds with PROG_UNAVAIL
to an RPC Call within an established TLS session,
that does not imply that RPC server will subsequently
reject the same RPC program on a different TCP connection.
</t>
<t>
Reverse-direction operation occurs only on connected transports such as TCP
(see
<xref target="RFC8167" section="2" format="default" sectionFormat="of"/>).
To protect reverse-direction RPC operations,
the RPC server does not establish a separate TLS session on the TCP connection,
but instead uses the existing TLS session on that connection to protect
these operations.
</t>
<t>
When operation is complete,
an RPC peer terminates a TLS session by sending a TLS Closure Alert.
It may then close the TCP connection.
</t>
</section>
<section
anchor="section_B8BF600E-96DC-4C82-AADF-D593826E9B75"
numbered="true"
removeInRFC="false"
toc="default">
<name>Protected Operation on UDP</name>
<t>
RFC Editor:
In the following section,
please replace TBD with the connection_id extension number
that is to be assigned in
<xref target="I-D.ietf-tls-dtls-connection-id" format="default" sectionFormat="of"/>.
And, please remove this Editor's Note
before this document is published.
</t>
<t>
The use of the Datagram Transport Layer Security (DTLS) protocol
<xref target="I-D.ietf-tls-dtls13" format="default" sectionFormat="of"/>
protects RPC carried in UDP datagrams.
As soon as a client initializes a UDP socket
for use with an RPC service,
it uses the mechanism described in
<xref target="section_0A03673B-14BA-4228-8A8A-F76AA318CA73" format="default" sectionFormat="of"/>
to discover RPC-with-DTLS support for that RPC program on that port.
If spurious traffic appears on a 5-tuple between
the initial clear-text AUTH_TLS probe
and
the DTLS association handshake,
receivers
<bcp14>MUST</bcp14>
discard that traffic without response.
</t>
<t>
Using DTLS does not introduce
reliable
or
in-order
semantics to RPC on UDP.
The use of DTLS record replay protection is <bcp14>REQUIRED</bcp14>
when transporting RPC traffic.
</t>
<t>
Each RPC message <bcp14>MUST</bcp14> fit in a single DTLS record.
DTLS encapsulation has overhead,
which reduces the Packetization Layer Path MTU (PLPMTU)
and thus the maximum RPC payload size.
A possible PLPMTU discovery mechanism is offered in
<xref target="RFC8899" format="default" sectionFormat="of"/>.
</t>
<t>
The current document does not specify a mechanism
that enables a server to distinguish between
DTLS traffic
and
unprotected RPC traffic
directed to the same port.
To make this distinction,
each peer matches ingress datagrams
that appear to be DTLS traffic to existing DTLS session state.
A peer treats any datagram that fails the matching process as an RPC message.
</t>
<t>
Multi-homed RPC clients and servers may send protected RPC messages
via network interfaces that were not involved in the handshake that
established the DTLS session.
Therefore, when protecting RPC traffic,
each DTLS handshake <bcp14>MUST</bcp14> include the "connection_id(TBD)" extension
described in
<xref target="I-D.ietf-tls-dtls13" section="9" format="default" sectionFormat="of"/>,
and RPC-with-DTLS peer endpoints
<bcp14>MUST</bcp14>
provide a ConnectionID
with a non-zero length.
Endpoints implementing RPC programs
that expect a significant number of concurrent clients
<bcp14>SHOULD</bcp14>
employ ConnectionIDs of at least 4 bytes in length.
</t>
<t>
Sending a TLS Closure Alert terminates a DTLS session.
Because neither DTLS nor UDP provide in-order delivery,
after session closure there can be ambiguity
as to whether a datagram should be interpreted as DTLS protected or not.
Therefore receivers
<bcp14>MUST</bcp14>
discard datagrams
exchanged using the same 5-tuple that just
terminated the DTLS session for a
sufficient length of time to ensure that retransmissions have ceased and
packets already in the network have been delivered.
In the absence of more specific data,
a period of 60 seconds is expected to suffice.
</t>
</section>
<section
anchor="section_BFCC24B1-E6D4-4ABC-A5F3-B71E8E96878F"
numbered="true"
removeInRFC="false"
toc="default">
<name>Protected Operation on Other Transports</name>
<t>
Transports that provide intrinsic TLS-level security
(e.g., QUIC)
need to be addressed separately from the current document.
In such cases, the use of TLS is not opportunistic
as it can be for TCP or UDP.
</t>
<t>
RPC-over-RDMA can make use of transport layer security
below the RDMA transport layer
<xref target="RFC8166" format="default" sectionFormat="of"/>.
The exact mechanism is not within the scope of the current document.
Because there might not be other provisions
to exchange client and server certificates,
authentication material exchange
needs to be provided by facilities
within a future version
of the RPC-over-RDMA transport protocol.
</t>
</section>
</section>
<section
anchor="section_936921ED-67BB-46BF-B316-6740E07F6652"
numbered="true"
removeInRFC="false"
toc="default">
<name>TLS Peer Authentication</name>
<t>
TLS can perform peer authentication
using any of the following mechanisms.
</t>
<section
anchor="section_7A68F518-2C02-4705-8218-4F13E51372F4"
numbered="true"
removeInRFC="false"
toc="default">
<name>X.509 Certificates Using PKIX Trust</name>
<t>
X.509 certificates are specified in
<xref target="X.509" format="default" sectionFormat="of"/>.
<xref target="RFC5280" format="default" sectionFormat="of"/>
provides a profile of Internet PKI X.509 public key infrastructure.
RPC-with-TLS implementations are
<bcp14>REQUIRED</bcp14>
to support the PKIX mechanism described in
<xref target="RFC5280" format="default" sectionFormat="of"/>.
</t>
<t>
The rules and guidelines defined in
<xref target="RFC6125" format="default" sectionFormat="of"/>
apply to RPC-with-TLS certificates
with the following considerations:
</t>
<ul spacing="normal" bare="false" empty="false">
<li>
The DNS-ID identifier type is a subjectAltName extension
that contains a dNSName, as defined in
<xref target="RFC5280" section="4.2.1.6" format="default" sectionFormat="of"/>.
Support for the DNS-ID identifier type is
<bcp14>REQUIRED</bcp14>
in RPC-with-TLS client and server implementations.
Certification authorities that issue such certificates
<bcp14>MUST</bcp14>
support the DNS-ID identifier type.
</li>
<li>
To specify the identity of an RPC peer as
a domain name,
the certificate
<bcp14>MUST</bcp14>
contain a subjectAltName extension that contains a dNSName.
DNS domain names in RPC-with-TLS certificates
<bcp14>MUST NOT</bcp14>
contain the wildcard character '*'
within the identifier.
</li>
<li>
To specify the identity of an RPC peer as
a network identifier (netid)
or
a universal network address (uaddr),
the certificate
<bcp14>MUST</bcp14>
contain a subjectAltName extension that contains an iPAddress.
</li>
</ul>
<t>
When validating a server certificate,
an RPC-with-TLS client implementation
takes the following into account:
</t>
<ul spacing="normal" bare="false" empty="false">
<li>
Certificate validation
<bcp14>MUST</bcp14>
include the verification rules as per
<xref target="RFC5280" section="6" format="default" sectionFormat="of"/>
and
<xref target="RFC6125" section="6" format="default" sectionFormat="of"/>.
</li>
<li>
Server certificate validation
<bcp14>MUST</bcp14>
include a check on whether
the locally configured expected
DNS-ID
or
iPAddress subjectAltName
of the server that is contacted
matches its presented certificate.
</li>
<li>
For RPC services accessed by their
network identifiers (netids)
and
universal network addresses (uaddr),
the iPAddress subjectAltName
<bcp14>MUST</bcp14>
be present in the certificate
and
<bcp14>MUST</bcp14>
exactly match the address represented by the universal network address.
</li>
</ul>
<t>
An RPC client's
domain name
and
IP address
are often assigned dynamically,
thus RPC servers cannot rely on those to verify client certificates.
Therefore, when an RPC-with-TLS client presents a certificate
to an RPC-with-TLS server,
the server takes the following into account:
</t>
<ul spacing="normal" bare="false" empty="false">
<li>
The server
<bcp14>MUST</bcp14>
use a procedure conformant to
<xref target="RFC5280" section="6" format="default" sectionFormat="of"/>)
to validate the client certificate's certification path.
</li>
<li>
The tuple (serial number of the presented certificate; Issuer)
uniquely identifies the RPC client.
The meaning and syntax of these fields is defined in
<xref target="RFC5280" section="4" format="default" sectionFormat="of"/>).
</li>
</ul>
<t>
RPC-with-TLS implementations
<bcp14>MAY</bcp14>
allow the configuration
of a set of additional properties of the certificate
to check for a peer's authorization to communicate
(e.g.,
a set of allowed values in subjectAltName:URI,
a set of allowed X.509v3 Certificate Policies,
or
a set of extended key usages).