Score:1

hashicorp vault - load pre-existing CA certificate into PKI engine

pk flag

I'm looking to migrate a process that generates client certificates from a custom root CA into hashicorp vault.

The root is already trusted by a lot of applications, so I'd like to import it (or an intermediate) into vault and emit the client certificates from there.

The tutorials are straightforward but always show how to generate a new root and intermediate certificate.

How can I initialize a PKI secrets engine with a pre-existing root cert via command-line (e.g. vault write pki/root/???) ?

Score:1
in flag

Short answer

Long answer

PKI means "public key infrastructure", but with that public key comes the all important private key. The private key is the key used to sign (or generate) the certificates for your applications. Vault has nothing to do with it, it's the math behind the PKI that require it.

So the CA needs a key pair (public and private). Without the private key, it will be impossible to generate the signature and issue a certificate. It is computationally impossible to find the private key if you only have the public key (but ask again in 10 years from now).

Most PKI don't allow exporting their private key. Some/Most PKI are hooked to a tampmer proof hardware device (called an HSM) designed to prevent the private key to ever leave its secure container.

So unless you can get your hands on the private key, you will have to deploy a new issuer certificate. You can have Vault's certificate signed by your old CA. Doing so will make your certificates recognized by browsers, but now you have 2 CA to maintain...

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.