Home » Archives for November 2017

Month: November 2017

Get started with Azure key vault

Azure key vault is a service to store and manage keys, secrects and certificates that you can use for your applications. In this blog post I want to quickly show how to create a key vault and how to use it.
Key vault is a secure key management service that allows to manage keys, application secrets and certificates. The keys are stored in hardware security modules (FIPS 140-2 Level 2) and even Microsoft does not see them. Pretty cool stuff, so why should someone use Azure Key Vault?
A common problem is how to manage keys and secrets for your applications? Where to store them? And how to ensure that they have a defined lifetime? Azure key vault allows to achieve all these things. A few features are:

  • Save keys in Azure in a safe place
  • Keep encryption keys in hardware security modules (FIPS140-2 Level 2+)
  • Control keys from a single place
  • Control lifetime and renewal of keys
  • Let other AD users/groups manage access to secrets
  • Access keys from your applications
  • Automatically rotate keys

It especially helps you to solve the issue of storing keys/secrets for your applications. If you develop an application – where do you put e.g. storage keys or other secrets? Sometimes developers hardcode them into the code. Other developers store them in the configuration (e.g. app.config) and just a few use something like azure key vault.

Ok, but what is a key vault? A key vault is a container for keys and secrets that are managed together. If you develop an application, then it makes sense to create one key vault per application because the access control and also the billing is per key vault. If you have all keys/secrets stored in one key vault, then each user that has access to that key vault can read all keys/secrets that in the key vault. So you should definitely create one key vault per application. As a key vault itself is for free, this shouldn’t be a problem and helps you to secure your stuff. The pricing for key vault is pay per usage of keys (see: Key Vault Pricing Details).

The key vault allows you store:

  • Key: A cryptographic key (RSA 2048) that you can use to decrypt/sign with the key
  • Secret: A secret is a sequence of bytes unter 25KB – for example a connection string, PFX file, AES encryption key.

Read more