Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > df754e4e6f7f5fc8ab9d6ed8559f3e3d > files > 141

bacula-docs-5.0.3-19.fc16.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 2008 (1.71)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Bacula TLS - Communications Encryption</TITLE>
<META NAME="description" CONTENT="Bacula TLS - Communications Encryption">
<META NAME="keywords" CONTENT="main">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META NAME="Generator" CONTENT="LaTeX2HTML v2008">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="main.css">

<LINK REL="next" HREF="Data_Encryption.html">
<LINK REL="previous" HREF="Disaster_Recovery_Using_Bac.html">
<LINK REL="up" HREF="Bacula_Main_Reference.html">
<LINK REL="next" HREF="Data_Encryption.html">
</HEAD>

<BODY >
<!--Navigation Panel-->
<A NAME="tex2html1891"
  HREF="Data_Encryption.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html1885"
  HREF="Bacula_Main_Reference.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html1879"
  HREF="Disaster_Recovery_Using_Bac.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html1887"
  HREF="Contents.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html1889"
  HREF="Thanks.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html1892"
  HREF="Data_Encryption.html">Data Encryption</A>
<B> Up:</B> <A NAME="tex2html1886"
  HREF="Bacula_Main_Reference.html">Bacula Main Reference</A>
<B> Previous:</B> <A NAME="tex2html1880"
  HREF="Disaster_Recovery_Using_Bac.html">Disaster Recovery Using Bacula</A>
 &nbsp; <B>  <A NAME="tex2html1888"
  HREF="Contents.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html1890"
  HREF="Thanks.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>

<UL>
<LI><A NAME="tex2html1893"
  HREF="Bacula_TLS_Communications.html#SECTION003910000000000000000">TLS Configuration Directives</A>
<LI><A NAME="tex2html1894"
  HREF="Bacula_TLS_Communications.html#SECTION003920000000000000000">Creating a Self-signed Certificate</A>
<LI><A NAME="tex2html1895"
  HREF="Bacula_TLS_Communications.html#SECTION003930000000000000000">Getting a CA Signed Certificate</A>
<LI><A NAME="tex2html1896"
  HREF="Bacula_TLS_Communications.html#SECTION003940000000000000000">Example TLS Configuration Files</A>
</UL>
<!--End of Table of Child-Links-->
<HR>

<H1><A NAME="SECTION003900000000000000000"></A>
<A NAME="CommEncryption"></A>
<BR>
Bacula TLS - Communications Encryption
</H1>
<A NAME="19798"></A>
<A NAME="19799"></A>
<A NAME="19800"></A>
<A NAME="19801"></A>
<A NAME="19802"></A>
<A NAME="19803"></A>

<P>
Bacula TLS (Transport Layer Security) is built-in network
encryption code to provide secure network transport similar to
that offered by <B>stunnel</B> or <B>ssh</B>.  The data written to  
Volumes by the Storage daemon is not encrypted by this code.
For data encryption, please see the Data Encryption
ChapterDataEncryption of this manual.

<P>
The Bacula encryption implementations were written by Landon Fuller.

<P>
Supported features of this code include:

<UL>
<LI>Client/Server TLS Requirement Negotiation 
</LI>
<LI>TLSv1 Connections with Server and Client Certificate
Validation 
</LI>
<LI>Forward Secrecy Support via Diffie-Hellman Ephemeral Keying 
</LI>
</UL>

<P>
This document will refer to both "server" and "client" contexts.  These
terms refer to the accepting and initiating peer, respectively.

<P>
Diffie-Hellman anonymous ciphers are not supported by this code.  The
use of DH anonymous ciphers increases the code complexity and places
explicit trust upon the two-way CRAM-MD5 implementation.  CRAM-MD5 is
subject to known plaintext attacks, and it should be considered
considerably less secure than PKI certificate-based authentication.

<P>
Appropriate autoconf macros have been added to detect and use OpenSSL  
if enabled on the <B>./configure</B> line with <B><code>--</code>with-openssl</B>

<P>

<H1><A NAME="SECTION003910000000000000000">
TLS Configuration Directives</A>
</H1>
Additional configuration directives have been added to all the daemons
(Director, File daemon, and Storage daemon) as well as the various
different Console programs.
These new directives are defined as follows:

<P>
<DL>
<DT><STRONG>TLS Enable = yes|no</STRONG></DT>
<DD>Enable TLS support.  If TLS is not enabled, none of the other TLS directives
have any effect. In other words, even if you set <B>TLS Require = yes</B> 
you need to have TLS enabled or TLS will not be used.

<P>
</DD>
<DT><STRONG>TLS Require = yes|no</STRONG></DT>
<DD>Require TLS connections.  This directive is ignored unless <B>TLS Enable</B>
is set to <B>yes</B>.  If TLS is not required, and TLS is enabled, then
Bacula will connect with other daemons either with or without TLS depending
on what the other daemon requests.  If TLS is enabled and TLS is required,
then Bacula will refuse any connection that does not use TLS.

<P>
</DD>
<DT><STRONG>TLS Certificate = Filename</STRONG></DT>
<DD>The full path and filename of a PEM encoded TLS certificate.  It can be
used as either a client or server certificate.  PEM stands for Privacy
Enhanced Mail, but in this context refers to how the certificates are
encoded.  It is used because PEM files are base64 encoded and hence ASCII
text based rather than binary.  They may also contain encrypted
information.

<P>
</DD>
<DT><STRONG>TLS Key = Filename</STRONG></DT>
<DD>The full path and filename of a PEM encoded TLS private key.  It must
correspond to the TLS certificate.

<P>
</DD>
<DT><STRONG>TLS Verify Peer = yes|no</STRONG></DT>
<DD>Verify peer certificate.  Instructs server to request and verify the
client's x509 certificate.  Any client certificate signed by a known-CA
will be accepted unless the TLS Allowed CN configuration directive is used,
in which case the client certificate must correspond to the Allowed
Common Name specified. This directive is valid only for a server
and not in a client context.

<P>
</DD>
<DT><STRONG>TLS Allowed CN = string list</STRONG></DT>
<DD>Common name attribute of allowed peer certificates.  If this directive is
specified, all server certificates will be verified against this list. This
can be used to ensure that only the CA-approved Director may connect.
This directive may be specified more than once.

<P>
</DD>
<DT><STRONG>TLS CA Certificate File = Filename</STRONG></DT>
<DD>The full path and filename specifying a
PEM encoded TLS CA certificate(s).  Multiple certificates are
permitted in the file.  One of <I>TLS CA Certificate File</I> or <I>TLS
CA Certificate Dir</I> are required in a server context if <I>TLS
Verify Peer</I> (see above) is also specified, and are always required in a client
context.

<P>
</DD>
<DT><STRONG>TLS CA Certificate Dir = Directory</STRONG></DT>
<DD>Full path to TLS CA certificate directory.  In the current implementation,
certificates must be stored PEM encoded with OpenSSL-compatible hashes,
which is the subject name's hash and an extension of bf .0.
One of <I>TLS CA Certificate File</I> or <I>TLS CA Certificate Dir</I> are
required in a server context if <I>TLS Verify Peer</I> is also specified,
and are always required in a client context.

<P>
</DD>
<DT><STRONG>TLS DH File = Directory</STRONG></DT>
<DD>Path to PEM encoded Diffie-Hellman parameter file.  If this directive is
specified, DH key exchange will be used for the ephemeral keying, allowing
for forward secrecy of communications.  DH key exchange adds an additional
level of security because the key used for encryption/decryption by the
server and the client is computed on each end and thus is never passed over
the network if Diffie-Hellman key exchange is used.  Even if DH key
exchange is not used, the encryption/decryption key is always passed
encrypted.  This directive is only valid within a server context.

<P>
To generate the parameter file, you
may use openssl:

<P>
<PRE> 
   openssl dhparam -out dh1024.pem -5 1024
</PRE>

<P>
</DD>
</DL>

<P>

<H1><A NAME="SECTION003920000000000000000">
Creating a Self-signed Certificate</A>
</H1>
<A NAME="19846"></A>
<A NAME="19847"></A>

<P>
You may create a self-signed certificate for use with the Bacula TLS that
will permit you to make it function, but will not allow certificate
validation.  The .pem file containing both the certificate and the key
valid for ten years can be made with the following:

<P>
<PRE>
   openssl req -new -x509 -nodes -out bacula.pem -keyout bacula.pem -days 3650
</PRE>
<P>
The above script will ask you a number of questions. You may simply answer
each of them by entering a return, or if you wish you may enter your own data.

<P>
Note, however, that self-signed certificates will only work for the
outgoing end of connections.  For example, in the case of the Director
making a connection to a File Daemon, the File Daemon may be configured to
allow self-signed certificates, but the certificate used by the
Director must be signed by a certificate that is explicitly trusted on the
File Daemon end.

<P>
This is necessary to prevent ``man in the middle'' attacks from tools such
as ettercaphttp://ettercap.sourceforge.net/.  Essentially, if the
Director does not verify that it is talking to a trusted remote endpoint,
it can be tricked into talking to a malicious 3rd party who is relaying and
capturing all traffic by presenting its own certificates to the Director
and File Daemons.  The only way to prevent this is by using trusted
certificates, so that the man in the middle is incapable of spoofing the
connection using his own.

<P>
To get a trusted certificate (CA or Certificate Authority signed
certificate), you will either need to purchase certificates signed by a
commercial CA or find a friend that has setup his own CA or become a CA
yourself, and thus you can sign all your own certificates.  The book
OpenSSL by John Viega, Matt Mesier &amp; Pravir Chandra from O'Reilly explains
how to do it, or you can read the documentation provided in the Open-source
PKI Book project at Source Forge: 
http://ospkibook.sourceforge.net/docs/OSPKI-2.4.7/OSPKI-html/ospki-book.htm
http://ospkibook.sourceforge.net/docs/OSPKI-2.4.7/OSPKI-html/ospki-book.htm.
Note, this link may change. 

<P>
The program TinyCA has a very nice Graphical User Interface 
that allows you to easily setup and maintain your own CA.
TinyCA can be found at
http://tinyca.sm-zone.net/http://tinyca.sm-zone.net/.

<P>

<H1><A NAME="SECTION003930000000000000000">
Getting a CA Signed Certificate</A>
</H1>
<A NAME="19857"></A>
<A NAME="19858"></A>

<P>
The process of getting a certificate that is signed by a CA is quite a bit
more complicated. You can purchase one from quite a number of PKI vendors, but
that is not at all necessary for use with Bacula. To get a CA signed
certificate, you will either need to find a friend that has setup his own CA
or to become a CA yourself, and thus you can sign all your own certificates.
The book OpenSSL by John Viega, Matt Mesier &amp; Pravir Chandra from O'Reilly
explains how to do it, or you can read the documentation provided in the
Open-source PKI Book project at Source Forge: 

http://ospkibook.sourceforge.net/docs/OSPKI-2.4.7/OSPKI-html/ospki-book.htm
http://ospkibook.sourceforge.net/docs/OSPKI-2.4.7/OSPKI-html/ospki-book.htm.
Note, this link may change. 

<P>

<H1><A NAME="SECTION003940000000000000000">
Example TLS Configuration Files</A>
</H1>
<A NAME="19862"></A>
<A NAME="19863"></A>

<P>
Landon has supplied us with the TLS portions of his configuration
files, which should help you setting up your own.  Note, this example
shows the directives necessary for a Director to Storage daemon session.
The technique is the same between the Director and the Client and
for bconsole to the Director.

<P>
<B>bacula-dir.conf</B>
<PRE>
   Director {                            # define myself
     Name = backup1-dir
     ...
     TLS Enable = yes
     TLS Require = yes
     TLS Verify Peer = yes
     TLS Allowed CN = "bacula@backup1.example.com"
     TLS Allowed CN = "administrator@example.com"
     TLS CA Certificate File = /usr/local/etc/ssl/ca.pem
     # This is a server certificate, used for incoming
     # console connections.
     TLS Certificate = /usr/local/etc/ssl/backup1/cert.pem
     TLS Key = /usr/local/etc/ssl/backup1/key.pem
   }

   Storage {
     Name = File
     Address = backup1.example.com
     ...
     TLS Require = yes
     TLS CA Certificate File = /usr/local/etc/ssl/ca.pem
     # This is a client certificate, used by the director to
     # connect to the storage daemon
     TLS Certificate = /usr/local/etc/ssl/bacula@backup1/cert.pem
     TLS Key = /usr/local/etc/ssl/bacula@backup1/key.pem
   }

   Client {
     Name = backup1-fd
     Address = server1.example.com
     ...
   
     TLS Enable = yes
     TLS Require = yes
     TLS CA Certificate File = /usr/local/etc/ssl/ca.pem
   }
</PRE>
<P>
<B>bacula-fd.conf</B>
<PRE>
   Director {
     Name = backup1-dir
     ...
     TLS Enable = yes
     TLS Require = yes
     TLS Verify Peer = yes
     # Allow only the Director to connect
     TLS Allowed CN = "bacula@backup1.example.com"
     TLS CA Certificate File = /usr/local/etc/ssl/ca.pem
     # This is a server certificate. It is used by connecting
     # directors to verify the authenticity of this file daemon
     TLS Certificate = /usr/local/etc/ssl/server1/cert.pem
     TLS Key = /usr/local/etc/ssl/server1/key.pem
   }

  FileDaemon {
     Name = backup1-fd
     ...
     # you need these TLS entries so the SD and FD can
     # communicate
     TLS Enable = yes
     TLS Require = yes

     TLS CA Certificate File = /usr/local/etc/ssl/ca.pem
     TLS Certificate = /usr/local/etc/ssl/server1/cert.pem
     TLS Key = /usr/local/etc/ssl/server1/key.pem
}
</PRE>
<P>
<B>bacula-sd.conf</B>
<PRE>
   Storage {                             # definition of myself
     Name = backup1-sd
     ...
     # These TLS configuration options are used for incoming
     # file daemon connections. Director TLS settings are handled
     # below.
     TLS Enable = yes
     TLS Require = yes
     # Peer certificate is not required/requested -- peer validity
     # is verified by the storage connection cookie provided to the
     # File Daemon by the director.
     TLS Verify Peer = no
     TLS CA Certificate File = /usr/local/etc/ssl/ca.pem
     # This is a server certificate. It is used by connecting
     # file daemons to verify the authenticity of this storage daemon
     TLS Certificate = /usr/local/etc/ssl/backup1/cert.pem
     TLS Key = /usr/local/etc/ssl/backup1/key.pem
   }

   #
   # List Directors who are permitted to contact Storage daemon
   #
   Director {
     Name = backup1-dir
     ...
     TLS Enable = yes
     TLS Require = yes
     # Require the connecting director to provide a certificate
     # with the matching CN.
     TLS Verify Peer = yes
     TLS Allowed CN = "bacula@backup1.example.com"
     TLS CA Certificate File = /usr/local/etc/ssl/ca.pem
     # This is a server certificate. It is used by the connecting
     # director to verify the authenticity of this storage daemon
     TLS Certificate = /usr/local/etc/ssl/backup1/cert.pem
     TLS Key = /usr/local/etc/ssl/backup1/key.pem
   }
</PRE>
<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html1891"
  HREF="Data_Encryption.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html1885"
  HREF="Bacula_Main_Reference.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html1879"
  HREF="Disaster_Recovery_Using_Bac.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html1887"
  HREF="Contents.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html1889"
  HREF="Thanks.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html1892"
  HREF="Data_Encryption.html">Data Encryption</A>
<B> Up:</B> <A NAME="tex2html1886"
  HREF="Bacula_Main_Reference.html">Bacula Main Reference</A>
<B> Previous:</B> <A NAME="tex2html1880"
  HREF="Disaster_Recovery_Using_Bac.html">Disaster Recovery Using Bacula</A>
 &nbsp; <B>  <A NAME="tex2html1888"
  HREF="Contents.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html1890"
  HREF="Thanks.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>

2012-01-24
</ADDRESS>
</BODY>
</HTML>