Azure Key Vault security overview (2024)

  • Article

Azure Key Vault protects cryptographic keys, certificates (and the private keys associated with the certificates), and secrets (such as connection strings and passwords) in the cloud. When storing sensitive and business critical data, however, you must take steps to maximize the security of your vaults and the data stored in them.

This article provides an overview of security features and best practices for Azure Key Vault.

Note

For a comprehensive list of Azure Key Vault security recommendations see the Security baseline for Azure Key Vault.

Network security

You can reduce the exposure of your vaults by specifying which IP addresses have access to them. The virtual network service endpoints for Azure Key Vault allow you to restrict access to a specified virtual network. The endpoints also allow you to restrict access to a list of IPv4 (internet protocol version 4) address ranges. Any user connecting to your key vault from outside those sources is denied access. For full details, see Virtual network service endpoints for Azure Key Vault

After firewall rules are in effect, users can only read data from Key Vault when their requests originate from allowed virtual networks or IPv4 address ranges. This also applies to accessing Key Vault from the Azure portal. Although users can browse to a key vault from the Azure portal, they might not be able to list keys, secrets, or certificates if their client machine is not in the allowed list. For implementation steps, see Configure Azure Key Vault firewalls and virtual networks

Azure Private Link Service enables you to access Azure Key Vault and Azure hosted customer/partner services over a Private Endpoint in your virtual network. An Azure Private Endpoint is a network interface that connects you privately and securely to a service powered by Azure Private Link. The private endpoint uses a private IP address from your VNet, effectively bringing the service into your VNet. All traffic to the service can be routed through the private endpoint, so no gateways, NAT devices, ExpressRoute or VPN connections, or public IP addresses are needed. Traffic between your virtual network and the service traverses over the Microsoft backbone network, eliminating exposure from the public Internet. You can connect to an instance of an Azure resource, giving you the highest level of granularity in access control. For implementation steps, see Integrate Key Vault with Azure Private Link

TLS and HTTPS

  • The Key Vault front end (data plane) is a multi-tenant server. This means that key vaults from different customers can share the same public IP address. In order to achieve isolation, each HTTP request is authenticated and authorized independently of other requests.
  • The HTTPS protocol allows the client to participate in TLS negotiation. Clients can enforce the version of TLS, and whenever a client does so, the entire connection will use the corresponding level protection. Key Vault supports TLS 1.2 and 1.3 protocol versions.

Note

You can monitor TLS version used by clients by monitoring Key Vault logs with sample Kusto query here.

Key Vault authentication options

When you create a key vault in an Azure subscription, it's automatically associated with the Microsoft Entra tenant of the subscription. All callers in both planes must register in this tenant and authenticate to access the key vault. In both cases, applications can access Key Vault in three ways:

  • Application-only: The application represents a service principal or managed identity. This identity is the most common scenario for applications that periodically need to access certificates, keys, or secrets from the key vault. For this scenario to work, the objectId of the application must be specified in the access policy and the applicationId must not be specified or must be null.
  • User-only: The user accesses the key vault from any application registered in the tenant. Examples of this type of access include Azure PowerShell and the Azure portal. For this scenario to work, the objectId of the user must be specified in the access policy and the applicationId must not be specified or must be null.
  • Application-plus-user (sometimes referred as compound identity): The user is required to access the key vault from a specific application and the application must use the on-behalf-of authentication (OBO) flow to impersonate the user. For this scenario to work, both applicationId and objectId must be specified in the access policy. The applicationId identifies the required application and the objectId identifies the user. Currently, this option isn't available for data plane Azure RBAC.

In all types of access, the application authenticates with Microsoft Entra ID. The application uses any supported authentication method based on the application type. The application acquires a token for a resource in the plane to grant access. The resource is an endpoint in the management or data plane, based on the Azure environment. The application uses the token and sends a REST API request to Key Vault. To learn more, review the whole authentication flow.

The model of a single mechanism for authentication to both planes has several benefits:

  • Organizations can control access centrally to all key vaults in their organization.
  • If a user leaves, they instantly lose access to all key vaults in the organization.
  • Organizations can customize authentication by using the options in Microsoft Entra ID, such as to enable multi-factor authentication for added security.

For more information, see Key Vault authentication fundamentals.

Access model overview

Access to a key vault is controlled through two interfaces: the management plane and the data plane. The management plane is where you manage Key Vault itself. Operations in this plane include creating and deleting key vaults, retrieving Key Vault properties, and updating access policies. The data plane is where you work with the data stored in a key vault. You can add, delete, and modify keys, secrets, and certificates.

Both planes use Microsoft Entra ID for authentication. For authorization, the management plane uses Azure role-based access control (Azure RBAC) and the data plane uses a Key Vault access policy and Azure RBAC for Key Vault data plane operations.

To access a key vault in either plane, all callers (users or applications) must have proper authentication and authorization. Authentication establishes the identity of the caller. Authorization determines which operations the caller can execute. Authentication with Key Vault works in conjunction with Microsoft Entra ID, which is responsible for authenticating the identity of any given security principal.

A security principal is an object that represents a user, group, service, or application that's requesting access to Azure resources. Azure assigns a unique object ID to every security principal.

  • A user security principal identifies an individual who has a profile in Microsoft Entra ID.
  • A group security principal identifies a set of users created in Microsoft Entra ID. Any roles or permissions assigned to the group are granted to all of the users within the group.
  • A service principal is a type of security principal that identifies an application or service, which is to say, a piece of code rather than a user or group. A service principal's object ID is known as its client ID and acts like its username. The service principal's client secret or certificate acts like its password. Many Azure Services supports assigning Managed Identity with automated management of client ID and certificate. Managed identity is the most secure and recommended option for authenticating within Azure.

For more information about authentication to Key Vault, see Authenticate to Azure Key Vault.

Conditional access

Key Vault provides support for Microsoft Entra Conditional Access policies. By using Conditional Access policies, you can apply the right access controls to Key Vault when needed to keep your organization secure and stay out of your user's way when not needed.

For more information, see Conditional Access overview

Privileged access

Authorization determines which operations the caller can perform. Authorization in Key Vault uses Azure role-based access control (Azure RBAC) on management plane and either Azure RBAC or Azure Key Vault access policies on data plane.

Access to vaults takes place through two interfaces or planes. These planes are the management plane and the data plane.

  • The management plane is where you manage Key Vault itself and it is the interface used to create and delete vaults. You can also read key vault properties and manage access policies.
  • The data plane allows you to work with the data stored in a key vault. You can add, delete, and modify keys, secrets, and certificates.

Applications access the planes through endpoints. The access controls for the two planes work independently. To grant an application access to use keys in a key vault, you grant data plane access by using Azure RBAC or a Key Vault access policy. To grant a user read access to Key Vault properties and tags, but not access to data (keys, secrets, or certificates), you grant management plane access with Azure RBAC.

The following table shows the endpoints for the management and data planes.

AccessplaneAccess endpointsOperationsAccesscontrol mechanism
Management planeGlobal:
management.azure.com:443

Microsoft Azure operated by 21Vianet:
management.chinacloudapi.cn:443

Azure US Government:
management.usgovcloudapi.net:443

Azure Germany:
management.microsoftazure.de:443

Create, read, update, and delete key vaults

Set Key Vault access policies

Set Key Vault tags

Azure RBAC
Data planeGlobal:
<vault-name>.vault.azure.net:443

Microsoft Azure operated by 21Vianet:
<vault-name>.vault.azure.cn:443

Azure US Government:
<vault-name>.vault.usgovcloudapi.net:443

Azure Germany:
<vault-name>.vault.microsoftazure.de:443

Keys: encrypt, decrypt, wrapKey, unwrapKey, sign, verify, get, list, create, update, import, delete, recover, backup, restore, purge, rotate (preview), getrotationpolicy (preview), setrotationpolicy (preview), release(preview)

Certificates: managecontacts, getissuers, listissuers, setissuers, deleteissuers, manageissuers, get, list, create, import, update, delete, recover, backup, restore, purge

Secrets: get, list, set, delete,recover, backup, restore, purge

Key Vault access policy or Azure RBAC

Managing administrative access to Key Vault

When you create a key vault in a resource group, you manage access by using Microsoft Entra ID. You grant users or groups the ability to manage the key vaults in a resource group. You can grant access at a specific scope level by assigning the appropriate Azure roles. To grant access to a user to manage key vaults, you assign a predefined key vault Contributor role to the user at a specific scope. The following scopes levels can be assigned to an Azure role:

  • Subscription: An Azure role assigned at the subscription level applies to all resource groups and resources within that subscription.
  • Resource group: An Azure role assigned at the resource group level applies to all resources in that resource group.
  • Specific resource: An Azure role assigned for a specific resource applies to that resource. In this case, the resource is a specific key vault.

There are several predefined roles. If a predefined role doesn't fit your needs, you can define your own role. For more information, see Azure RBAC: Built-in roles.

Important

When using the Access Policy permission model, if a user has Contributor, Key Vault Contributor or other role with Microsoft.KeyVault/vaults/write permissions to a key vault management plane, the user can grant themselves access to the data plane by setting a Key Vault access policy. You should tightly control who has Contributor role access to your key vaults with the Access Policy permission model to ensure that only authorized persons can access and manage your key vaults, keys, secrets, and certificates. It is recommended to use the new Role Based Access Control (RBAC) permission model to avoid this issue. With the RBAC permission model, permission management is limited to 'Owner' and 'User Access Administrator' roles, which allows separation of duties between roles for security operations and general administrative operations.

Controlling access to Key Vault data

You can control access to Key Vault keys, certificates and secrets using Azure RBAC or Key Vault access policies.

For more information, see

  • Azure RBAC for Key Vault data plane operations.
  • Key Vault access policy

Logging and monitoring

Key Vault logging saves information about the activities performed on your vault. For full details, see Key Vault logging.

You can integrate Key Vault with Event Grid to be notified when the status of a key, certificate, or secret stored in key vault has changed. For details, see Monitoring Key Vault with Azure Event Grid

It is also important to monitor the health of your key vault, to make sure your service operates as intended. To learn how to do so, see Monitoring and alerting for Azure Key Vault.

Backup and recovery

Azure Key Vault soft-delete and purge protection allows you to recover deleted vaults and vault objects. For full details, see Azure Key Vault soft-delete overview.

You should also take regular back ups of your vault on update/delete/create of objects within a Vault.

Next steps

  • Azure Key Vault security baseline
  • Azure Key Vault best practices
  • Virtual network service endpoints for Azure Key Vault
  • Azure RBAC: Built-in roles
Azure Key Vault security overview (2024)

FAQs

How do I get all the secrets in Azure key vault? ›

To list all secrets in Azure Key Vault, use the listPropertiesOfSecrets method to get secret properties a page at a time by setting the PageSettings object.

How is Azure key vault more secure? ›

Azure key vaults are encrypted at rest with a key stored in hardware security modules (HSMs). Azure safeguards keys, secrets, and certificates using industry-standard algorithms, key lengths, and software cryptographic modules.

Which statement is true about Azure key Vault? ›

- Azure Key Vault defines security policies for Azure services. - Access to secrets and passwords can be granted or denied very fast and as needed.

How do I read my Azure key vault key? ›

Once that you receive the message that the key has been successfully created, you may click on it on the list. You can then see some of the properties and select Download public key to retrieve the key.

What is the difference between keys and secrets in Azure key Vault? ›

A secret is anything that you want to tightly control access to, such as API keys, passwords, or certificates. A key is a cryptographic key represented as a JSON Web Key [JWK] object. Key Vault supports RSA and Elliptic Curve Keys only.

What is the secret limit in key vault? ›

The maximum size of a single Key Vault is 25 KB (25,600 bytes) for standard vaults and 50 KB (51,200 bytes) for premium vaults. Since each secret has its own size, the number of secrets you can store in a Key Vault depends on the sizes of the individual secrets and the overall capacity limit of the vault.

What is the secret identifier in Azure key Vault? ›

In this article

The Key Vault service doesn't provide semantics for secrets. It merely accepts the data, encrypts it, stores it, and returns a secret identifier ( id ). The identifier can be used to retrieve the secret at a later time.

What are the limitations of Azure key vault RBAC? ›

Object limits
ItemLimits
Number of versions per key100
Number of custom role definitions per HSM instance50
Number of role assignments at HSM scope50
Number of role assignments at each individual key scope10
3 more rows
Aug 7, 2024

Can I use Azure key Vault as a password manager? ›

Secure key management is essential to protect data in the cloud. Use Azure Key Vault to encrypt keys and small secrets like passwords that use keys stored in hardware security modules (HSMs).

What is the primary benefit of Azure key vault? ›

There are several benefits to organizations that use Microsoft Azure Key Vault to help manage their keys and passwords: Safe centralized storage of keys. Azure Key Vault provides a secure and centralized location to store sensitive information, such as passwords, certificates and encryption keys.

How many key vaults should you use Azure? ›

Our recommendation is to use a vault per application per environment (development, preproduction, and production), per region. Granular isolation helps you not share secrets across applications, environments and regions, and it also reduce the threat if there is a breach.

Which one of the following should not be stored in Azure key Vault? ›

Key Vault is designed to store configuration secrets for server apps. It's not intended for storing data belonging to your app's users, and it shouldn't be used in the client-side part of an app.

How do you get all the secrets in Azure key vault? ›

If you select on the current version, you can see the value you specified in the previous step. By clicking "Show Secret Value" button in the right pane, you can see the hidden value. You can also use Azure CLI, or Azure PowerShell to retrieve previously created secret.

How do I get the client secret in Azure key vault? ›

To get a secret in Azure Key Vault, use the getSecret method of the SecretClient class. const name = 'mySecret'; const { name, properties, value } = await client. getSecret(secretName); This method returns the KeyVaultSecret object.

Can Microsoft access keys in Azure key vault? ›

“Key Vault is designed, deployed and operated such that Microsoft and its agents are precluded from accessing, using or extracting any data stored in the service, including cryptographic keys.

How do I export all secrets from Azure key vault? ›

Here's how you can do it: 1- Export Key Vault secrets: Use Azure PowerShell or Azure CLI to export the secrets from your Azure Key Vault. This will save the secrets in a JSON or CSV file, which can then be used for importing the secrets back to the Key Vault or another secure storage.

How to retrieve Azure Key Vault secrets using Azure Functions? ›

If your key vault is configured as "Azure role-based access control", then assign Key Vault Secrets User role to the application. If your key vault is configured as "Vault access policy", then you have to create access policy selecting Secret permissions and assigning it to application.

How do I recover a secret in Azure key vault? ›

Restore
  1. Go to the Azure portal.
  2. Select your key vault.
  3. Go to the type of object (secret, key, or certificate) you want to restore.
  4. Select Restore Backup.
  5. Go to the location where you stored the encrypted blob.
  6. Select OK.
Aug 7, 2024

How do I get the key vault secret in Azure data Factory? ›

Steps
  • Open the properties of your data factory and copy the Managed Identity Application ID value.
  • Open the key vault access policies and add the managed identity permissions to Get and List secrets. ...
  • Navigate to your Key Vault secret and copy the Secret Identifier.
May 15, 2024

Top Articles
Meet the foul-mouthed ex-City trader who claims he can fix the economy
Dutch inheritance tax - Dutch Umbrella Company
Koopa Wrapper 1 Point 0
DPhil Research - List of thesis titles
Ups Dropoff Location Near Me
Craigslist Mexico Cancun
Lycoming County Docket Sheets
B67 Bus Time
A Fashion Lover's Guide To Copenhagen
Walgreens On Nacogdoches And O'connor
Craigslist Greenville Craigslist
Detroit Lions 50 50
Sport Clip Hours
2024 Non-Homestead Millage - Clarkston Community Schools
Oc Craiglsit
The Murdoch succession drama kicks off this week. Here's everything you need to know
How do you like playing as an antagonist? - Goonstation Forums
Craigslist Free Stuff Greensboro Nc
Www Craigslist Milwaukee Wi
bode - Bode frequency response of dynamic system
Jail View Sumter
Gazette Obituary Colorado Springs
Zillow Group Stock Price | ZG Stock Quote, News, and History | Markets Insider
Slim Thug’s Wealth and Wellness: A Journey Beyond Music
Weldmotor Vehicle.com
Sofia the baddie dog
Harrison County Wv Arrests This Week
Yale College Confidential 2027
Black Lion Backpack And Glider Voucher
Blush Bootcamp Olathe
Citibank Branch Locations In Orlando Florida
The Latest: Trump addresses apparent assassination attempt on X
Moonrise Time Tonight Near Me
Shiftwizard Login Johnston
Jr Miss Naturist Pageant
Closest 24 Hour Walmart
The Boogeyman Showtimes Near Surf Cinemas
Regis Sectional Havertys
Legit Ticket Sites - Seatgeek vs Stubhub [Fees, Customer Service, Security]
WorldAccount | Data Protection
Thelemagick Library - The New Comment to Liber AL vel Legis
Noaa Duluth Mn
Sams Gas Price Sanford Fl
Po Box 101584 Nashville Tn
Frontier Internet Outage Davenport Fl
John Wick: Kapitel 4 (2023)
Bridgeport Police Blotter Today
Espn Top 300 Non Ppr
Costner-Maloy Funeral Home Obituaries
Uncle Pete's Wheeling Wv Menu
Latest Posts
Article information

Author: Fredrick Kertzmann

Last Updated:

Views: 5618

Rating: 4.6 / 5 (46 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Fredrick Kertzmann

Birthday: 2000-04-29

Address: Apt. 203 613 Huels Gateway, Ralphtown, LA 40204

Phone: +2135150832870

Job: Regional Design Producer

Hobby: Nordic skating, Lacemaking, Mountain biking, Rowing, Gardening, Water sports, role-playing games

Introduction: My name is Fredrick Kertzmann, I am a gleaming, encouraging, inexpensive, thankful, tender, quaint, precious person who loves writing and wants to share my knowledge and understanding with you.