Atom feed of this document
  
 

 Chapter 34. Database Transport Security

This chapter covers issues related to network communications to and from the database server. This includes IP address bindings and encrypting network traffic with SSL.

 Database Server IP Address Binding

To isolate sensitive database communications between the services and the database, we strongly recommend that the database server(s) be configured to only allow communications to and from the database over an isolated management network. This is achieved by restricting the interface or IP address on which the database server binds a network socket for incoming client connections.

 Restricting Bind Address for MySQL

In my.cnf:

 
[mysqld]
...
bind-address <ip address or hostname of management network interface>

 Restricting Listen Address for PostgreSQL

In postgresql.conf:

 
listen_addresses = <ip address or hostname of management network interface>

 Database Transport

In addition to restricting database communications to the management network, we also strongly recommend that the cloud administrator configure their database backend to require SSL. Using SSL for the database client connections  protects the communications from tampering and eavesdropping. As will be discussed in the next section, using SSL also provides the framework for doing database user authentication via X.509 certificates (commonly referred to as PKI). Below is guidance on how SSL is typically configured for the two popular database backends MySQL and PostgreSQL.

[Note]Note

NOTE: When installing the certificate and key files, ensure that the file permissions are restricted, for example chmod 0600, and the ownership is restricted to the database daemon user to prevent unauthorized access by other processes and users on the database server.

 MySQL SSL Configuration

The following lines should be added in the system-wide MySQL configuration file:

In my.cnf:

[[mysqld]]
...
ssl-ca=/path/to/ssl/cacert.pem
ssl-cert=/path/to/ssl/server-cert.pem
ssl-key=/path/to/ssl/server-key.pem

Optionally, if you wish to restrict the set of SSL ciphers used for the encrypted connection. See http://www.openssl.org/docs/apps/ciphers.html for a list of ciphers and the syntax for specifying the cipher string:

ssl-cipher='cipher:list'

 PostgreSQL SSL Configuration

The following lines should be added in the system-wide PostgreSQL configuration file, postgresql.conf.

ssl = true

Optionally, if you wish to restrict the set of SSL ciphers used for the encrypted connection. See http://www.openssl.org/docs/apps/ciphers.html for a list of ciphers and the syntax for specifying the cipher string:

ssl-ciphers = 'cipher:list'

The server certificate, key, and certificate authority (CA) files should be placed in the $PGDATA directory in the following files:

  • $PGDATA/server.crt - Server certificate

  • $PGDATA/server.key - Private key corresponding to server.crt

  • $PGDATA/root.crt - Trusted certificate authorities

  • $PGDATA/root.crl - Certificate revocation list

Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page

loading table of contents...