# 2. Vault Setup

{% hint style="warning" %}
To perform the following steps, the user must be a Integration Gateway administrator for the target environment.
{% endhint %}

In this step, we will make use of Integration Gateway's vault feature as a data store for our list of customers. To learn about vault and its full suite of methods, visit [this guide for more information](https://glyue.docs.sandboxbanking.com/tutorials/building-a-restful-crud-web-service/5.-vault-code-examples-and-explanation).

### Create Vault

Log into Integration Gateway and navigate to the **Vault** page.

<figure><img src="https://688288018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1flQ2To8tQpCQWl2Ty9U%2Fuploads%2Fozu0UAq7GYXn6IzbNgq6%2Fimage.png?alt=media&#x26;token=6ae70c2c-3406-4b2d-bd07-af0001937fe2" alt=""><figcaption></figcaption></figure>

Click on the **Create Vault** button, name the vault **data**, and save by clicking on the button again or pressing enter on your keyboar&#x64;**.**&#x20;

<figure><img src="https://688288018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1flQ2To8tQpCQWl2Ty9U%2Fuploads%2FIEnTxz7ge9dEM2omnbve%2Fimage.png?alt=media&#x26;token=2e17d8ba-67dd-443c-b9c9-d82fc2b0605d" alt=""><figcaption></figcaption></figure>

You should see the newly created vault on the **Vault** page.

<figure><img src="https://688288018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1flQ2To8tQpCQWl2Ty9U%2Fuploads%2F5cWoLEeD5YUfQwZW51ik%2Fimage.png?alt=media&#x26;token=89aeeb42-2a7d-4ec3-901d-4f967686d8d3" alt=""><figcaption></figcaption></figure>

### Create Vault Item

{% hint style="warning" %}
To perform the following steps, the user must be a Integration Gateway administrator for the target environment.
{% endhint %}

We will create a vault item containing a list of customer information. Each customer will have an id, first name, last name, birth date, and a social security number.

To create a vault item, click on the **data** vault to highlight it and click on the **Create Vault Item** button. Name the vault item key **customers** and add a value of `[]` for the vault item key.&#x20;

Save the vault item.&#x20;

<figure><img src="https://688288018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1flQ2To8tQpCQWl2Ty9U%2Fuploads%2F42Giel3eClwdVGyJzA5T%2Fimage.png?alt=media&#x26;token=2c3c7146-dbc6-4453-afd1-3ec603fcd95d" alt=""><figcaption></figcaption></figure>

The **data** vault should now have a vault item named **customers.**

<figure><img src="https://688288018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1flQ2To8tQpCQWl2Ty9U%2Fuploads%2FcYON7KxItTl5Uth3MNxd%2Fimage.png?alt=media&#x26;token=9e55031a-c0f5-4cb7-9373-a4aea445c9cf" alt=""><figcaption></figcaption></figure>

### **Add Vault Permissions**

{% hint style="warning" %}
To perform the following steps, the user must be a Integration Gateway administrator for the target environment.
{% endhint %}

Log into Integration Gateway, if necessary and navigate to the **Admin** site.

Scroll to the **Configuration** section, locate **Vault Permissions** and click **Add**.

On the **Add** **Vault Permissions** page, select **data** from the **Vault** dropdown menu, select the integration `get_all_customers` from the Integration dropdown menu, and check the boxes **Read** and **Write**.&#x20;

Click on the **Save** button belo&#x77;**.**

<figure><img src="https://688288018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1flQ2To8tQpCQWl2Ty9U%2Fuploads%2FqgPsnFo96UXJsEP4CJPV%2Fimage.png?alt=media&#x26;token=ba9acdc8-e0a1-4841-a50e-e636d21f27f6" alt=""><figcaption></figcaption></figure>

Add a vault permission for each integration we had created.

<figure><img src="https://688288018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1flQ2To8tQpCQWl2Ty9U%2Fuploads%2F5vGZbqD5SQ66xeQglguX%2Fimage.png?alt=media&#x26;token=8a2081b4-e76e-4643-8148-5fea407e5243" alt=""><figcaption></figcaption></figure>
