When peers negotiate a TLS session that is to transport RPC, the following restrictions apply:
-
Implementations MUST NOT negotiate TLS versions prior to 1.3(for TLS[RFC 8446]or DTLS [RFC 9147],respectively). Support for mandatory-to-implement cipher suites for thenegotiated TLS version is REQUIRED.
-
Implementations MUST conform to the recommendations for TLSusage specified in BCP 195 [RFC 7525]. Although RFC 7525 permits the use of TLS 1.2, therequirement to use TLS 1.3 or later for RPC-with-TLS takes precedence.Further, because TLS 1.3 ciphers are qualitatively different than ciphersuites in previous versions of TLS, and RFC 7525 predates TLS 1.3, the ciphersuite recommendations in RFC 7525 do not apply to RPC-with-(D)TLS. A strictTLS mode for RPC-with-TLS that protects against STRIPTLS attacks is discussedin detail in Section 6.1.1.
-
Implementations MUST support certificate-based mutualauthentication. Support for Pre-Shared Key (PSK) mutual authentication isOPTIONAL; seeSection 5.2.2for further details.
-
Negotiation of a cipher suite providing confidentiality aswell as integrity protection is REQUIRED.
Client implementations
MUST include the "application_layer_protocol_negotiation(16)" extension [
RFC 7301] in their "ClientHello" message and
MUST include the protocol identifier defined in
Section 7.2 in that message's ProtocolNameList value.
Similarly, in response to the "ClientHello" message, server implementations
MUST include the "application_layer_protocol_negotiation(16)" extension [
RFC 7301] in their "ServerHello" message and
MUST include only the protocol identifier defined in
Section 7.2 in that message's ProtocolNameList value.
If the server responds incorrectly (for instance, if the "ServerHello" message does not conform to the above requirements), the client
MUST NOT establish a TLS session for use with RPC on this connection. See [
RFC 7301] for further details about how to form these messages properly.
There is frequently a strong association between an RPC program and a particular 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.
The use of the TLS protocol [
RFC 8446] protects RPC on TCP connections. Typically, once an RPC client completes the TCP handshake, it uses the mechanism described in
Section 4.1 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 cleartext AUTH_TLS probe and the TLS session handshake, receivers
MUST discard that data without response and then
SHOULD drop the connection.
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.
Once a TLS session is established on a TCP connection, no further cleartext 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.
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.
Reverse-direction operation occurs only on connected transports such as TCP (see
Section 2 of
RFC 8167). 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.
When operation is complete, an RPC peer terminates a TLS session by sending a TLS closure alert. It may then close the TCP connection.
The use of the DTLS protocol [
RFC 9147] 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
Section 4.1 to discover RPC-with-DTLS support for that RPC program on that port. If spurious traffic appears on a 5-tuple between the initial cleartext AUTH_TLS probe and the DTLS association handshake, receivers
MUST discard that traffic without response.
Using DTLS does not introduce reliable or in-order semantics to RPC on UDP. The use of DTLS record replay protection is
REQUIRED when transporting RPC traffic.
Each RPC message
MUST 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 [
RFC 8899].
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.
Multihomed 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
MUST include the "connection_id(54)" extension described in
Section 9 of
RFC 9147, and RPC-with-DTLS peer endpoints
MUST provide a ConnectionID with a nonzero length. Endpoints implementing RPC programs that expect a significant number of concurrent clients
SHOULD employ ConnectionIDs of at least 4 bytes in length.
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
MUST 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.
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.
RPC-over-RDMA can make use of transport layer security below the RDMA transport layer [
RFC 8166]. 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.
TLS can perform peer authentication using any of the following mechanisms.
X.509 certificates are specified in [
X.509]. [
RFC 5280] provides a profile of Internet PKI X.509 public key infrastructure. RPC-with-TLS implementations are
REQUIRED to support the PKIX mechanism described in [
RFC 5280].
The rules and guidelines defined in [
RFC 6125] apply to RPC-with-TLS certificates with the following considerations:
-
The DNS-ID identifier type is a subjectAltName extension that contains adNSName, as defined in Section 4.2.1.6 of RFC 5280. Support for the DNS-ID identifier typeis REQUIRED in RPC-with-TLS client and server implementations.Certification authorities that issue such certificates MUSTsupport the DNS-ID identifier type.
-
To specify the identity of an RPC peer as a domain name, the certificateMUST contain a subjectAltName extension that contains adNSName. DNS domain names in RPC-with-TLS certificates MUST NOTcontain the wildcard character '*' within the identifier.
-
To specify the identity of an RPC peer as a network identifier (netid) or a universal network address (uaddr), the certificate MUST contain a subjectAltName extension that contains an iPAddress.
When validating a server certificate, an RPC-with-TLS client implementation takes the following into account:
-
Certificate validationMUSTinclude the verification rules as perSection 6 of RFC 5280andSection 6 of RFC 6125.
-
Server certificate validationMUSTinclude a check on whetherthe locally configured expectedDNS-IDoriPAddress subjectAltNameof the server that is contactedmatches its presented certificate.
-
For RPC services accessed by theirnetidsanduaddrs,the iPAddress subjectAltNameMUSTbe present in the certificateandMUSTexactly match the address represented by the universal network address.
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:
-
The server MUST use a procedure conformant to Section 6 of RFC 5280 tovalidate the client certificate's certification path.
-
The tuple (serial number of the presented certificate; Issuer) uniquelyidentifies the RPC client. The meaning and syntax of these fields is definedin Section 4 of RFC 5280.
RPC-with-TLS implementations
MAY 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).
When the configured set of trust anchors changes (e.g., removal of a Certification Authority (CA) from the list of trusted CAs; issuance of a new Certificate Revocation List (CRL) for a given CA), implementations
SHOULD reevaluate the certificate originally presented in the context of the new configuration and terminate the TLS session if the certificate is no longer trustworthy.
Section 4.2.1.12 of
RFC 5280 specifies the extended key usage X.509 certificate extension. This extension, which may appear in end-entity certificates, indicates one or more purposes for which the certified public key may be used in addition to or in place of the basic purposes indicated in the key usage extension.
The current document defines two new KeyPurposeId values: one that identifies the RPC-with-TLS peer as an RPC client, and one that identifies the RPC-with-TLS peer as an RPC server.
The inclusion of the RPC server value (id-kp-rpcTLSServer) indicates that the certificate has been issued for allowing the holder to process RPC transactions.
The inclusion of the RPC client value (id-kp-rpcTLSClient) indicates that the certificate has been issued for allowing the holder to request RPC transactions.
This mechanism is
OPTIONAL to implement. In this mode, the RPC peer can be uniquely identified by keying material that has been shared out of band (see
Section 2.2 of
RFC 8446). The PSK Identifier
SHOULD be exposed at the RPC layer.