...
Ensure that powershell is up to date and installed on your server (odds are it is). For more info, please refer to this documentation
Ensure that you have Admin access to the Microsoft server containing your domain controller, along with admin access to Zilla.
We require a service account on Active Directory with domain user access that will be used to export user data from AD.
We requirean require an SSH Public/Private RSA Key to be made. To do this:
Run the following command:
Code Block ssh-keygen -b 2048 -t rsa -f '/home/...'
This will generate a public/private key in the filepath that you defined. If you didn’t define a path, it will be stored at
/home/user_name
/.ssh/id_rsa
If you are using Zilla’s sFTP server, you will need to provide the public key to you Zilla Technical Contact. You can also email support@zillasecurity.com to open a ticket and request an sFTP server. Be sure to include the public key file in the request.
take note of the filepath for the private key for later configuration.
You will need to add an on-prem AD Application inside of Zilla. To do this, login to Zilla as an admin, select Add Application, then search for On-Prem AD and add it as an app.
...
If you will be asking another system owner to setup sFTP who doesn’t have admin access to Zilla, ensure that you add them as the technical owner to the application before adding them:
...
request an sFTP server be created by Zilla (recommended) or have your own sFTP server. You can ask your Zilla Technical Resource (Sales Engineer or Customer Success Engineer) or submit a request by emailing support@zillasecurity.com. You must provide us with the public key file for us to create this server. To Access the sFTP Server, you will use the following:
Hostname:
sftp.zillasecurity.com
Username: This is the domain corresponding to your tenant. You can verify this inside of the global settings. It will be the first domain listed under Your Domains. In the tenant within the screenshot below, my sFTP username would be
mp.access-ventures.com
...
c. Password: this is the string value contained in your private SSH key:
...
Info |
---|
Do not include the BEGIN and END OPENSSH PRIVATE KEY headers in the password. It should only be the raw string in between. |
Configuring Active Directory
...
Download the script
onto your domain controllerView file name ADscript_version-R-12.ps1 Open the file in an editor like VS Studio, and define what Organizational Units Zilla Will Pull Accounts from. You will do this by editing the below variable:
$DNs = @("DC=yourdomain,DC=com")
- this variable is used to define what Organizational Units Zilla Will Pull Accounts from. For example, if my OU is zillasecurity.com, then this line would look like this:$DNs = @("DC=zillasecurity,DC=com")
. You can add multiple OUs by comma separating each OU’s domain name. For example, if I had 2 OUs zillasecurity.com and zsec.io, this parameter would look like this:$DNs = @("DC=zsec,DC=io"), @("DC=zillasecurity,DC=com)
There are several parameters affiliated with pushing the generated export to an sFTP server:
$isSftpEnabled = $false
- this determines whether the CSV gets sent to an sFTP server. By default, this is turned off, and you will need to set this to$true
to automate Active Directory.$sftpHost = "sftp.zillasecurity.com"
- this is the hostname of the sFTP server we are sending the CSV to. If you are sending it to an sFTP server hosted by Zilla, then the default value (sftp.zillasecurity.com) can be left. If you are hosting this on your own sFTP server, then change the value to the hostname on your server.$sftpUsername = "<your domain.com>"
- this is the username of the service account that will need to be created on your sFTP server. If you are using Zilla, the value for this will be the domain that is affiliated with your tenant. You can view this inside of Zilla by logging in as an admin, going to the settings on the left hand side panel, and looking at the first domain inside of your internal domains$applicationId = "<application-id>"
- the application ID can be found by navigating to your active directory application inside of Zilla:and copying the string that appears inside of the URL:
$sftpPrivateKeyPath = "<location of your private key>"
- this is the filepath where you have stored your SSH Private Key. Please see the 3rd prerequisite for more details.$Csvfile = "$path\directory.csv"
- you can use this setting to change the name of the CSV file that is generated. You can leave this as is
Once the script is configured, use task scheduler to automate the running of the above script using the service account you’ve created in the Creating a Service Account step. This guide goes through how to accomplish this.
Setup sFTP Server
For Security reason, Zilla recommends that you have Zilla Support create an sFTP server that will store the generated CSVs. You can also host it on-premise; however, this would require you to create an outbound port 22 rule for Zilla to fetch the CSV. The process is outlined in this documentation.
Zilla Configuration
...
Navigate to the application that you created in step 5 in the prerequisites section.
Zilla Configuration
add an on-prem AD Application inside of Zilla. To do this, login to Zilla as an admin, select Add Application, then search for On-Prem AD and add it as an app.
...
Select the gear icon inside of the application:
...
- Upload one of the CSV exports that you generated to Zilla. See this guide on uploading a CSV.
Enable the Accounts & Permissions CSV File Upload section, then toggle on Use sFTP to automate CSV import.
...
Fill out the attributes in the form. Please see this section on guidance for how to fill these out.
If you are using Zilla’s sFTP Server, then the values should be the following:
Host: sftp.zillasecurity.com
Port: 22
Username: your zilla tenant’s domain. See Above for more information
Select Sync Now to kickoff the automated syncs.
...