Ganeti was developed to run on internal, trusted systems. As such, the security model is all-or-nothing.
All the Ganeti code runs as root, because all the operations that Ganeti is doing require privileges: creating logical volumes, drbd devices, starting instances, etc. Running as root does not mean setuid, but that you need to be root to run the cluster commands.
For a host on which the Ganeti software has been installed, but not joined to a cluster, there are no changes to the system.
For a host that has been joined to the cluster, there are very important changes:
As you can see, as soon as a node is joined, it becomes equal to all other nodes in the cluster, and the security of the cluster is determined by the weakest node.
Note that only the SSH key will allow other machines to run random commands on this node; the RPC method will run only:
It is therefore important to make sure that the contents of the /etc/ganeti/hooks directory is supervised and only trusted sources can populate it.
As told above, there are multiple ways of communication between cluster nodes:
The SSH traffic is protected (after the initial login to a new node) by the cluster-wide shared SSH key.
RPC communication between the master and nodes is protected using SSL/TLS encryption. Both the client and the server must have the cluster-wide shared SSL/TLS certificate and verify it when establishing the connection by comparing fingerprints. We decided not to use a CA to simplify the key handling.
The DRBD traffic is not protected by encryption, as DRBD does not support this. It's therefore recommended to implement host-level firewalling or to use a separate range of IP addresses for the DRBD traffic (this is supported in Ganeti) which is not routed outside the cluster. DRBD connections are protected from connecting due to bugs to other machines, and from accepting connections from other machines, by using a shared secret, exchanged via RPC requests from the master to the nodes when configuring the device.
The command-line tools to master daemon communication is done via an UNIX socket, whose permissions are reset to 0600 after listening but before serving requests. This permission-based protection is documented and works on Linux, but is not-portable; however, Ganeti doesn't work on non-Linux system at the moment.
Starting with Ganeti 2.0, Remote API traffic is encrypted using SSL/TLS by default. It supports Basic authentication as per RFC2617.
Paths for certificate, private key and CA files required for SSL/TLS will be set at source configure time. Symlinks or command line parameters may be used to use different files.