1b9cbc85dSRick Macklem.\" Copyright (c) 2008 Isilon Inc http://www.isilon.com/ 2b9cbc85dSRick Macklem.\" Authors: Doug Rabson <dfr@rabson.org> 3b9cbc85dSRick Macklem.\" Developed with Red Inc: Alfred Perlstein <alfred@FreeBSD.org> 4b9cbc85dSRick Macklem.\" 5b9cbc85dSRick Macklem.\" Redistribution and use in source and binary forms, with or without 6b9cbc85dSRick Macklem.\" modification, are permitted provided that the following conditions 7b9cbc85dSRick Macklem.\" are met: 8b9cbc85dSRick Macklem.\" 1. Redistributions of source code must retain the above copyright 9b9cbc85dSRick Macklem.\" notice, this list of conditions and the following disclaimer. 10b9cbc85dSRick Macklem.\" 2. Redistributions in binary form must reproduce the above copyright 11b9cbc85dSRick Macklem.\" notice, this list of conditions and the following disclaimer in the 12b9cbc85dSRick Macklem.\" documentation and/or other materials provided with the distribution. 13b9cbc85dSRick Macklem.\" 14b9cbc85dSRick Macklem.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15b9cbc85dSRick Macklem.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16b9cbc85dSRick Macklem.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17b9cbc85dSRick Macklem.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18b9cbc85dSRick Macklem.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19b9cbc85dSRick Macklem.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20b9cbc85dSRick Macklem.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21b9cbc85dSRick Macklem.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22b9cbc85dSRick Macklem.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23b9cbc85dSRick Macklem.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24b9cbc85dSRick Macklem.\" SUCH DAMAGE. 25b9cbc85dSRick Macklem.\" 26b9cbc85dSRick Macklem.\" Modified from gssd.8 for rpc.tlsclntd.8 by Rick Macklem. 277652321bSRick Macklem.Dd September 23, 2022 28b9cbc85dSRick Macklem.Dt RPC.TLSCLNTD 8 29b9cbc85dSRick Macklem.Os 30b9cbc85dSRick Macklem.Sh NAME 31b9cbc85dSRick Macklem.Nm rpc.tlsclntd 32b9cbc85dSRick Macklem.Nd "Sun RPC over TLS Client Daemon" 33b9cbc85dSRick Macklem.Sh SYNOPSIS 34b9cbc85dSRick Macklem.Nm 35915fc1afSRick Macklem.Op Fl 2 360bf3f379SRick Macklem.Op Fl C Ar available_ciphers 37b9cbc85dSRick Macklem.Op Fl D Ar certdir 38b9cbc85dSRick Macklem.Op Fl d 39b9cbc85dSRick Macklem.Op Fl l Ar CAfile 40b9cbc85dSRick Macklem.Op Fl m 41b9cbc85dSRick Macklem.Op Fl p Ar CApath 42b9cbc85dSRick Macklem.Op Fl r Ar CRLfile 43b9cbc85dSRick Macklem.Op Fl v 44b9cbc85dSRick Macklem.Sh DESCRIPTION 45b9cbc85dSRick MacklemThe 46b9cbc85dSRick Macklem.Nm 47b9cbc85dSRick Macklemprogram provides support for the client side of the kernel Sun RPC over TLS 48b9cbc85dSRick Macklemimplementation. 49b9cbc85dSRick MacklemThis daemon must be running for the kernel RPC to be able to do a TLS 50b9cbc85dSRick Macklemconnection to a server for an NFS over TLS mount. 51b9cbc85dSRick MacklemThis daemon requires that the kernel be built with 52b9cbc85dSRick Macklem.Dq options KERNEL_TLS 53b9cbc85dSRick Macklemand be running on an architecture such as 54b9cbc85dSRick Macklem.Dq amd64 55b9cbc85dSRick Macklemthat supports a direct map (not i386) with 56b9cbc85dSRick Macklem.Xr ktls 4 57b9cbc85dSRick Macklemenabled. 58b9cbc85dSRick Macklem.Pp 59b9cbc85dSRick MacklemIf either of the 60b9cbc85dSRick Macklem.Fl l 61b9cbc85dSRick Macklemor 62b9cbc85dSRick Macklem.Fl p 63b9cbc85dSRick Macklemoptions have been specified, the daemon will require the server's 64b9cbc85dSRick Macklemcertificate to verify 65b9cbc85dSRick Macklemand have a Fully Qualified Domain Name (FQDN) in it. 66b9cbc85dSRick MacklemThis FQDN must match 67b9cbc85dSRick Macklemthe reverse DNS name for the IP address that 68b9cbc85dSRick Macklemthe server is using for the TCP connection. 69b9cbc85dSRick MacklemThe FQDN may be 70b9cbc85dSRick Macklemin either the DNS field of the subjectAltName or the CN field of the 71b9cbc85dSRick MacklemsubjectName in the certificate and 72b9cbc85dSRick Macklemcannot have a wildcard 73b9cbc85dSRick Macklem.Dq * 74b9cbc85dSRick Macklemin it. 75b9cbc85dSRick Macklem.Pp 76b9cbc85dSRick MacklemIf a SIGHUP signal is sent to the daemon it will reload the 77b9cbc85dSRick Macklem.Dq CRLfile 78b9cbc85dSRick Macklemand will shut down any extant connections that presented certificates 79b9cbc85dSRick Macklemduring TLS handshake that have been revoked. 80b9cbc85dSRick MacklemIf the 81b9cbc85dSRick Macklem.Fl r 82b9cbc85dSRick Macklemoption was not specified, the SIGHUP signal will be ignored. 83b9cbc85dSRick Macklem.Pp 84b9cbc85dSRick MacklemThe daemon will log failed certificate verifications via 85b9cbc85dSRick Macklem.Xr syslogd 8 86b9cbc85dSRick Macklemusing LOG_INFO | LOG_DAEMON when the 87b9cbc85dSRick Macklem.Fl l 88b9cbc85dSRick Macklemor 89b9cbc85dSRick Macklem.Fl p 90b9cbc85dSRick Macklemoption has been specified. 91b9cbc85dSRick Macklem.Pp 92b9cbc85dSRick MacklemThe options are as follows: 93b9cbc85dSRick Macklem.Bl -tag -width indent 94915fc1afSRick Macklem.It Fl 2 , Fl Fl usetls1_2 95915fc1afSRick MacklemSpecify the use of TLS version 1.2. 96915fc1afSRick MacklemBy default, the client will 97915fc1afSRick Macklemuse TLS version 1.3, as required by the RFC. 98915fc1afSRick MacklemHowever, early 99915fc1afSRick Macklem.Fx 100915fc1afSRick Macklem.Pq 13.0 and 13.1 101915fc1afSRick Macklemservers require 102915fc1afSRick Macklemthis option, since they only support TLS version 1.2. 1030bf3f379SRick Macklem.It Fl C Ar available_ciphers , Fl Fl ciphers= Ns Ar available_ciphers 1040bf3f379SRick MacklemSpecify which ciphers are available during TLS handshake. 105b9cbc85dSRick MacklemIf this option is specified, 1060bf3f379SRick Macklem.Dq SSL_CTX_set_ciphersuites() 107b9cbc85dSRick Macklemwill be called with 1080bf3f379SRick Macklem.Dq available_ciphers 109b9cbc85dSRick Macklemas the argument. 110b9cbc85dSRick MacklemIf this option is not specified, the cipher will be chosen by 1110bf3f379SRick Macklem.Xr ssl 7 , 1120bf3f379SRick Macklemwhich should be adequate for most cases. 1130bf3f379SRick MacklemThe format for the available ciphers is a simple 1140bf3f379SRick Macklem.So 1150bf3f379SRick Macklem: 1160bf3f379SRick Macklem.Sc 1170bf3f379SRick Macklemseparated list, in order of preference. 1180bf3f379SRick MacklemThe command 1190bf3f379SRick Macklem.Dq openssl ciphers -s -tls1_3 1200bf3f379SRick Macklemlists available ciphers. 121b9cbc85dSRick Macklem.It Fl D Ar certdir , Fl Fl certdir= Ns Ar certdir 122b9cbc85dSRick MacklemUse 123b9cbc85dSRick Macklem.Dq certdir 124b9cbc85dSRick Mackleminstead of /etc/rpc.tlsclntd for the 125b9cbc85dSRick Macklem.Fl m 126b9cbc85dSRick Macklemoption. 127b9cbc85dSRick Macklem.It Fl d , Fl Fl debuglevel 128b9cbc85dSRick MacklemRun in debug mode. 129b9cbc85dSRick MacklemIn this mode, 130b9cbc85dSRick Macklem.Nm 131b9cbc85dSRick Macklemwill not fork when it starts. 132b9cbc85dSRick Macklem.It Fl l Ar CAfile , Fl Fl verifylocs= Ns Ar CAfile 133b9cbc85dSRick MacklemThis specifies the path name of a CAfile which holds the information 134b9cbc85dSRick Macklemfor server certificate verification. 135b9cbc85dSRick MacklemThis path name is used in 136b9cbc85dSRick Macklem.Dq SSL_CTX_load_verify_locations(ctx,CAfile,NULL) 137b9cbc85dSRick Macklemand 138b9cbc85dSRick Macklem.Dq SSL_CTX_set0_CA_list(ctx,SSL_load_client_CA_file(CAfile)) 139b9cbc85dSRick Macklemopenssl library calls. 140b9cbc85dSRick MacklemNote that this is a path name for the file and is not assumed to be 141b9cbc85dSRick Macklemin 142b9cbc85dSRick Macklem.Dq certdir . 143b9cbc85dSRick Macklem.It Fl m , Fl Fl mutualverf 144b9cbc85dSRick MacklemEnable support for mutual authentication. 145b9cbc85dSRick MacklemA certificate and associated key must be found in /etc/rpc.tlsclntd 146b9cbc85dSRick Macklem(or the directory specified by the 147b9cbc85dSRick Macklem.Fl D 148b9cbc85dSRick Macklemoption) 149b9cbc85dSRick Macklemin case a server requests a peer certificate. 150b9cbc85dSRick MacklemThe first certificate needs to be in a file named 151b9cbc85dSRick Macklem.Dq cert.pem 152b9cbc85dSRick Macklemand the associated key in a file named 153b9cbc85dSRick Macklem.Dq certkey.pem . 154b9cbc85dSRick MacklemThe 155b9cbc85dSRick Macklem.Xr mount_nfs 8 156b9cbc85dSRick Macklemoption 157b9cbc85dSRick Macklem.Fl tlscertname 158b9cbc85dSRick Macklemcan be used to override the default certificate for a given 159b9cbc85dSRick MacklemNFS mount, where the files use the alternate naming specified by the option. 160b9cbc85dSRick MacklemIf there is a passphrase on the 161b9cbc85dSRick Macklem.Dq certkey.pem 162b9cbc85dSRick Macklemfile, this daemon will prompt for the passphrase during startup. 163b9cbc85dSRick MacklemThe keys for alternate certificates cannot have passphrases. 164b9cbc85dSRick Macklem.It Fl p Ar CApath , Fl Fl verifydir= Ns Ar CApath 165b9cbc85dSRick MacklemThis option is similar to the 166b9cbc85dSRick Macklem.Fl l 167b9cbc85dSRick Macklemoption, but specifies the path of a directory with CA 168b9cbc85dSRick Macklemcertificates in it. 169b9cbc85dSRick MacklemWhen this option is used, 170b9cbc85dSRick Macklem.Dq SSL_CTX_set0_CA_list(ctx,SSL_load_client_CA_file()) 171b9cbc85dSRick Macklemis not called, so a list of CA names is not be passed 172b9cbc85dSRick Macklemto the server during the TLS handshake. 173b9cbc85dSRick MacklemThe openssl documentation indicates this call is rarely needed. 174b9cbc85dSRick Macklem.It Fl r Ar CRLfile , Fl Fl crl= Ns Ar CRLfile 175b9cbc85dSRick MacklemThis option specifies a Certificate Revocation List (CRL) file 176b9cbc85dSRick Macklemthat is to be loaded into the verify certificate store and 177b9cbc85dSRick Macklemchecked during verification of the server's certificate. 178b9cbc85dSRick MacklemThis option is meaningless unless either the 179b9cbc85dSRick Macklem.Fl l 180b9cbc85dSRick Macklemor 181b9cbc85dSRick Macklem.Fl p 182b9cbc85dSRick Macklemhave been specified. 183b9cbc85dSRick Macklem.It Fl v , Fl Fl verbose 184b9cbc85dSRick MacklemRun in verbose mode. 185b9cbc85dSRick MacklemIn this mode, 186b9cbc85dSRick Macklem.Nm 187b9cbc85dSRick Macklemwill log activity messages to syslog using LOG_INFO | LOG_DAEMON or to 188b9cbc85dSRick Macklemstderr, if the 189b9cbc85dSRick Macklem.Fl d 190b9cbc85dSRick Macklemoption has also been specified. 191b9cbc85dSRick Macklem.El 192b9cbc85dSRick Macklem.Sh EXIT STATUS 193b9cbc85dSRick Macklem.Ex -std 194b9cbc85dSRick Macklem.Sh SEE ALSO 195b9cbc85dSRick Macklem.Xr openssl 1 , 196b9cbc85dSRick Macklem.Xr ktls 4 , 197*6e1fc011SGraham Percival.Xr ssl 7 , 198b9cbc85dSRick Macklem.Xr mount_nfs 8 , 199b9cbc85dSRick Macklem.Xr rpc.tlsservd 8 , 200b9cbc85dSRick Macklem.Xr syslogd 8 201b9cbc85dSRick Macklem.Sh STANDARDS 202b9cbc85dSRick MacklemThe implementation is based on the specification in 203b9cbc85dSRick Macklem.Rs 2047652321bSRick Macklem.%B "RFC 9289" 205b9cbc85dSRick Macklem.%T "Towards Remote Procedure Call Encryption By Default" 206b9cbc85dSRick Macklem.Re 207b9cbc85dSRick Macklem.Sh HISTORY 208b9cbc85dSRick MacklemThe 209b9cbc85dSRick Macklem.Nm 210b9cbc85dSRick Macklemmanual page first appeared in 211b9cbc85dSRick Macklem.Fx 13.0 . 212b9cbc85dSRick Macklem.Sh BUGS 213b9cbc85dSRick MacklemThis daemon cannot be safely shut down and restarted if there are 214b9cbc85dSRick Macklemany active RPC-over-TLS connections. 215b9cbc85dSRick MacklemDoing so will orphan the KERNEL_TLS connections, so that they 216b9cbc85dSRick Macklemcan no longer do upcalls successfully, since the 217b9cbc85dSRick Macklem.Dq SSL * 218b9cbc85dSRick Macklemstructures in userspace have been lost. 219