# Adding a Key

Each key in a keyring is assigned to a period when it is applicable for backup and migrate jobs. At any time, only one key in a keyring is applicable. The other keys in a keyring, although retired, may still be needed for restore and migrate jobs.

To add a key to a keyring, follow the procedure below.

{% tabs %}
{% tab title="Web interface" %}

1. Open the *Enterprise Information* view by clicking the gear icon ![](https://136305054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UXIs2mYtZK3gESAw4ZQ%2Fuploads%2Fgit-blob-91cc61335e0c904e7816bc0d1c9ae56d69fce6b2%2Fgears.png?alt=media) in the header.
2. Go to the *Keyrings* tab.\
   The tab lists all keyrings created by the DPX administrator.

<figure><img src="https://136305054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UXIs2mYtZK3gESAw4ZQ%2Fuploads%2Fgit-blob-9abbe9b29650175c3c3f6eb6708bf7ed73fb502d%2FEnterprise%20information%20-%20keyrings%20-%20add%20key%20to%20keyring.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Hover over the keyring and click the edit icon ![](https://136305054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UXIs2mYtZK3gESAw4ZQ%2Fuploads%2Fgit-blob-8b974992a66d24bbf92cd7201e0036f92f98e7be%2Ficon-edit.png?alt=media).\
   The *Edit Keyring* dialog window will open.

<figure><img src="https://136305054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UXIs2mYtZK3gESAw4ZQ%2Fuploads%2Fgit-blob-8317fe184d001f3915c2c1cf8acfa6c8c15636c8%2FEnterprise%20information%20-%20keyrings%20-%20edit%20keyring%20-%20one%20key.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

4. Click **Add new key**.\
   A new key will be added to the keyring.

<figure><img src="https://136305054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UXIs2mYtZK3gESAw4ZQ%2Fuploads%2Fgit-blob-d4027aa4b99abacefceb31d1e7d5f2c453105b0c%2FEnterprise%20information%20-%20keyrings%20-%20edit%20keyring%20-%20two%20keys.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %} <mark style="color:blue;">**Note.**</mark> The previous key in the keyring is automatically retired. However, it still can be used to access backups encrypted using the key.
{% endhint %}

### Removing a Key

{% hint style="warning" %} <mark style="color:orange;">**Important.**</mark> Generally, removing keys or keyrings from DPX is not recommended, as removing the key will make it impossible to restore data from backups created using the removed key.
{% endhint %}

1. To remove a key, hover over the keyring and click the edit icon ![](https://136305054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UXIs2mYtZK3gESAw4ZQ%2Fuploads%2Fgit-blob-8b974992a66d24bbf92cd7201e0036f92f98e7be%2Ficon-edit.png?alt=media).\
   The *Edit Keyring* dialog window will open.

<figure><img src="https://136305054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UXIs2mYtZK3gESAw4ZQ%2Fuploads%2Fgit-blob-12d607bd2c8d081b7617b817a75b12c9aa7ce203%2FEnterprise%20information%20-%20keyrings%20-%20edit%20keyring%20-%20two%20keys%20-%20remove.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

2. Click the![](https://136305054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UXIs2mYtZK3gESAw4ZQ%2Fuploads%2Fgit-blob-205fba9f446d62e983288de2bc305c8bcc95c158%2Fkosz%20oddech.png?alt=media)icon. You will be prompted to confirm your choice.

<figure><img src="https://136305054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UXIs2mYtZK3gESAw4ZQ%2Fuploads%2Fgit-blob-dcf26b15019b51f7a398500c751ed4a30bfc458d%2FEnterprise%20information%20-%20keyrings%20-%20edit%20keyring%20-%20two%20keys%20-%20remove%20confirmation.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

3. Type the key ID to confirm, then click **Remove**.\
   The key will be permanently removed from the keyring.

{% hint style="danger" %} <mark style="color:red;">**Warning!**</mark> All backups made using the removed key will become inaccessible.
{% endhint %}

### Removing a Keyring

{% hint style="info" %} <mark style="color:blue;">**Note.**</mark> Only empty keyrings can be removed. To remove a keyring that contains keys, remove all the keys first.
{% endhint %}

To remove an empty keyring, hover over the keyring and click the![](https://136305054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UXIs2mYtZK3gESAw4ZQ%2Fuploads%2Fgit-blob-205fba9f446d62e983288de2bc305c8bcc95c158%2Fkosz%20oddech.png?alt=media)icon.

<figure><img src="https://136305054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UXIs2mYtZK3gESAw4ZQ%2Fuploads%2Fgit-blob-8a4ad24d6d41115ac2c6568d8a08c4b9e3d32e27%2FEnterprise%20information%20-%20keyrings%20-%20remove%20keyring.png?alt=media" alt=""><figcaption></figcaption></figure>

You will be prompted to confirm your choice.

<figure><img src="https://136305054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UXIs2mYtZK3gESAw4ZQ%2Fuploads%2Fgit-blob-de8a40a45891122760b25b28693212698b97ca63%2FEnterprise%20information%20-%20keyrings%20-%20remove%20keyring%20-%20confirm.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

Click **Yes**. The empty keyring will be deleted from the list.
{% endtab %}

{% tab title="Desktop interface" %}

1. Click the **Configure** tab on the Function Tab bar.
2. Click **Keyrings** in the *Configuration Operations* section in the sidebar.

<figure><img src="https://136305054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UXIs2mYtZK3gESAw4ZQ%2Fuploads%2Fgit-blob-88ae22f47649dd757ba1206302a5e64294de242b%2FJAVA%20-%20configure%20-%20keyrings%20-%20add%20key.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Select the keyring where you want to add the key and do one of the following:
   * Right-click the keyring and select **Add Key**.
   * From the window menu bar, select **Keyring** > **Add Key** \[Ctrl+Shift+E].
   * Select **Add Key** from the task panel in the *Add Key* section.

<figure><img src="https://136305054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UXIs2mYtZK3gESAw4ZQ%2Fuploads%2Fgit-blob-84754c96a44aca7cc26015e3db221b73939cd6b8%2FJAVA%20-%20configure%20-%20keyrings%20-%20key%20added.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %} <mark style="color:blue;">**Note.**</mark> The previous key in the keyring is automatically retired. However, it still can be used to access backups encrypted using the key.
{% endhint %}

### Removing a Key

{% hint style="warning" %} <mark style="color:orange;">**Important.**</mark> Generally, removing keys or keyrings from DPX is not recommended, as removing the key will make it impossible to restore data from backups created using the removed key.
{% endhint %}

1. To remove a key, do one of the following:
   * Right-click the key and select **Delete**.
   * From the window menu bar, select **Keyring** > **Delete Key**.
   * Select **Delete Key** from the task panel in the *Add Key* section.

You will be prompted to confirm your choice:

<div align="center"><figure><img src="https://136305054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UXIs2mYtZK3gESAw4ZQ%2Fuploads%2Fgit-blob-63f550437ebe862f0a1890f34e4bd3162cbf1423%2FJAVA%20-%20configure%20-%20keyrings%20-%20remove%20key%20confirmation%20prompt.png?alt=media" alt="" width="233"><figcaption></figcaption></figure></div>

2. Click **Yes**.\
   The key will be permanently removed from the keyring.

{% hint style="danger" %} <mark style="color:red;">**Warning!**</mark> All backups made using the removed key will become inaccessible.
{% endhint %}

### Removing a Keyring

{% hint style="info" %} <mark style="color:blue;">**Note.**</mark> Only empty keyrings can be removed. To remove a keyring that contains keys, remove all the keys first.
{% endhint %}

To remove an empty keyring, to one of the following:

* Right-click the keyring and select **Delete**.
* From the window menu bar, select **Keyring** > **Delete Keyring**.
* Select **Delete Keyring** from the task panel in the *Add Key* section.

The empty keyring will be deleted without any prompts.
{% endtab %}
{% endtabs %}
