Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Backup/restore actions for EasyRSA. #196
Comments
|
I am all for adding this feature to the charm! It is not clear to me if EasyRSA supports backup/restore, or how to properly do this. EasyRSA creates a "database" and I ran into some problems with when trying to manipulate CA certificates and keys manually. More investigation is needed. https://github.com/OpenVPN/easy-rsa |
|
Adding addendum by duplicated issue 222 We'd need an ability to export the PKI root from easyrsa - and re-import it. I suggest the following workflow.
This will create a backup and GPG encrypt that payload which will have the PKI bits inside. The action output will present the user with the SCP command to copy down. For restoring, the user can decrypt the payload on disk and use
This will trigger a hook run to unpack the PKI infrastructure then re-generate and redistribute certs to all relations. This will also provide a path forward to "bring your own PKI" |
chuckbutler
added
area/easyrsa
kind/feature
labels
Apr 21, 2017
hansbogert
commented
Jan 2, 2018
•
|
the charm keeps its own state in the charm's state database for at least the CA certificate as far as I can see. This bit me when I tried to manually move the pki database to another node, but it had no effect /update /update2
|
|
@hansbogert Thanks for documenting these steps. For 7, do you mean you reboot the unit? |
hansbogert
commented
Jan 3, 2018
•
|
@tvansteenburgh No, simply a |
hansbogert
commented
Jan 3, 2018
•
|
Okay, I tried it another time and I can now say that the following commands actually work:
/update Okay.. this also doesn´t work. The above assumes that the upgrade mechanisms would actually work in the charm, but as far as I can tell, that also wouldn´t work, and would actually not copy over your PKI folder. You would be left with pretty blank pki/ folder. It wouldn't be a problem functionally in the case of an upgrade, because the unit-state.db would still have the keys and certificates. To test if I'm right, how can I test an upgrade process, without actually having a new charm? |
castrojo commentedJan 17, 2017
We should consider adding actions for backing up and restoring certificates from EasyRSA so people don't need to manually scp things back and forth.