Skip to content

Setting up Azure Key Vault as a credential manager

Certificate Manager - SaaS can sign in to your machines with passwords and keys stored in Azure Key Vault. You create credentials that point to your secrets, and then assign those credentials to machines. Your VSatellites retrieve the secrets, so you need at least one VSatellite that can reach Azure.

Each time a credential is used, the latest version of its secret is read (or a pinned version, if you set one). A password you change in Azure Key Vault takes effect the next time it's used, and you don't need to update the credential. The secret value is never stored, logged, or shown.

Certificate Manager - SaaS signs in to Azure Key Vault as a Microsoft Entra ID service principal with either a client secret or a client certificate.

Looking for the Azure Key Vault machine integration?

To store certificates in your key vaults and discover them there, see Create a new Azure Key Vault machine.

Azure Key Vault feature enablement

Only System Administrators can create the Azure Key Vault credential manager connection and credentials.

If you don't see the menu options mentioned in the steps below, contact your Palo Alto Networks representative.

Step 1: Deploy VSatellites in your datacenter

If you don't already have any VSatellites installed, you'll need to get those up and running first. VSatellite is the connector between Certificate Manager - SaaS and Azure Key Vault. You need a VSatellite even if every machine that uses the credentials is a cloud service.

The VSatellites need to reach these addresses over HTTPS, either directly or through the VSatellite's HTTP proxy:

  • login.microsoftonline.com (Microsoft Entra ID)
  • <vault-name>.vault.azure.net (your key vault)

Follow our documentation to deploy VSatellites.

Step 2: Register an application in Microsoft Entra ID

Certificate Manager - SaaS signs in to Azure Key Vault as a service principal, using the credentials of an app registration in Microsoft Entra ID. Use a dedicated app registration that can only read secrets.

  1. In the Azure portal, go to Microsoft Entra ID > App registrations and register a new application for Certificate Manager - SaaS. Record its Application (client) ID and Directory (tenant) ID from the overview page.

  2. Add a credential to the app registration. Under Certificates & secrets, do one of the following:

    • Client secret (simpler): click New client secret, enter a description, and choose an expiration. Copy the secret value (not the secret ID). You can't view it again.
    • Client certificate (recommended): upload the public certificate (without its private key). Keep the PKCS#12 (.pfx/.p12) bundle that holds both the certificate and its private key; you'll upload it in the next step. Only RSA keys are supported.
  3. Grant the app registration read access to your key vault's secrets. On the key vault in the Azure portal, assign the Key Vault Secrets User role to the app registration at vault scope.

    Important

    Don't give the app registration roles that can change or delete secrets. Grant only the roles listed here.

    If the vault uses an access policy instead of Azure RBAC, add an access policy with the Get secret permission for the app registration.

    Use a dedicated vault and app registration

    Don't reuse a vault that the Azure Key Vault machine integration writes certificates into, and don't reuse that integration's app registration, because it has write access to the vault. Use a separate vault that holds only the secrets you want Certificate Manager - SaaS to read, with a separate app registration that has read-only access.

    Assign the role at vault scope, not on individual secrets. Per-secret role assignments can cause the connection test to fail even when the app registration can read the secrets it needs.

Keep the credentials current

If the client secret or certificate expires, or someone deletes the certificate, every Azure Key Vault credential that uses the connection stops working. When you replace the credentials, update the connection in Certificate Manager - SaaS right away.

Step 3: Connect Certificate Manager - SaaS to Azure Key Vault as a credential manager

With the app registration in place, you're ready to connect Certificate Manager - SaaS to your key vault.

Before you begin

  • The Application (client) ID and Directory (tenant) ID of the app registration from Step 2.
  • The client secret value, or the PKCS#12 bundle (.pfx/.p12 file) that holds the client certificate and its private key.
  • The URL of your key vault, in the form https://<vault-name>.vault.azure.net.

Performed by: System Administrator

  1. Sign in to Certificate Manager - SaaS.

  2. Click Integrations > Credential Managers.

  3. Click New, and then select Azure Key Vault.

  4. Under Secret Retrieval, complete the fields according to the following guidelines:

    • Configuration name: A name for this connection. It must be 3 to 250 characters, with no leading or trailing spaces.
    • Key Vault URL: The URL of your key vault, such as https://my-vault.vault.azure.net. The URL must follow the format https://<vault-name>.vault.azure.net.
    • Directory (Tenant) ID: The Directory (tenant) ID shown on the app registration's overview page.
    • Application (Client) ID: The Application (client) ID shown on the app registration's overview page.
    • Azure Environment: The Azure cloud that the vault belongs to. Only Azure Public Cloud is supported.
    • Authentication Type: How Certificate Manager - SaaS signs in to Microsoft Entra ID:
      • Client Certificate (recommended): upload the PKCS#12 (.pfx/.p12) file, or select a certificate from the Certificate Manager - SaaS inventory. If the bundle is password-protected, you're prompted for the Certificate Password. The certificate (without its private key) must be uploaded to the app registration's Certificates & secrets in Microsoft Entra ID.
      • Client Secret: paste the client secret value (not its ID) from the app registration.
    • Choose a VSatellite: The VSatellites that can connect to Azure. Choose at least one.

    Certificate Manager - SaaS encrypts the client secret or certificate when you move out of its field. Test Access is unavailable until the encryption finishes.

  5. Click Test Access. Certificate Manager - SaaS confirms, through each VSatellite you chose, that it can sign in to Microsoft Entra ID with the app registration and read secrets from the key vault. The test reads a secret name that doesn't exist, so a "not found" answer proves the connection works. The test doesn't read any secret values.

    Save stays unavailable until the test succeeds. Changing any connection field or the authentication credentials cancels the last test result. If only some VSatellites pass, a warning appears briefly and the failed ones turn red. If all fail, an error appears. If you change the VSatellite selection after testing, test again.

    If your access is unsuccessful, check the troubleshooting tips below.

  6. Click Save.

To change a connection later, open it from the list. The Client Secret field appears empty: leave it blank to keep the current secret, or enter a new one to replace it. A stored certificate is shown as already set and is kept unless you remove or replace it. After you change any connection field, the authentication credentials, or the VSatellite selection, test access again before you save. Changing only the name doesn't require a new test.

Step 4: Create Azure Key Vault credentials in Certificate Manager - SaaS

With the credential manager connection in place, you can create credentials in Certificate Manager - SaaS. Azure Key Vault credentials in Certificate Manager - SaaS are references to secrets stored in Azure Key Vault.

Before you begin

  • Set up a team in Certificate Manager - SaaS that will be allowed to use the credential. The team assigned to the credential should be the same team that will be assigned to the machine in Step 5 below.

  • Find the name of the secret in Azure Key Vault.

  • Decide how the secret stores the credential. A secret can hold either of these values:

    • A JSON object with the username and the password as string fields, for example {"username":"admin","password":"..."}.
    • Plain text that holds only the password or key.

Performed by: System Administrator

  1. Click Inventory > Credentials.

  2. Click New > Azure Key Vault Credential. Complete the fields on the Add a New Credential screen according to the following guidelines:

    • Name: A name for the credential. It must be at least 3 characters, with no leading or trailing spaces.
    • Configuration: The Azure Key Vault credential manager connection you set up in Step 3.
    • Owning Teams: The teams that can use this credential.
    • Access Type: Choose what Certificate Manager - SaaS reads from the secret:
      • Username and Password: (Default) Both the username and the password. Use this for any pair of values that a machine signs in with, such as a client ID and client secret. The secret must be a JSON object with username and password fields.
      • Password Only: Only the password. Use this for a password, API key, or token that a machine uses without a username.
    • Secret Name: The name of the secret in Azure Key Vault. It can contain only letters, digits, and hyphens, up to 127 characters, and must start with a letter.
    • Secret Version: (Optional) The 32-character hexadecimal version identifier. Leave it empty to always use the latest version.

    The following table shows how Certificate Manager - SaaS reads the username and password from the secret.

    Access Type Secret value Username Password
    Username and Password JSON object The value of the username field The value of the password field
    Password Only Any The secret name The whole secret value

    Note

    Username and Password requires the secret to be a JSON object with username and password fields. If the secret is not a JSON object, the credential fails. Use Password Only for a secret that holds a single value.

    Password Only always returns the whole secret value as the password, even if the value is a JSON object. It does not parse the value.

    You can't change Access Type after you save the credential.

  3. Click Save. The Credentials page opens with your new credential listed.

  4. You can now test the credential you just created. Click the credential to open its details, and then click Test Access.

    Test Access reads the secret and confirms that Certificate Manager - SaaS can get the values the credential needs. Certificate Manager - SaaS discards the value.

    If Certificate Manager - SaaS was unable to access the credential, see the troubleshooting tips below.

Step 5: Assign the credential to a machine

Performed by: Resource Owner or higher

Now that the credential is in Certificate Manager - SaaS, you can assign it to a machine. Pay attention to the following when creating a new machine that you want to use this credential:

  • The Owning Team on the machine configuration must match one of the Owning Teams on the credential.
  • During machine configuration, set Credential Type to Select Credentials, and then select your Azure Key Vault credential under Credential.
  • The Credential list shows only credentials whose Access Type matches what the machine needs. A machine that signs in with a username and password lists only Username and Password credentials, and a machine that needs only a password or key lists only Password Only credentials.

Certificate Manager - SaaS reads the secret each time the machine uses the credential, for example during discovery or provisioning. If the secret version is disabled, destroyed, expired, or not yet valid, the operation fails. Certificate Manager - SaaS never falls back to an older version.

Limitations

  • Only the Azure Public cloud is supported.
  • Certificate Manager - SaaS signs in as a service principal with a client secret or a client certificate (RSA keys only). It can't sign in with the VSatellite's own Azure identity or with other types of Azure credentials, such as managed identities.
  • A credential refers to a secret by its name and optionally its version. You can't browse secrets or find them by tag.
  • Only a username and a password are returned. API keys and tokens, and client IDs and secrets, use these two values. SSH keys with a passphrase aren't supported.
  • Secrets that back a Azure Key Vault certificate (managed secrets) are rejected, because they hold a certificate and private key, not a password.
  • Certificate Manager - SaaS enforces the secret's activation and expiration dates. Even if Azure Key Vault returns the secret, the credential fails if the secret is expired or not yet valid.

Troubleshooting

Use these tips to troubleshoot common errors. Each error message starts with a short reason, followed by details such as the vault, the secret, or the app registration. Messages never include the client secret, the certificate, or a secret value.

Azure Key Vault credential manager connection errors

These errors appear when you test access on an Azure Key Vault credential manager connection.

Error Resolution
Invalid vault address The vault URL must be https://<vault-name>.vault.azure.net. Vault names are 3 to 24 characters, start with a letter, end with a letter or digit, and can't contain consecutive hyphens.
Microsoft Entra ID is unreachable Check that the VSatellite can reach login.microsoftonline.com over HTTPS, and check the VSatellite's proxy, firewall, and DNS. A TLS-inspecting proxy must be trusted by the VSatellite's system roots.
Microsoft Entra ID rejected the tenant Use the Directory (tenant) ID of the app registration, not a subscription ID.
Microsoft Entra ID rejected the client ID Use the Application (client) ID of the app registration, not its object ID.
Microsoft Entra ID rejected the client secret Enter the client secret's value, not its ID. If the secret expired, create a new one on the app registration and update the connection.
Microsoft Entra ID rejected the client certificate The certificate isn't registered on the app registration. Upload the certificate (without its private key) to the app registration's Certificates & secrets in Microsoft Entra ID. The error includes the certificate's SHA-1 thumbprint.
Microsoft Entra ID rejected the client certificate (assertion time) The VSatellite's system clock is out of sync. Correct it and try again.
Microsoft Entra ID rejected the application The app registration is disabled in the tenant. Re-enable it in Microsoft Entra ID.
Client certificate could not be read The uploaded file isn't a valid PKCS#12 bundle, or the password is wrong. Upload a valid .pfx or .p12 file.
Client certificate is not valid The certificate has expired or isn't valid yet. Upload a current certificate.
Azure Key Vault is unreachable Check the vault URL and the VSatellite's outbound access (firewall, proxy, DNS). A private endpoint needs DNS for privatelink.vaultcore.azure.net.
The address is not an Azure Key Vault The URL didn't return an Azure Key Vault authentication challenge. Confirm the vault URL.
The vault belongs to a different tenant The vault trusts a different tenant than the Directory (Tenant) ID you entered. Use the tenant (directory) ID that the vault belongs to.
Azure Key Vault rejected the access token The token was rejected. Confirm the Directory (Tenant) ID and Application (Client) ID.
Azure Key Vault firewall blocked the request Allow the VSatellite's outbound IP address in the vault's networking settings, or reach the vault through a private endpoint.
Permission denied by Azure Key Vault Grant the app registration the Key Vault Secrets User role at vault scope, or the Get secret permission in the vault's access policies. New role assignments can take several minutes to apply.
Azure throttled the request Azure returned HTTP 429 (too many requests). Wait and try again.
Azure Key Vault did not respond in time Check the VSatellite's network connection and its latency to Azure, and try again.
Microsoft Entra ID rejected the credentials Microsoft Entra ID returned an error not covered above, such as a Conditional Access policy block. Check the error details and the app registration's configuration in Microsoft Entra ID.
Microsoft Entra ID returned an unexpected error An unexpected error occurred during sign-in. Check the error details and try again.
Azure Key Vault returned an unexpected error An unexpected error occurred while accessing the vault. Check the error details and try again.

Azure Key Vault credential errors

These errors appear when you test access on an Azure Key Vault credential. Connection errors (sign-in, vault access, and VSatellite reachability) can also appear on a credential test, because the credential uses the same connection. See the connection errors above. When a machine can't retrieve the credential, the machine shows a general error instead. To see the reason, test access on the credential.

Error Resolution
Invalid secret reference The secret name or version is not valid. Secret names can contain only letters, digits, and hyphens, up to 127 characters, and must start with a letter. Versions are 32-character hexadecimal identifiers.
Secret not found Check the secret name and version. The secret might have no versions, or the version doesn't exist.
Secret is disabled The secret or its version is disabled in Azure Key Vault. Enable it, or point the credential at an enabled version.
Secret has expired The secret's expiration date has passed. Set a new version or a later expiration date in Azure Key Vault.
Secret is not yet valid The secret's activation date hasn't passed. Wait, or change the activation date in Azure Key Vault.
Secret is a certificate The secret backs a Azure Key Vault certificate and holds a certificate and private key, not a password. Use a regular secret instead.
Secret value is empty The secret holds no value. Store the password or key in the secret.
Secret is not in the username/password format The secret is not a JSON object with username and password fields. Use the Password Only access type for a secret that holds a single value.
Secret is missing its username or password The JSON object doesn't have a non-empty username or password field. Check the secret's value.