Imported Upstream version 3.2.0
[debian/amanda] / man / amanda-auth.7
index cc4bdf386e9df4ec3948e5c097a4ac46a43993e6..84e2fef22191cee0495688e74f8a11173cd7eb5c 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: amanda-auth
 .\"    Author: Jean-Louis Martineau <martineau@zmanda.com>
 .\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\"      Date: 06/01/2010
+.\"      Date: 10/18/2010
 .\"    Manual: Miscellanea
-.\"    Source: Amanda 3.1.0
+.\"    Source: Amanda 3.2.0
 .\"  Language: English
 .\"
-.TH "AMANDA\-AUTH" "7" "06/01/2010" "Amanda 3\&.1\&.0" "Miscellanea"
+.TH "AMANDA\-AUTH" "7" "10/18/2010" "Amanda 3\&.2\&.0" "Miscellanea"
 .\" -----------------------------------------------------------------
 .\" * set default formatting
 .\" -----------------------------------------------------------------
@@ -30,13 +30,10 @@ parameter are
 \fBbsd\fR,
 \fBbsdudp\fR,
 \fBbsdtcp\fR,
-\fBkrb4\fR,
 \fBkrb5\fR,
 \fBlocal\fR,
 \fBrsh\fR, and
-\fBssh\fR\&. Please note that
-\fBkrb4\fR
-will be removed in the next release\&. The authentication and communication method is used during the backup process
+\fBssh\fR\&. The authentication and communication method is used during the backup process
 \fBamdump\fR
 (amdump(8)) as well as the recovery process
 \fBamrecover\fR
@@ -106,15 +103,22 @@ There are additional configure options for Kerberos if you so desire\&. All but
    \-\-with\-client\-instance=ARG     client host instance   [HOSTNAME_INSTANCE]
    \-\-with\-client\-keyfile=ARG      client host key file   [KEYFILE]
    \-\-with\-ticket\-lifetime=ARG     ticket lifetime        [128]
-   \-\-with\-krb4\-security=DIR       where libkrb\&.a lives   [see below]
    \-\-with\-krb5\-security=DIR       where libkrb\&.a lives   [see below]
 .fi
 .PP
-If configuring with \-\-with\-krb4\-security and/or \-\-with\-krb5\-security, the configure script will search under /usr/kerberos/lib, /usr/cygnus/lib, /usr/lib, and /opt/kerberos/lib for the kerberos bits, libkrb\&.a, in this order\&. Kerberos support will not be added if it does not find them\&. If the kerberos bits are found under some other hierarchy, you can specify this via \-\-with\-krb5\-security=DIR and/or \-\-with\-krb4\-security=DIR, where DIR is where the kerberos bits live\&. The configure script will then look in the \'lib\' directory under this hierarchy for libkrb\&.a\&.
+If configuring with \-\-with\-krb5\-security, the configure script will search under /usr/kerberos/lib, /usr/cygnus/lib, /usr/lib, and /opt/kerberos/lib for the kerberos bits, libkrb\&.a, in this order\&. Kerberos support will not be added if it does not find them\&. If the kerberos bits are found under some other hierarchy, you can specify this via \-\-with\-krb5\-security=DIR where DIR is where the kerberos bits live\&. The configure script will then look in the \'lib\' directory under this hierarchy for libkrb\&.a\&.
 .PP
 The
 \fBauth\fR
 parameter selects a communication/authentication method to use between the client and the backup server\&. These methods are described each in their own section below\&.
+.SS "Usernames"
+.PP
+When Amanda is built, a username is specified with the
+\fB\-\-with\-user\fR
+option\&. Most Amanda processes run under this user\'s identity, to minimize security risks\&. In binary distributions, this username is usually one of \'amanda\', \'amandabackup\', or \'backup\'\&. The examples below use \'amandabackup\' since it is unambiguous\&. You may need to adjust accordingly for your system\&.
+.SS "Authenticated Peer Hostnames"
+.PP
+Amanda\'s authentication mechanisms provide an authenticated hostname of the system on the other end of the connection, which is used to restrict access to only particular hosts\&. The degree of "authentication" performed on this hostname varies with the authentication mechanism, and is discussed below\&.
 .SH "BSD, BSDUDP, AND BSDTCP COMMUNICATION AND AUTHENTICATION"
 .PP
 For additional information including example configurations, see http://wiki\&.zmanda\&.com/index\&.php/Configuring_bsd/bsdudp/bsdtcp_authentication\&.
@@ -125,6 +129,8 @@ The
 \fBbsdtcp\fR
 communication methods use either UDP, TCP, or both protocols operating as a network service to authenticate and exchange data between server and clients\&.
 .PP
+The authentication proceeds as follows: for a new, incoming connection, Amanda verifies that the source port is in the reserved range (less than 1024), which for UNIX hosts suggests that the remote user has root privileges\&. Amanda then verifies that the reverse DNS for the remote address matches the forward DNS; that is, that the address maps to a hostname which maps back to the same address\&. Finally, the remote system must provide a username that matches the username in \&.amandahosts\&.
+.PP
 In addition to compilation and general configuration (see
 \fBCOMPILATION AND GENERAL INFORMATION\fR
 above), the authentication method that the client is configured to receive is specified by the
@@ -134,7 +140,7 @@ parameter in the network service configuration for Amanda\&. The authentication
 parameter in the client\'s Amanda network service configuration or in its amanda\-client\&.conf file (see amanda\-client\&.conf(5))\&.
 .PP
 By default, Amanda use the "amanda" service name and associated port set in /etc/services\&. It can be changed by setting the dumptype
-\fIclient_port\fR
+\fIclient\-port\fR
 option to a different port number or a different service name\&. All examples are for the service name "amanda" that uses the default port 10080\&.
 .SS "\&.amandahosts file"
 .PP
@@ -177,7 +183,7 @@ If service is omitted, it defaults to
 (which is equivalent to
 \fBamdump\fR)\&.
 .PP
-Example of the \&.amandahosts file on an Amanda client
+Example of the \&.amandahosts file on an Amanda client, where \'amandabackup\' is the Amanda dumpuser\&.
 .sp
 .nf
     \fBamandaserver\&.example\&.com   amandabackup   amdump\fR
@@ -222,7 +228,7 @@ Client example of using
 authorization for inetd server given Amanda user is "amandabackup":
 .sp
 .nf
-\fB   amanda stream tcp nowait amanda /path/to/amandad amandad \-auth=bsdtcp amdump\fR
+\fB   amanda stream tcp nowait amandabackup /path/to/amandad amandad \-auth=bsdtcp amdump\fR
 .fi
 .PP
 \fBamindexd\fR
@@ -237,7 +243,7 @@ Server example of using
 authorization for inetd server given Amanda user is "amandabackup":
 .sp
 .nf
-\fB   amanda stream tcp nowait amanda /path/to/amandad amandad \-auth=bsdtcp amdump amindexd amidxtaped\fR
+\fB   amanda stream tcp nowait amandabackup /path/to/amandad amandad \-auth=bsdtcp amdump amindexd amidxtaped\fR
 .fi
 .PP
 For Amanda version 2\&.5\&.0 and earlier, remember that neither
@@ -271,8 +277,8 @@ instead and, again, the server must be running the amandaidx and amidxtape netwo
 Example of amindexd and amidxtaped Amanda daemon services configured as their own network services for a 2\&.5\&.0 or earlier server or a newer server having 2\&.5\&.0 or earlier clients
 .sp
 .nf
-\fB   amandaidx stream tcp nowait amanda /usr/local/libexec/amanda/current/amindexd   amindexd\fR
-\fB   amidxtape stream tcp nowait amanda /usr/local/libexec/amanda/current/amidxtaped amidxtaped\fR
+\fB   amandaidx stream tcp nowait amandabackup /usr/local/libexec/amanda/current/amindexd   amindexd\fR
+\fB   amidxtape stream tcp nowait amandabackup /usr/local/libexec/amanda/current/amidxtaped amidxtaped\fR
 .fi
 .SS "USING XINETD SERVER"
 .PP
@@ -432,52 +438,24 @@ parameters in amanda\&.conf and amanda\-client\&.conf configuration files (see
 \fBamanda.conf\fR(5)
 and
 \fBamanda-client.conf\fR(5))\&.
+.SS "Authenticated Peer Hostnames with BSD Authentications"
+.PP
+The BSD authentication mechanisms only verify that the remote host\'s DNS is configured correctly and that the remote user has access to reserved ports\&. As such, the peer hostname should only be trusted to the extent that the local DNS service is trusted\&.
 .SH "KERBEROS COMMUNICATION AND AUTHENTICATION"
 
 For more detail, see http://wiki\&.zmanda\&.com/index\&.php/Kerberos_authentication\&.
 .PP
-Amanda supports Kerberos 4 and 5 communication methods between Amanda server and client\&. Please note, however, that support for Kerberos 4 will be removed in the next release\&.
+Amanda supports Kerberos 5 communication methods between Amanda server and client\&.
 .PP
 General information including compilation are given above (see
 \fBCOMPILATION AND GENERAL INFORMATION\fR
-above)\&. Below sections give specific Kerberos 4 and 5 information\&.
-.SS "KERBEROS v4"
-
-Please note that support for Kerberos 4 will be removed in the next release\&.
-
-Kerberos 4 uses UDP protocol and the number of DLEs is limited by UDP packet size\&.
-
-The kerberized AMANDA service uses a different port on the client hosts\&. The /etc/services line is:
-
-    kamanda      10081/udp
-.PP
-And the /etc/inetd\&.conf line is:
-.sp
-.nf
-    kamanda dgram udp wait root /usr/local/libexec/amanda/amandad amandad \-auth=krb4
-.fi
-.PP
-Note that you\'re running this as root, rather than as your dump user\&. AMANDA will set its uid down to the dump user at times it doesn\'t need to read the srvtab file, and give up root permissions entirely before it goes off and runs dump\&. Alternately you can change your srvtab files to be readable by user amanda\&.
-.PP
-The following dumptype options apply to krb4:
-.sp
-.nf
-auth "krb4"    # use krb4 auth for this host
-               # (you can mingle krb hosts and bsd \&.rhosts in one conf)
-kencrypt       # encrypt this filesystem over the net using the krb4
-               # session key\&.  About 2x slower\&.  Good for those root
-               # partitions containing your keyfiles\&.  Don\'t want to
-               # give away the keys to an ethernet sniffer!
-               # This is currently always enabled\&.  There is no
-               # way to disable it\&.  This is a bug\&.
-.fi
-.SS "KERBEROS v5"
+above)\&.
 .PP
 Kerberos 5 uses TCP and the server uses only one TCP port and data streams are multiplexed to this port\&.
 
 
 The \fBkrb5\fR driver script defaults to:
-
+.nf
 /*
  * The lifetime of our tickets in minutes\&.
  */
@@ -487,12 +465,15 @@ The \fBkrb5\fR driver script defaults to:
  * The name of the service in /etc/services\&.
  */
 #define AMANDA_KRB5_SERVICE_NAME        "k5amanda"
+.fi
+
 
 You can currently only override these by editing the source code\&.
 
 The kerberized AMANDA service uses a different port on the client hosts\&. The /etc/services line is:
-
+.nf
    k5amanda      10082/tcp
+.fi
 .PP
 And the /etc/inetd\&.conf line is:
 .sp
@@ -557,11 +538,16 @@ Here are examples of valid entries in the \&.k5amandahosts:
 Rather than using a \&.k5amandahosts or \&.k5login file, the easiest way is to use a principal named after the destination user, (such as amanda@TEST\&.COM in our example) and not have either a \&.k5amandahosts or \&.k5login file in the destination user\'s home directory\&.
 .PP
 There is no attempt to verify the realm in this case (only a concern if you have cross\-realm authentication setup)\&.
+.SS "Authenticated Peer Hostnames with Kerberos Authentication"
+.PP
+When accepting a new incoming connection, the Kerberos authentication mechanism performs a similar check to that done by the BSD authentications: the forward and reverse DNS entries for the remote host must match\&. As such, while Kerberos authentication can cryptographically ensure that the remote system is recognized (since it has a ticket), its assurances about the remote host\'s identity are weaker and depend on the integrity of the DNS\&.
 .SH "LOCAL COMMUNICATION"
 .PP
 The Amanda server communicates with the client internally versus over the network, ie\&. the client is also the server\&.
 .PP
 This is the only method that requires no authentication as it is clearly not needed\&.
+.PP
+The authenticated peer hostname for this authentication is always "localhost"\&.
 .SH "RSH COMMUNICATION AND AUTHENTICATION"
 
 For more detail, see http://wiki\&.zmanda\&.com/index\&.php/Configuring_rsh_authentication\&.
@@ -579,14 +565,14 @@ above)\&.
 In addition to specifying the
 \fIauth\fR
 field in dumptype definition, it might be required to specify
-\fIclient_username\fR
+\fIclient\-username\fR
 and
 \fBamandad\fR
 fields\&. If the backup user name is different on the Amanda client, the user name is specified as
-\fBclient_username\fR\&. If the location of the Amanda daemon
+\fBclient\-username\fR\&. If the location of the Amanda daemon
 \fBamandad\fR
 is different on the Amanda client, the location is specified as
-\fIamandad_path\fR
+\fIamandad\-path\fR
 field value\&.
 .sp
 .nf
@@ -594,11 +580,14 @@ For example:
 define dumptype rsh_example {
          \&.\&.\&.
          auth "rsh"
-         client_username "amandabackup"
-         amandad_path "/usr/lib/exec/amandad"
+         client\-username "amandabackup"
+         amandad\-path "/usr/lib/exec/amandad"
          \&.\&.\&.
 }
 .fi
+.SS "Authenticated Peer Hostnames with RSH Authentication"
+.PP
+The RSH authentication mechanism does not provide an authenticated peer hostname\&.
 .SH "SSH COMMUNICATION AND AUTHENTICATION"
 
 For more detail, see http://wiki\&.zmanda\&.com/index\&.php/How_To:Set_up_transport_encryption_with_SSH\&.
@@ -615,18 +604,18 @@ To use SSH, you need to set up SSH keys either by storing the passphrase in clea
 
 When you use a public key on the client to do data encryption (see http://wiki\&.zmanda\&.com/index\&.php/How_To:Set_up_data_encryption), you can lock away the private key in a secure place\&. Both, transport and storage will be encrypted with such a setup\&. See http://wiki\&.zmanda\&.com/index\&.php/Encryption for an overview of encryption options\&.
 
-Enable SSH authentication and set the ssh_keys option in all DLEs for that host by adding the following to the DLE itself or to the corresponding dumptype in amanda\&.conf:
+Enable SSH authentication and set the \fBssh\-keys\fR option in all DLEs for that host by adding the following to the DLE itself or to the corresponding dumptype in amanda\&.conf:
 
   auth "ssh"
-  ssh_keys "/home/amandabackup/\&.ssh/id_rsa_amdump"
+  ssh\-keys "/home/amandabackup/\&.ssh/id_rsa_amdump"
 
-\fIssh_keys\fR is the path to the private key on the client\&. If the username to which Amanda should connect is different from the default, then you should also add
+\fBssh\-keys\fR is the path to the private key on the client\&. If the username to which Amanda should connect is different from the default, then you should also add
 
-  client_username "otherusername"
+  client\-username "otherusername"
 
 If your server  \fBamandad\fR path and client  \fBamandad\fR path are different, you should also add
 
-  amandad_path "/client/amandad/path"
+  amandad\-path "/client/amandad/path"
 .PP
 For a marginal increase in security, prepend the keys used for AMANDA in the clients\' authorized_keys file with the following:
 .sp
@@ -645,13 +634,15 @@ In the same way, prepend the key used for AMANDA in the server\'s authorized_key
 .PP
 You can omit the from=\&.\&. option if you have too many clients to list, although this has obvious security implications\&.
 .PP
-Set ssh_keys and any other necessary options in /etc/amanda/amanda_client\&.conf:
+Set
+\fBssh\-keys\fR
+and any other necessary options in /etc/amanda/amanda_client\&.conf:
 .sp
 .nf
   auth "ssh"
-  ssh_keys "/root/\&.ssh/id_rsa_amrecover"
-  client_username "amanda"
-  amandad_path "/server/amandad/path"
+  ssh\-keys "/root/\&.ssh/id_rsa_amrecover"
+  client\-username "amanda"
+  amandad\-path "/server/amandad/path"
 .fi
 .PP
 Besides user keys, SSH uses host keys to uniquely identify each host, to prevent one host from impersonating another\&. Unfortunately, the only easy way to set up these host keys is to make a connection and tell SSH that you trust the identity:
@@ -664,6 +655,9 @@ Besides user keys, SSH uses host keys to uniquely identify each host, to prevent
 .fi
 .PP
 As Amanda will not answer this question itself, you must manually make every connection (server to client and client to server) that you expect Amanda to make\&. Note that you must use the same username that Amanda will use (that is, ssh client and ssh client\&.domain\&.com are distinct)\&.
+.SS "Authenticated Peer Hostnames with SSH Authentication"
+.PP
+When accepting an incoming conneciton, the SSH daemon gives Amanda information about the remote system in the $SSH_CONNECTION environment variable\&. Amanda parses this information to determine the remote address, and then performs a similar check to that done by the BSD authentications: the forward and reverse DNS entries for the remote host must match\&. As such, while SSH authentication can cryptographically ensure that the remote system is recognized (since it had a recognized secret key), its assurances about the remote host\'s identity are weaker and depend on the integrity of the DNS\&.
 .SH "SEE ALSO"
 .PP
 \fBamanda\fR(8),