Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Key Vault - multiple environments, do I need a Azure Key Vault for each environment?

I am doing some initial research and I am unable to find a clear answer for my problem. The plan is to have multiple environments, (i.e. Dev, Prod, and QA) would I need to have a new instance of Azure Key Vaults for each environment or would I just be able to share the data between them?

like image 741
jdave Avatar asked May 10 '17 19:05

jdave


People also ask

Can Azure key Vault be used across subscriptions?

Yes, you can use a single Azure KeyVault to be used in several Subscriptions, this might be one Scenario.

How many key vaults are there?

There is no limit to the number of key vault however there is a limit of number of resources per resource type you can deploy within a resource group .

Is Azure key vault per region?

Azure Key Vault does not allow you to move a key vault from one region to another. You can, however, create a key vault in the new region, manually copy each individual key, secret, or certificate from your existing key vault to the new key vault, and then remove the original key vault.


2 Answers

I would rather advise to use separate Key Vault instances for the different environments. You can avoid "mixing" secrets across environments by mistake and you have clear separation. Microsoft officially recommends this approach too:

Our recommendation is to use a vault per application per environment (Development, Pre-Production and Production).

You can read more in the official documentation

like image 90
Daniel Krzyczkowski Avatar answered Oct 29 '22 22:10

Daniel Krzyczkowski


Multiple resources/entities can access a single Key Vault instance - provided they're all in the same location (data centre).

You may choose to segment your keys, secrets and certificates, either by placing them in different Key Vaults or by using different access methods/identities, however that's not necessary.

The only time you need a separate Key Vault instance is when the resources/entities accessing it are in another location (data centre/region).

It's worth noting that you don't need to worry too much about provisioning Disaster Recovery for resources using Key Vault, as the SLA Microsoft provide is unsurprisingly good: https://docs.microsoft.com/en-gb/azure/key-vault/key-vault-disaster-recovery-guidance. One caveat to that would be if you're running IaaS/PaaS instances and want to run a DR fail-over yourself to another data centre, at which point you'd need to manually migrate the keys/secrets/certificates in your main Key Vault into another instance (and re-point your VMs accordingly)

like image 34
AndyHerb Avatar answered Oct 29 '22 21:10

AndyHerb