Automate CSV Syncs with SFTP

Automate CSV Syncs with SFTP

Info and Prerequisites

Zilla offers the capability to automate the process of syncing data from applications that offer CSV permission reports. The purpose of this feature is to remove manual effort and human error associated with downloading CSV reports from your apps and manually uploading them to Zilla.

Customers interested in this option should consider the following prerequisites;

  1. Can the app automatically generate a CSV report that includes the each user and what role they have on the system.

  2. Can the app automatically transfer that report to an SFTP server?

If the answer is “No” to either of these questions, the app in question is not a good candidate for automation because you will not be able to push the information we need to an SFTP server.

Overview

Customers have 2 options for this automation;

Option 1 (Recommended): Use Zilla’s SFTP server

Option 2: Provide Zilla with an SFTP server

Note: To use automated SFTP, you first need to perform an initial sync by uploading a CSV file and configuring column mappings. Steps to perform a manual CSV Upload can be found here: CSV upload - application data - Zilla-Support - Confluence (atlassian.net)

Option 1: Setup a sync with Zilla’s SFTP Server

Alternatively, you or your application vendors may use Zilla’s SFTP server at sftp.zillasecurity.com.

Zilla SFTP Setup

Step 1

You or your application vendor will need to generate an ssh key pair and will need to provide the public key to Zilla support (Zilla provided SFTP does not support password authentication).

Step 2

Determine your appID. Your SFTP client *MUST* upload the file to a folder that has the same name as the appID as shown in Zilla. Example, if you entered “user_permissions.csv” in the dialog above, then the actual file path will be “<application_id>/user_permissions.csv”

Determining app id for an app instance in Zilla

Step 3

Contact Zilla support at support@zillasecurity.com to request user provisioning. Depending on your requirements, Zilla may provision a user per Zilla app instance, or a user that is global for your tenant. When using a global user, you must upload files to a root folder starting with the app id (see screenshot below for determining the app id).

# global sftp user example sftp tenant@sftp.zillasecurity.com PUT permissions.csv 620009c21a05d00f399bb148/permissions.csv # app specific user example sftp tenant-app1@sftp.zillasecurity.com PUT permissions.csv

 

Zilla App Connector Setup

Step 1

Perform an initial sync in Zilla by uploading a CSV file manually to the application, and configuring column mappings. Zilla will rely on these mapping decisions moving forward.

Step 2

Return to the App settings (gear icon) and check the box for “Use SFTP to automate CSV import”

Step 3

Configure your settings;
Host: SFTP Host URL
Port: 22
File Path: Name of the csv, followed by .csv (example: user_permissions.csv)
Username: <Leave blank>
Password: <Leave blank>

 

Note: For details on scheduling syncs using the Frequency option, see https://zilla.atlassian.net/wiki/spaces/ZILLASUP/pages/2177204225/Scheduling+an+automated+sync.

This document steps through the process of scheduling an automated sync for API and CSV integrations.

Note Automated syncs are not supported for Browser Extension based integrations at this time.

Steps to schedule an automated sync

  1. To configure an automated schedule for an application, go to the application instance’s details page and click on the gear icon beside Sync now in the top right.

     

  2. For the Enabled API Integration or CSV File Upload (SFTP) you will see a Frequency option with On-demand pre selected.

     

  3. Clicking on the Frequency dropdown will reveal the scheduling options.

     

  4. Selecting an option other than On-demand will reveal a Start Sync On field. Click on it to open the date picker from which you can choose the start date for the automated scheduled syncs to begin.

     

  5. The following summarizes how the scheduling works:

    1. On-demand : Choosing this option will ensure that syncs are only executed on-demand. This essentially means you are choosing to take care of executing the sync manually whenever you want. Selecting this option will also clear any previous schedules that you may have set.

    2. Daily : Choosing this option will execute your sync every day during non-business hours beginning on the specified start date. For example, if you chose 02/01/2022 as the start date, then the scheduled sync will be first executed on 1st of February and every day after that.

    3. Weekly : Choosing this option will execute your sync every 7 days during non-business hours beginning on the specified start date and every 7 days after that. For example, if you chose 02/01/2022 as the start date, then the scheduled sync will be first executed on 1st of February and every Tuesday after that.

    4. Monthly : Choosing this option will execute your sync every month during non-business hours beginning on the specified start date For example, if you chose 02/01/2022 as the start date, then the scheduled sync will be first executed on 1st of February and 1st of very month after that.

Note: In case of Monthly, if you choose a start day of the month greater than 28, i.e., 29, 30 or 31, then Zilla will execute the sync on the last day of the month. For example, if you chose 01/29/2022 as the start date, then Zilla will execute the sync on:

01/31/2022 → 02/28/2022 → 03/31/2022 → 04/30/2022 → etc.

6. Fill in the rest of the configuration fields and click Sync Now to execute the sync manually for the first time. This is required to ensure the integration is configured correctly and the scheduled syncs can run.

7. Click Next.

8. Click Close.

 

Option 2: Setup a sync with your SFTP server

SFTP Server Setup

As a customer, you or your application vendors may provide an SFTP server. In this case, uploading files to the server will be handled by you. Should your SFTP server use IP address whitelisting, please make note that Zilla will connect from one of the following public IP address depending on your tenancy.

3.218.251.134 # app.zillasecurity.com 54.154.1.169 # eu.zillasecurity.com 13.54.195.167 # anz.zillasecurity.com 18.169.160.237 # uk.zillasecurity.com

Zilla App Connector Setup

Step 1

Perform an initial sync in Zilla by uploading a CSV file manually to the application, and configuring column mappings. Zilla will rely on these mapping decisions moving forward.

Step 2

Return to the App settings (gear icon) and check the box for “Use SFTP to automate CSV import”

Step 3

Configure your settings as shown in the screenshot below;

 

Host : The address of the SFTP server (eg., sftp.acme.com or 22.195.44.1)

Port : The SFTP port value is typically set to 22. Please choose a different value only if you know the port to be different for your SFTP server.

File Path: Location of the file on the SFTP server. (example: “reports/user_permissions.csv”)
Username: Username on the SFTP server
Password (optional): Password to connect to the SFTP server

Public key - Zilla also has the ability to use public-key/private-key to connect to the SFTP server. Below is the public key used by Zilla to connect to an SFTP server

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDI9oTFHGpVS9XJPzdnQ77BrL7emEML8EvEB0tl/VMoMEX78mFA84Pjb/t+mW8CfDyca0cPXfAuJHAgZyGOOQxiIw4FbPZ7GcfEjJeGb+mFzUYOMarOYyAXKN3Dv0pmIMORV2Fzef0Jep9haSHD5NzE69R247o7pL2SwIMZeQZgDLTiPUzCGguy54FOGx11sK6EbdZwUhywH2G+ZwDuBnwzF/SISlybatNrcgDp5kDlpguclSYPtJnVf9WX3DmTCZNp/Oeklrxu1LImizcBqa2v1/Xmr5SMSOozQSuEcfYqsGm/i+Q+h7aJUPgRkDhOfVGaU8A9jDZTNEP6xBFm3kytooiBbOqI5KzZ7TnXSaJoLahvPR1eXh5Nma76KZdMIoGj59jOn2I7WNC0MVEWmYi/IXLpLW11GDaCMnF1FYt2XdaDwHlu5cRmjvux/0lGhOq+5RjKN01rvQoxgQ5d81eWOk5bkYJbYIxOvHHGD8f1MbYYoMnESsoz2HIvK7sFRpCdHMjfT6k0sBUFM1edZmJqBxxF2lQ+haC22mAO+eJ8KPiK+rAvCJqYdYolUPuyxZ+hrl7UuTuI/WLmozQYgy0lZP6v60v0xI4p7gn8alD1RbpW2IYpp2GcFkYejprTxFLm4CwxcxBQmRKuwBgC2ba/t/8g2X215X8fB380IPsyuQ==