Hi @pjbehr87,
Glad you slowly get it working. I know PKI is a jungle though…
I can reproduce your new error. Please note that the import of the CA was successful. From the error message:
“they did import successfully and are now usable”
Vault supports cross-signed CAs. This means, theoretically, you can have multiple issuers for one PKI endpoint (PKI secrets engine - considerations | OpenBao).
You can check all the issuers on the current PKI engine mount point with:
bao list pki/issuers
Keys
----
914ea320-3b76-a826-4d9c-79cb069223b6
bdfc2237-8f0c-a9d6-8890-445138d96924
I assume that you have at least two issuers in your PKI mount (one of them with the missing SKI).
The general recommendation is to have “One CA certificate, one secrets engine”, meaning, one issuer per PKI mount (PKI secrets engine - considerations | OpenBao). This just to keep things simple. Most use cases don’t require cross-signed certificates (it has a use case for rotation, though I don’t want to go into details, PKI secrets engine - rotation primitives | OpenBao).
tl;dr;
What helped in my case was disable the engine and start from scratch:
bao secrets disable pki
Then generate the internal key and the csr, sign the csr (once, including the SKI) and you should be good.
The problem is, because you had one issuer in that list which does not have SKI. This tripped the CRL generation process, because the CRL is still maintained once per PKI mount (see point 1 in PKI secrets engine (API) | OpenBao). Note the warning in the previous link, to always set a default issuer explicitly.
Another solution I found was setting the “default issuer” (PKI secrets engine (API) | OpenBao) to an issuer that has the SKI:
bao write pki/config/issuers default=335f66a1-030e-e086-14cb-5a3b51edd807
You can also check, which issuer has the SKI:
bao read -field=certificate pki/issuer/253f5c78-9369-29e4-8863-0036e39b34a8 | openssl x509 -noout -text
But as mentioned, I would only configure one issuer per PKI mount unless required otherwise.
I did not check the default_follows_latest_issuer
flag (of the pki/config/issuers
endpoint), though I think setting this to true would also fix the CRL generation process when a new signed CA with SKI is uploaded.