# Configuration

## Keys

A "Key" concept of the automation utility is that we don't store sensitive information (like connection strings, SFTP information, etc) inside the package. Instead, we reference the keys they belong to.

Let's say we're transforming data from <mark style="color:orange;">**Pizzeria**</mark>'s SFTP server to a local <mark style="color:orange;">**Reporting**</mark> folder. We would configure our source to be an SFTP server with the <mark style="color:orange;">**Pizzeria**</mark> key, and the target to be a folder with the <mark style="color:orange;">**Reporting**</mark> key.&#x20;

<figure><img src="https://2203366127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FloJjRj49SSQfSrp7vuw9%2Fuploads%2FBI2s7sd7Ufpuq47oHMjy%2Fimage.png?alt=media&#x26;token=bc2ff959-6d47-432a-bc6a-2b0b5612fca2" alt=""><figcaption><p>Keys</p></figcaption></figure>

To actually provide the secure SFTP credentials, and the folder path, you would do so locally alongside your client application.&#x20;

<figure><img src="https://2203366127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FloJjRj49SSQfSrp7vuw9%2Fuploads%2FLqbu8fXYHWGcdtwNqEkX%2Fimage.png?alt=media&#x26;token=f7f6e1aa-411c-445d-98d1-7efe8e562d18" alt=""><figcaption><p>Client config</p></figcaption></figure>

## Encryption / Decryption

The application supports both encryption and decryption of the settings.json file associated with the application.&#x20;

### Encrypt

To encrypt, run the application with the **`-e`** flag followed by the password. An example:

```
TransformClient.exe -e "Expelliarmus"
```

The application credentials will now be encrypted and not visible under inspection.&#x20;

{% hint style="success" %}
The application will create a **.bak.json** file of the credentials before attempting to encrypt. This is to prevent data loss or accidents. <mark style="color:red;">**If you're satisfied with the encrypted results, don't forget to delete this file**</mark>.&#x20;
{% endhint %}

<figure><img src="https://2203366127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FloJjRj49SSQfSrp7vuw9%2Fuploads%2FNkrGSQbykZm6ocDQydW9%2Fimage.png?alt=media&#x26;token=52b82a90-48c6-43cc-81aa-9992b45b7d88" alt=""><figcaption></figcaption></figure>

### Decrypt

To decrypt, send the **`-d`** flag. An example:

```
TransformClient.exe -d "Expelliarmus"
```

And just like that, if the passwords matched, you'll get a decrypted result.&#x20;
