The DPN approach for secure communication covers the following two use cases:
- Inter-node AMQP messaging
- Inter-node content transfer
DPN uses SSL and SSH connections to ensure channel security.
In the DPN context, in order for SSL communication to be established,
the client and server must both have X509 certificates. Similarly with
SSH, rsa/dsa certificates must be held.
Since DPN is a closed network, there is no additional value in having a
CA verify DPN certificates.
At a future point, it may be arguable that having an internal DPN CA is
more secure and practical.
-
All DPN nodes create X509 certificates and rsa/dsa certificates for SSH
-
The nodes configure RabbitMQ , and their webserver and/or rsync with\
- their own signed certificates, and
- the public certificates of the other DPN nodes
For transfers with rsync, DPN will use SSH as a means of authentication and encryption between nodes. It should be noted that while SSH uses public key cryptography, it only uses the private key to connect to clients. From the Ubuntu wiki: " The private key is kept on the computer you log in from, while the public key is stored on the .ssh/authorized_keys file on all the computers you want to log in to."
Set up steps are as follows:
-
Generate a key with "ssh-keygen -t rsa"\
- You can specify the key length with the -b flag, but the keygen defaults to 2048 which is fine
-
Send your public key (located in ~/.ssh/id_rsa.pub by default) to the other nodes\
- We can't use ssh-copy-id as it will prompt for a password, which we don't have
- We can encrypt with GPG, but since we're sending public keys it isn't necessary
-
Have the other nodes append your public key to their authorized key file, located at ~/.ssh/authorized_keys by default\
- For those interested, the format for the public keys are algorithm key user@host
- For the lazy, "cat id_rsa.pub >> ~/.ssh/authorized_keys"
-
Assuming sshd is running and making a connection is possible, you should now be able to connect and transfer content.
-
General SSL certificate setup
-
RabbitMQ SSL setup
-
Apache2.4 SSL setup
-
Rsync SSL setup?? Rsync uses SSH, a different certificate than X.509.\
- For linux machines use ssh-keygen
- http://linux.die.net/man/1/ssh-keygen,
- http://www.cyberciti.biz/faq/howto-linux-unix-bsd-appleosx-generate-ssh-hostkeys/
-
A good reference to SSL setup and self signed certificates: http://www.zytrax.com/tech/survival/ssl.html, http://www.hosting.com/support/ssl/generate-a-self-signed-ssl-in-linux
I do not suggest we use a CA as we only have 5 nodes. We can use self-signed certs. The question is how we exchange the certs securely and how often we update. We will need to do this for both ssl and ssh. If we have more than 5 or 10 nodes perhaps a CA, but not with 5 total, the amount of effort is not worth it.
From Wiki-pedia, they said it better than me -
CAs are third parties and require both parties to trust the CA. (CAs are typically large, impersonal enterprises and a high value target for compromise.) If the parties know each other, trust each other to protect their private keys, and can confirm transfer public keys (e.g. compare the hash{.external-link} out of band), then self-signed certificates may decrease overall risk. Self-signed certificate transactions may also present a far smaller attack surface{.external-link}.
Self-signed certificates cannot (by nature) be revoked,^[1]{.external-link}^ which may allow an attacker who has already gained access to monitor and inject data into a connection to spoof an identity if a private key has been compromised. CAs on the other hand have the ability to revoke a compromised certificate if alerted, which prevents its further use.
Some CA's can verify the identity of the person to whom they issue a certificate; for example the US military issues their Common Access Cards{.external-link} in person, with multiple forms of other ID, and only when a higher authority requires the issue.
Cost Self-signed certificates can be created for free using a wide variety of tools including Java's keytool, Adobe Reader, and Apple's Keychain. Certificates bought from major CAs range from tens to thousands of dollars per year.^[citation\ needed{.external-link}]^
Speed to Deploy Self-signed certificates require the two parties to interact (e.g. to securely trade public keys). Using a CA requires only the CA and the certificate holder to interact; the holder of the public key can validate its authenticity with the CA's root certificate.
Customization Self-signed certificates are easier to customize, for example a larger key size, contained data, metadata, etc.
I agree with using self-signed SSL certs to secure our message and content transfer protocols (see, for example, the direction the SAML federations are all going wrt PKI), and properly signed and verified GPG keys to securely, yet easily, exchange the SSL public keys amongst ourselves.