Azure Key Vault Keys, Secrets, and Certificates Overview (2024)

  • Article

Azure Key Vault enables Microsoft Azure applications and users to store and use several types of secret/key data: keys, secrets, and certificates. Keys, secrets, and certificates are collectively referred to as "objects".

Object identifiers

Objects are uniquely identified within Key Vault using a case-insensitive identifier called the object identifier. No two objects in the system have the same identifier, regardless of geo-location. The identifier consists of a prefix that identifies the key vault, object type, user provided object name, and an object version. Identifiers that don't include the object version are referred to as "base identifiers". Key Vault object identifiers are also valid URLs, but should always be compared as case-insensitive strings.

For more information, see Authentication, requests, and responses

An object identifier has the following general format (depending on container type):

  • For Vaults:https://{vault-name}.vault.azure.net/{object-type}/{object-name}/{object-version}

  • For Managed HSM pools:https://{hsm-name}.managedhsm.azure.net/{object-type}/{object-name}/{object-version}

Note

See Object type support for types of objects supported by each container type.

Where:

ElementDescription
vault-name or hsm-nameThe name for a key vault or a Managed HSM pool in the Microsoft Azure Key Vault service.

Vault names and Managed HSM pool names are selected by the user and are globally unique.

Vault name and Managed HSM pool name must be a 3-24 character string, containing only 0-9, a-z, A-Z, and not consecutive -.

object-typeThe type of the object, "keys", "secrets", or "certificates".
object-nameAn object-name is a user provided name for and must be unique within a key vault. The name must be a 1-127 character string, starting with a letter and containing only 0-9, a-z, A-Z, and -.
object-version An object-version is a system-generated, 32 character string identifier that is optionally used to address a unique version of an object.

DNS suffixes for object identifiers

The Azure Key Vault resource provider supports two resource types: vaults and managed HSMs. This table shows the DNS suffix used by the data-plane endpoint for vaults and managed HSM pools in various cloud environments.

Cloud environmentDNS suffix for vaultsDNS suffix for managed HSMs
Azure Cloud.vault.azure.net.managedhsm.azure.net
Microsoft Azure operated by 21Vianet Cloud.vault.azure.cnNot supported
Azure US Government.vault.usgovcloudapi.netNot supported
Azure German Cloud.vault.microsoftazure.deNot supported

Object types

This table shows object types and their suffixes in the object identifier.

Object typeIdentifier SuffixVaultsManaged HSM Pools
HSM-protected keys/keysSupportedSupported
Software-protected keys/keysSupportedNot supported
Secrets/secretsSupportedNot supported
Certificates/certificatesSupportedNot supported
Storage account keys/storageSupportedNot supported
  • Cryptographic keys: Supports multiple key types and algorithms, and enables the use of software-protected and HSM-protected keys. For more information, see About keys.
  • Secrets: Provides secure storage of secrets, such as passwords and database connection strings. For more information, see About secrets.
  • Certificates: Supports certificates, which are built on top of keys and secrets and add an automated renewal feature. Keep in mind when a certificate is created, an addressable key and secret are also created with the same name. For more information, see About certificates.
  • Azure Storage account keys: Can manage keys of an Azure Storage account for you. Internally, Key Vault can list (sync) keys with an Azure Storage Account, and regenerate (rotate) the keys periodically. For more information, see Manage storage account keys with Key Vault.

For more general information about Key Vault, see About Azure Key Vault. For more information about Managed HSM pools, see What is Azure Key Vault Managed HSM?

Data types

Refer to the JOSE specifications for relevant data types for keys, encryption, and signing.

  • algorithm - a supported algorithm for a key operation, for example, RSA1_5
  • ciphertext-value - cipher text octets, encoded using Base64URL
  • digest-value - the output of a hash algorithm, encoded using Base64URL
  • key-type - one of the supported key types, for example RSA (Rivest-Shamir-Adleman).
  • plaintext-value - plaintext octets, encoded using Base64URL
  • signature-value - output of a signature algorithm, encoded using Base64URL
  • base64URL - a Base64URL [RFC4648] encoded binary value
  • boolean - either true or false
  • Identity - an identity from Microsoft Entra ID.
  • IntDate - a JSON decimal value representing the number of seconds from 1970-01-01T0:0:0Z UTC until the specified UTC date/time. See RFC3339 for details regarding date/times, in general and UTC in particular.

Objects, identifiers, and versioning

Objects stored in Key Vault are versioned whenever a new instance of an object is created. Each version is assigned a unique object identifier. When an object is first created, it's given a unique version identifier and marked as the current version of the object. Creation of a new instance with the same object name gives the new object a unique version identifier, causing it to become the current version.

Objects in Key Vault can be retrieved by specifying a version or by omitting version to get latest version of the object. Performing operations on objects requires providing version to use specific version of the object.

Note

The values you provide for Azure resources or object IDs may be copied globally for the purpose of running the service. The value provided should not include personally identifiable or sensitive information.

Next steps

  • About keys
  • About secrets
  • About certificates
  • Authentication, requests, and responses
  • Key Vault Developer's Guide
Azure Key Vault Keys, Secrets, and Certificates Overview (2024)

FAQs

How do I get the list of secrets from 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.

What are 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.

How many secrets are in Azure key vault? ›

Limits on count of keys, secrets and certificates:

Key Vault does not restrict the number of versions on a secret, key or certificate, but storing a large number of versions (500+) can impact the performance of backup operations. See Azure Key Vault Backup.

What is the difference between certificate and secret in Azure key vault? ›

Secrets: Provides secure storage of secrets, such as passwords and database connection strings. For more information, see About secrets. Certificates: Supports certificates, which are built on top of keys and secrets and add an automated renewal feature.

How do I get data from Azure key vault? ›

Steps
  1. Open the properties of your data factory and copy the Managed Identity Application ID value.
  2. Open the key vault access policies and add the managed identity permissions to Get and List secrets. ...
  3. Navigate to your Key Vault secret and copy the Secret Identifier.
Dec 4, 2023

What is the difference between list and get in Azure key vault? ›

List: Allows a client to list all keys in a given Key Vault. List versions: Allows a client to list all versions of a given key in a given Key Vault. Get: Allows a client to retrieve the public parts of a given key in a Key Vault.

What are certificates in Azure key Vault? ›

Azure Key Vault certificate support provides for management of your X. 509 certificates and the following behaviors: Allows a certificate owner to create a certificate through a key vault creation process or through the import of an existing certificate.

What type of certificate is Azure key vault? ›

In Azure Key Vault, supported certificate formats are PFX and PEM. . pem file format contains one or more X509 certificate files.

Which types of secrets can be stored in an Azure key Vault? ›

Secrets Management - Azure Key Vault can be used to Securely store and tightly control access to tokens, passwords, certificates, API keys, and other secrets. Key Management - Azure Key Vault can be used as a Key Management solution.

Is Azure key Vault Paas or SaaS? ›

Azure Key Vault is a SaaS solution.

What happens when an Azure key Vault secret expires? ›

The expiration date attribute configured for an Azure Key Vault secret identifies the expiration time after which the secret must not be used anymore for storing sensitive and confidential data such as passwords and database connection strings.

What are the different types of Azure keys? ›

Azure Key Vault provides two types of resources to store and manage cryptographic keys. Vaults support software-protected and HSM-protected (Hardware Security Module) keys. Managed HSMs only support HSM-protected keys.

How many key vaults should you use? ›

Use separate key vaults

When you deploy Azure Key Vault, you must choose between single or multiple vaults. Microsoft recommends users keep one vault per application, per environment. For example, use one key vault each for development, pre-production and production within specific regions.

What are the differences between keys and certificates within the key vault? ›

Certificates are, well, certificates like SSL certificates to secure web applications or code signing certificates for software deployments. Keys are cryptographic keys used to encrypt for example data at rest for azure services. See the docs for more details.

Are Azure key vault secrets encrypted? ›

The Azure Key Vault service encrypts your secrets when you add them, and decrypts them automatically when you read them.

How do I find my Azure secret key? ›

1 answer
  1. Login to the Azure Portal.
  2. Navigate to Azure Active Directory.
  3. Select App Registrations , locate the Azure AD App that you're trying to find the Client ID and Client Secret Key for.
  4. Within the Azure AD App, select Certificates & Secrets.
May 2, 2022

Does not have secrets list permission on key vault Azure? ›

To add the access policy, Navigate to Azure Portal > Key vaults > your_key_vault > Access policies > Add Access Policy. In Access Policy, Select the permissions you want.

How do you read secrets from Azure Key Vault during pipeline execution? ›

Once the pipeline run is complete, select Artifacts and then select drop. In the newly opened window, select drop > secret. txt, select the ellipsis icon (...), and then select download to save the text file. Open the text file you just downloaded, it should contain the secret from your Azure key vault.

Top Articles
Latest Posts
Article information

Author: Margart Wisoky

Last Updated:

Views: 5918

Rating: 4.8 / 5 (58 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Margart Wisoky

Birthday: 1993-05-13

Address: 2113 Abernathy Knoll, New Tamerafurt, CT 66893-2169

Phone: +25815234346805

Job: Central Developer

Hobby: Machining, Pottery, Rafting, Cosplaying, Jogging, Taekwondo, Scouting

Introduction: My name is Margart Wisoky, I am a gorgeous, shiny, successful, beautiful, adventurous, excited, pleasant person who loves writing and wants to share my knowledge and understanding with you.