# Key Vault

DuploCloud integrates with Azure Key Vault to secure the storage of secrets, such as passwords and database connection strings.

## Configuring Azure Key Vault

1. In the DuploCloud Portal, navigate to **Cloud Services** -> **Key Vault**.
2. Click **Add**. The **Create a** **Key Vault** pane displays.<br>

   <div align="left"><figure><img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2FKbXUzO0KjraOmtKjSZX1%2FScreenshot%20(72).png?alt=media&#x26;token=1fe3973f-c032-428d-bd54-43f2515a43fd" alt=""><figcaption><p><strong>Create a</strong> <strong>Key Vault</strong> pane</p></figcaption></figure></div>
3. Enter a **Name** for the Key Vault.
4. Select a **SKU Pricing Tier**: **Standard** or **Premium**.
5. Optionally, enable **Purge Protection**. Once enabled, this cannot be reversed.
6. Specify the number of **Retention Days** for key vault items.
7. Click **Create** to provision the Key Vault.

## Adding Secrets to Key Vault

1. In the DuploCloud Portal, navigate to **Cloud Services** -> **Key Vault**.
2. Select the **Azure Key Vaults** tab.
3. Select the Key Vault from the **NAME** column.
4. Select the **Secrets** tab.
5. Click, **Add**. The **Create a Secret** pane displays.<br>

   <div align="left"><figure><img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2FaDqaVbZbjnMpx8bdnKKa%2FScreenshot%20(108).png?alt=media&#x26;token=5a5e8b3d-3ba0-4e31-b58f-1613d2f0eea3" alt="" width="453"><figcaption><p>The <strong>Create a Secret</strong> pane</p></figcaption></figure></div>
6. Complete the following fields on the **Create a Secret** pane:
   * **Name**: Specify the name of the secret.
   * **Secret Value**: Enter the actual value of the secret.
   * **Content Type**: Define the type of content stored in the secret (e.g., **text/plain**, **application/json**, etc.).
7. Click **Submit**.

## Updating a Secret in Azure Key Vault

After creating a Key Vault and adding secrets, you can update an existing secret when needed. Follow these steps to update a secret in your Azure Key Vault:

1. In the DuploCloud Portal, go to **Cloud Services** -> **Key Vault**.
2. Select the Key Vault you wish to manage from the **NAME** column.
3. Select the **Secrets** tab.
4. Click the menu icon (<img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2F2zCpjpPJBxCltuVCLA89%2Fmenu%20icon.avif?alt=media&#x26;token=85eee83d-9971-4469-9bcd-61a43626d0fb" alt="" data-size="line">) next to the secret you want to update.
5. From the menu options, select **Edit**. The **Update a Secret** pane displays.
6. Update the **Value** field with the new data you want to store.
7. Click **Update** to apply the changes. The updated secret will now be stored as a new version, and the old version will be moved to the secret's version history.

## Managing Deleted Azure Key Vaults

DuploCloud allows you to view, recover, and purge deleted Azure Key Vaults directly from the portal.

1. In the DuploCloud Portal, navigate to **Cloud Services** -> **Key Vault**.
2. Select the **Azure Key Vaults** tab.
3. Click the **Actions** button.
4. Select **Manage Deleted Vaults**. A list of deleted key vaults displays.<br>

   <figure><img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2FBQmsY2a5PPHcxYZZFHPy%2FScreenshot%20(681).png?alt=media&#x26;token=bde57406-0ea3-48a4-894b-a6d0044751d5" alt=""><figcaption><p><strong>Manage Deleted Vaults</strong> page with <strong>Recover</strong> and <strong>Purge</strong> options highlighted</p></figcaption></figure>
5. Click the menu icon (<img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2F2zCpjpPJBxCltuVCLA89%2Fmenu%20icon.avif?alt=media&#x26;token=85eee83d-9971-4469-9bcd-61a43626d0fb" alt="" data-size="line">) in the row of the vault you want to manage.
6. Select one of the following options:
   * **Recover**: Restore the deleted vault to active status so it can be used again.
   * **Purge**: Permanently delete the vault and all its contents. This action cannot be undone.
7. Confirm your choice in the popup confirmation modal to proceed.

## **Viewing Secret Versions**

1. Select the **Secrets** tab.
2. Select the Key Vault you wish to manage from the **NAME** column.
3. In the DuploCloud Portal, go to **Cloud Services** -> **Key Vault**.
4. Click the caret (<img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2Fz86Lym36IM2UAGu4skK2%2FScreenshot%20(111).png?alt=media&#x26;token=425245b9-18bd-4d54-88a3-5edb87b7124a" alt="" data-size="line">) next to the secret's name. A list of available versions will appear.
5. To view a specific version, click the menu icon (<img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2F2zCpjpPJBxCltuVCLA89%2Fmenu%20icon.avif?alt=media&#x26;token=85eee83d-9971-4469-9bcd-61a43626d0fb" alt="" data-size="line">) next to the version and select **View**. The **JSON representation** of that version displays.

<figure><img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2FlKQCZONbnsygwkZ74La0%2FScreenshot%20(110).png?alt=media&#x26;token=0b450fb9-ee79-4b2b-8eb1-e86fabbafeb4" alt=""><figcaption></figcaption></figure>
