This script is used exclusively to transfer accounts from Azure Key Vault to CyberArk PAM or CyberArk Privileged Cloud. The onboarding process is automated for accounts and secrets; however, the creation of targets in SecretsHub must be performed manually.
Before using this script, ensure:
- This script automates the process of onboarding secrets from Azure Key Vault to CyberArk PAM or CyberArk Privileged Cloud.
- The SecretsHub platform must already be installed in CyberArk PAM or CyberArk Privileged Cloud as a prerequisite.
- Azure CLI is installed and authenticated. Follow the Azure CLI Installation Guide.
- CyberArk CLI (
cybr) is installed. Refer to the cybr-cli GitHub Repository for installation instructions. - You have the necessary permissions to access Azure and CyberArk resources.
./cyberark-secrets-onboarding.sh <command> [options]Perform listing operations for subscriptions, resource groups, key vaults, or secrets.
-
Subscriptions: List all subscriptions accessible to your account.
./cyberark-secrets-onboarding.sh list subscriptions
-
Resource Groups: List all resource groups in the current subscription.
./cyberark-secrets-onboarding.sh list resource
-
Key Vaults: List all key vaults within a specified resource group.
./cyberark-secrets-onboarding.sh list akv <resource-group>
-
Secrets: List all secrets stored in a specified key vault.
./cyberark-secrets-onboarding.sh list secrets <vault-name>
Change the active subscription.
./cyberark-secrets-onboarding.sh set <subscription-id>Apply CyberArk-compatible tags to all secrets in a specified key vault.
./cyberark-secrets-onboarding.sh tag <resource-group> <vault-name>Onboard secrets from a key vault into CyberArk Privileged Cloud.
./cyberark-secrets-onboarding.sh onboard <resource-group> <vault-name>Edit the script to define the CPM variable:
CPM="<your-cpm-server-name>"To tag all secrets in a key vault:
./cyberark-secrets-onboarding.sh tag my-resource-group my-key-vaultTo onboard secrets:
./cyberark-secrets-onboarding.sh onboard my-resource-group my-key-vaultThe script automatically checks for required software and exits with instructions if any are missing.
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
For issues, suggestions, or contributions, contact:
Aslan Ramos
aslan.ramos@cyberark.com