- Administration Guide
- Program Manuals
- Frequently Asked Questions (FAQ)
- Troubleshooting (wiki)
- Troubleshooting (manual)
- Certificate Discussion
- Mailing Lists
- Feature Requests
- Commercial Support and Hosting
- System Requirements
- Comparison With Other Systems
- Restoring Files
- Verify and Restore Whole Backups
- Checking Space Usage
- Managing Client Accounts
- Regular Maintenance
- Fixing Corruption on Server
- Recovering from Lost Keys
- Pull data from a USB hdd
- Recipies and HOWTOs
- Logging Output
- Related Projects
Maybe this high-level summary, focusing ONLY on certificates, might help someone.
Using instructions from these 3 pages:
One time per CA/Server:
- Set up a separate air-gapped CA machine (install boxbackup-server, run bbstored-certs ca init). From my CA .../ca/ directory:
./keys/clientRootCSR.pem <-- a temporary certificate signing request generated in the process of producing the self-signed client CA certificate (clientCA.pem). ./keys/clientRootKey.pem <-- the key associated with clientCA.pem (I think). ./keys/serverRootCSR.pem ./keys/serverRootKey.pem ./roots/clientCA.pem <-- the CA which signs all client certificates. The server requires a client's certificate to be signed by this CA, or will not allow it to connect. All servers must have a copy of clientCA.pem to verify this. ./roots/clientCA.srl <-- the serial number of the last certificate issued by the client CA. OpenSSL keeps this in a file to avoid issuing certificates with duplicate serial numbers. ./roots/serverCA.pem ./roots/serverCA.srl ./servers/<ServerNickName>-cert.pem <-- the actual certificate issued to each client. Clients generate a key and CSR locally, send the CSR to the CA, which signs it (producing this certificate file as output) and returns it. * serverCA.pem, serverRootKey.pem, serverRootCSR.pem, serverCA.srl: as above but for servers. Clients require that any server which they connect to, presents a certificate signed by serverCA.pem. All clients must have a copy of serverCA.pem to verify this.
- Maybe someone can explain each of those files for us?
- Set up the internet-connected Server machine (install boxbackup-server, run raidfile-config, bbstored-config). Send -csr.pem to CA.
- On the CA, sign the Server -csr.pem (bbstored-certs ca sign-server). Follow output instructions...(sorry I don't have them handy).
- On the Server, place the CA-signed server certificate as instructed by "What you need to do now..." from "bbstored-certs ca sign-server". From my /etc/boxbackup/bbstored.conf:
CertificateFile = /etc/boxbackup/bbstored/<servernickname>-cert.pem <-- Server public SSL cert, signed by CA, from CA "bbstored-certs ca sign-server" PrivateKeyFile = /etc/boxbackup/bbstored/<servernickname>-key.pem <-- Server private SSL cert, from "bbstored-config" TrustedCAsFile = /etc/boxbackup/bbstored/clientCA.pem <-- CA root cert(?), from CA "bbstored-certs ca init"
- I believe that's true; someone please check.
Now you are ready to add one or more clients:
- On the Server, create a Client account (run bbstoreaccounts create). Inform Client of account number and server domain name or IP address.
- Set up the Client machine (run bbackupd-config). If you want to generate your own home-grown client certs with a different technique, I think you can do that at this point (For example, before running bbackupd-config, modify this line of that file by hand: "if(system("openssl genrsa -out $private_key 2048") != 0)", or use a completely different tool; I'm not sure what the limitations are (could one use elliptic curve?).). Send -csr.pem to CA (instructions say server admin).
- On CA machine, check -csr.pem account number (how?), then sign -csr.pem (bbstored-certs ca sign), then follow output instructions (send "CA root"(?) and client cert to Client).
- On Client machine, install CA root and client cert as instructed. From my client /etc/box/bbackupd.conf (notice it's /etc/box/, not /etc/boxbackup/):
KeysFile = /etc/box/bbackupd/<AcctNo>-FileEncKeys.raw <-- Client private encryption key (from bbackupd-config, or home-grown) PrivateKeyFile = /etc/box/bbackupd/<AcctNo>-key.pem <-- Client private SSL cert (from bbackupd-config, or home-grown) CertificateFile = /etc/box/bbackupd/<AcctNo>-cert.pem <-- Client public SSL cert (from CA, bbstored-certs ca sign) TrustedCAsFile = /etc/box/bbackupd/serverCA.pem <-- "CA root"(?) (from CA, bbstored-certs ca sign)
- Again, someone should check my work here.
Additional Distantly Related Info
Things I've had problems with over the years include:
- Depending upon how you install and configure your boxbackup client and server, you may need to look in "/etc/box/" or "/etc/boxbackup/". The OS/Distribution packages have changed a bit over time, and may install boxbackup slightly differently than if compiled from source, and the documentation may not have been perfectly kept up. For a while, I was adding symbolic links between those directories.
- The file ownership and permissions on the certs and their directory paths need to be set such that they are readable by the bbackupd (client) and bbstored (server) processes, respectively. For example, on page https://www.boxbackup.org/wiki/ConfiguringAServer, see the bbstored-config command, and the "_bbstored" username option setting there. (Note that the certs should have very tight permissions to avoid adversaries taking or modifying them, but still readable by the server process user, "_bbstored" in this case.)
- On page https://www.boxbackup.org/wiki/ConfiguringAServer, "Example configuration output", "bbstored basic configuration complete.",
"What you need to do now...": 1) Sign /etc/boxbackup/bbstored/server.example.com-csr.pem using the bbstored-certs utility.
...note that that is done on the "certificate authority" (CA) machine. Note that it wasn't clear to me for a while that the CA really should be a separate, third, air-gapped machine, and thus possibly maybe there should be a third software package in addition to these two:
$ apt-cache search boxbackup boxbackup-client - client for the BoxBackup remote backup system boxbackup-server - server for the BoxBackup remote backup system
- (Note also that over the years I've had problems with the installed boxbackup binaries moving around to various places under /usr/ (local/?, bin/? sbin/?) depending upon how I installed boxbackup -- pay very close attention to the boxbackup script output generated on _your_ machine (as opposed to what you read in the docs).)
- (Note also that in my own ignorance, I would sometimes get confused between the boxbackup "server" and the boxbackup "store"; they are the same thing, and have nothing to do with any boxbackup client that might happen to be a server-grade machine (human personnel at the client shop may call it their "server", but it's a boxbackup client.)
- (Note also the security problems with sending these certificates securely between the CA, Client and Server...)