Integrating CyberArk SaaS Privileged Cloud with Azure Key Vault for selective safe synchronization requires detailed planning and configuration. This guide explains the process of copying credentials from CyberArk to Azure Key Vault, while targeting only specific safes. Additionally, it covers the unique requirement of having the credentials stored unencrypted in Azure Key Vault by addressing operational practices. While Azure Key Vault automatically encrypts secrets at rest for enhanced security, you can manage access and decryption at the application level to utilize the secrets in an unencrypted form.
Before initiating the synchronization process, verify that your CyberArk environment is set up properly:
Firstly, determine which safe(s) will have their credentials transferred to Azure Key Vault. This selection helps target only the required resources, reducing unnecessary exposures and ensuring compliance with organizational policies.
CyberArk incorporates a Secrets Hub service that is designed to facilitate the synchronization of secrets between CyberArk and external systems like Azure Key Vault. Ensure that:
In Azure, the following prerequisites need to be met:
Create or identify an Azure Key Vault instance that will store the secrets. Even though Azure Key Vault encrypts secrets by default, you plan to manage the credentials' unencrypted utilization at the application level or via custom processes. Ensure you have:
Install and update the Azure Az PowerShell Module. This tool plays a key role when executing commands like Update-AzKV
for pushing or updating secrets from CyberArk to Azure Key Vault.
Begin by reviewing and identifying the specific safes containing the credentials that need to be synchronized. You can manage this within CyberArk by tagging or specifying the safe names. This helps you limit the scope solely to those credentials relevant to your operations.
To facilitate synchronization, add new TEXT type File Categories (like "KeyVaultName" and "SecretName") to the account configurations in CyberArk. This informs CyberArk which Azure Key Vault instance and secret name to target during the synchronization process.
Then, modify the platform settings to include a new usage option. Often labeled as Update-AzKV
, this command directs the system to push credentials from the specified safe to the Azure Key Vault. Set the "SearchForUsage" parameter to “Yes” to enable automatic association of credentials during CyberArk's password management cycles.
In Azure, if you do not already have a Key Vault created, establish one. Assign the correct network restrictions and access policies to ensure only authorized actions occur. To achieve the integration:
Add access policies specifically for updating, reading, and setting secrets in the Key Vault. This account will act as the intermediary that ensures CyberArk is allowed to push and update credentials. It is essential to test these permissions by manually pushing a test secret using PowerShell commands.
CyberArk’s Secrets Hub offers the ability to define a sync policy – a set of rules which determine which safe’s secrets get synchronized to the Azure Key Vault. Steps to configure include:
You have the option of automating synchronization using CyberArk’s native workflow combined with PowerShell scripts or designated plugins. Notably, the Update-AzKV
command can push updates immediately after a password change. Manual verification at the initial stages is crucial to validate the configuration.
Azure Key Vault is engineered to store secrets in an encrypted format by default. Encryption at rest is a built-in security measure and cannot be disabled at the Key Vault level. However, you can retrieve and handle the secrets in unencrypted form within your application. In other words, while the secret is physically encrypted in Key Vault storage, the decryption is handled automatically upon retrieval.
If your requirement mandates that the credentials be available in an unencrypted form after retrieval, configure your application logic accordingly. Follow these steps:
Note that while you can work with unencrypted credentials after retrieval, doing so introduces security vulnerabilities. It is paramount to assess the compliance risks and secure your application environment vigorously.
An example PowerShell script can serve as a starting template for the synchronization process. Below is a sample snippet for interacting with Azure Key Vault. You will need to incorporate CyberArk API calls or plugin integrations in your actual script:
# Install the Azure Az.KeyVault module, if not already installed
Install-Module -Name Az.KeyVault -Force
# Define your Azure Key Vault information
$keyVaultName = "YourKeyVaultName"
$resourceGroupName = "YourResourceGroupName"
# Retrieve the Key Vault object
$keyVault = Get-AzKeyVault -VaultName $keyVaultName -ResourceGroupName $resourceGroupName
# Example: Setting a secret in the Key Vault
# This would be executed after retrieving the credential from CyberArk
Set-AzKeyVaultSecret -VaultName $keyVaultName -Name "YourSecretName" -SecretValue (ConvertTo-SecureString "YourSecretValue" -AsPlainText -Force)
# Further integration logic with CyberArk would be implemented here.
Component | Purpose | Key Configurations |
---|---|---|
CyberArk Safe Selection | Identify and tag the specific safes for synchronization | Custom TEXT categories (e.g., "KeyVaultName", "SecretName") |
Secrets Hub Sync Policy | Define which safes’ secrets are synchronized | Policy includes target safes and usage flag (SearchForUsage) |
Update-AzKV Command | Trigger credential push from CyberArk to Azure Key Vault | Usage configuration and association with an Azure AD account |
Azure Key Vault Access | Secure storage of secrets with default encryption | Key Vault instance with configured access policies |
Application Logic | Handle secret decryption for unencrypted usage | Secure retrieval and processing of secrets post-decryption |
Although the process of transferring credentials from CyberArk to Azure Key Vault can be implemented to functionally output unencrypted values to applications, it is essential to appreciate that:
Automate regular synchronization and perform constant monitoring:
Many organizations leverage third-party tools designed specifically for this integration. For instance, a GitHub-hosted plugin can automate the password synchronization process between CyberArk and Azure Key Vault. Such tools provide:
The implementation of copying credentials from CyberArk to Azure Key Vault, especially targeting specific safes, follows a disciplined workflow: