Overview
CertGov integrates with Azure Key Vault (AKV) in two distinct ways. Choose the path that matches your infrastructure:
Both paths support CertGov’s full governance model: approval workflows, Domain Trust Profiles, audit log, expiry alerts, and auto-renewal.
Path A — AKV as CA
In this mode, AKV is the Certificate Authority. CertGov calls the AKV Certificates API to request issuance. AKV either signs the cert itself (“Self”) or delegates to a configured external CA such as DigiCert or GlobalSign.When to use AKV as CA
- You want DigiCert or GlobalSign to sign certificates and store them in AKV
- You want AKV self-signed certificates for internal testing
- Your security policy requires all keys to be created inside AKV HSM
Azure setup
- Create a Key Vault (Standard or Premium tier)
- Create a Service Principal (app registration):
- Note the Tenant ID, Client ID, and Client Secret
- Assign RBAC roles on the Key Vault:
The Key Vault Secrets User role is required to download private keys — even if you already have Certificates Officer. The PKCS#12 bundle is stored in AKV’s Secrets API under the same name as the certificate.
- Configure an issuer (if using DigiCert or GlobalSign):
- In the AKV portal: Certificates → Certificate Authorities → Add
- Provider: DigiCert or GlobalSign
- Enter your CA account credentials
- Note the issuer name (e.g.
DigiCert,GlobalSign-Production)
CertGov setup
- Go to Admin → Certificate Authorities → New CA
- Set Type to Azure Key Vault
- Fill in:
- Vault URL — e.g.
https://my-vault.vault.azure.net - Tenant ID, Client ID, Client Secret
- Issuer Name — leave blank or
Selffor self-signed; enter the AKV issuer name for DigiCert/GlobalSign
- Vault URL — e.g.
- Optionally enable Export private key — see Key Exportability below
- Click Ping to verify connectivity, then Save
Issuance timeout
- Self-signed: completes in seconds
- DigiCert / GlobalSign: CertGov waits up to 30 minutes for the CA to sign and return the cert. The approval shows as
pendinguntil AKV confirms completion.
Path B — AKV as Key Store
In this mode your own CA (internal CA, Vault PKI, or any other CA in CertGov) signs the certificate, and the private key is kept in Azure Key Vault instead of CertGov. After issuance CertGov writes the key to a Key Vault secret and deletes its own copy.When to use AKV as Key Store
- Your security team requires private keys to live in Azure Key Vault, not in a certificate management database
- You keep your existing CA but want one place, governed by Azure RBAC, where keys are held
- Applications already read their keys from Key Vault (App Service, AKS with the Secrets Store CSI driver, and others)
The key is generated by CertGov and stored in Key Vault as a secret. It is not generated inside a Key Vault HSM. If keys must be created and kept non-exportable in an HSM, use Path A (AKV as CA).
Azure setup
Create a service principal (App registration → Certificates & secrets) and give it Key Vault Secrets Officer on the vault, so CertGov can write secrets.CertGov setup
- Add the key store host: go to Hosts → Add Host and set:
- Host type: Key Store
- Store Type: Azure Key Vault
- Access Mode: Direct API when CertGov can reach
*.vault.azure.net, or Agent to have a certgov-agent in your network write the secret - Vault URL (e.g.
https://my-vault.vault.azure.net), Tenant ID, Client ID and Client Secret of the service principal
- Turn on key custody in the trust profile: edit the profile and, under Advanced → Key Custody, choose the host as the Key Store Host. Every certificate issued under the profile from then on has its key written to the vault.
Key Exportability
By default, AKV keys are non-exportable — the private key is permanently bound to AKV and cannot be downloaded. This is appropriate for native Azure services (App Service, API Management, Azure Kubernetes Service) that can reference AKV directly. For non-native applications — web servers (nginx, Apache), Java apps, Python services — that need the private key as a file, enable exportable keys.Exportable key: Path A (AKV CA)
Enable on the CA record:- Admin → Certificate Authorities → Edit your AKV CA
- Check Export private key
- Save
Path B (AKV Key Store)
With a key store host, CertGov does not keep the private key: read it from the Key Vault secret (the secret name is shown on the certificate in Inventory). The download options below apply to Path A certificates and to certificates without key custody.Downloading the private key
Once a cert has an exportable key in CertGov:- Go to Certificates → Inventory → open the cert
- Under Downloads & Actions, click Download .p12
- Enter an encryption password for the PKCS#12 bundle
- Save the
.p12file
.key (PEM) download is also available without a password, authenticated by your CertGov session.
Key Algorithm
Both AKV paths respect the Key Algorithm field on the Trust Profile:
AKV Premium tier uses HSM-backed keys for all types. AKV Standard tier uses software-backed keys.
Renewal
CertGov handles AKV cert renewal automatically:- Renewal fires when the cert reaches its renewal threshold
- A new AKV certificate object is created (new key, new cert, new AKV name)
- The prior AKV cert object is deleted after the new cert is confirmed saved
- If the AKV CA has Export private key enabled, the new key is exported and saved to CertGov
ca_external_id and used for the deletion step — no manual cleanup required.
What if the AKV cert was manually deleted?
If the AKV cert entry is deleted from Azure before CertGov renews it, the old cert’s deletion step is silently skipped (404 = already gone). The new cert is still issued normally. This also applies to revocation — if the AKV cert doesn’t exist when CertGov tries to revoke it, the revocation is treated as complete.RBAC quick reference
If you add a second AKV vault (a second AKV CA or key store host), remember to assign its Service Principal to that vault’s Access Control (IAM) independently. RBAC roles are per vault — they don’t inherit across vaults in the same subscription.
Troubleshooting
“Failed to dynamically fetch target download uri” in the Azure portal The cert is marked exportable in AKV, but your user account is missing Key Vault Secrets User on that vault. The PFX download uses the AKV Secrets API. Add the role in the vault’s Access Control (IAM). Cert shows CN=placeholder as issuer Your private CA’s Vault PKI instance is using the default development issuer. Generate a named intermediate CA (see Internal CA), set it as the default issuer in Vault, then retry the request. Issuance times out waiting for DigiCert / GlobalSign CertGov waits up to 30 minutes for external AKV issuers. If issuance consistently times out, check the AKV issuer configuration in the portal (Certificates → Certificate Authorities) and confirm your DigiCert/GlobalSign account credentials are valid. ECDSA cert requested but RSA cert issued Verify the Key Algorithm field on the Trust Profile matches one of:rsa-2048, rsa-4096, ecdsa-p256, ecdsa-p384. Values must be exact — typos fall through to the RSA-2048 default.