You can use a custom JSON configuration to set up a custom Active Directory (AD) sync. To do so, follow the instructions below:
Step 1: Activate the Custom Sync Flag in the Database Table
- On your database admin tool (e.g., pgAdmin), open the kv_store table located inside tm_onsite > public.
- Add this key,
ldap_sync_custom
and set its value totrue
.
Step 2: Load the AD Sync Docker Image
- Use SSH to log into your Master VM. For example:
ssh prod@10.52.52.128
- Load the custom sync docker image. For example:
docker load -i tera-adsync.tar.gz
- Restart the server. For example:
sudo systemctl restart teramind
Step 3: Import the Custom Config on Your Teramind Dashboard
- Click the Gear
icon near the top-right corner of the Teramind Dashboard.
- Click Settings
from the pop-up menu.
- Select the Active directory tab on the left sidebar.
- Enter you LDAP SERVER and LDAP PORT,
Select an ENCRYPTION method (e.g., LDAPS, TLS) and specify a LDAP CERTIFICATE VERIFICATION TYPE (e.g., Accept valid),
Enter the LDAP username in the LDAP LOGIN field,
Optionally, enable the UPDATE LDAP PASSWORD checkbox to update your LDAP password. - Enter a valid JSON configuration in the IMPORT CONFIG field,
Alternatively, you can also upload a JSON file by clicking the UPLOAD CONFIG button,
Click the DOWNLOAD CONFIG button to download the current configuration.
i
|
Check out the JSON Configuration Schema below to learn more about the JSON format. |
- Click the SAVE SETTINGS button to save any changes,
Click the IMPORT button to start the import and sync process,
Click the DOWNLOAD LOG button to download the import log. - You will be able to see the import log near the bottom of the screen.
JSON Configuration Schema
Sample Schema
{ "schema_version": 1, "schedule_on": ["08:40 PM","1:24 AM"], "logic": [ { "priority": 1, "name": "Sync Agents", "description": "Test AD sync agents audit", "enabled": 1, "type": "simulation", "base_dn": "DC=qa,DC=local", "filter": "(&(objectCategory=person)(name=*)(objectSid=*))", "scope": "sub_tree", "rules": [ { "priority": 1, "name": "Rule 1 ", "description": "Add agents rule", "scope": "initial", "matchers": { "logical_op": "or", "filters": [ { "attribute": "distinguishedName", "operation": "ends_with", "type": "string", "value": "OU=ou1,OU=root1,DC=qa,DC=local", "inverse": 0 } ] }, "actions": [ { "priority": 1, "name": "Action 1”, "description": "Action to enable Monitoring of agents", "type": "monitoring_enable" } ] } ] } ] }
Explanation
schema_version |
Number containing JSON schema version. For example, 1 . |
period_minutes |
Number denoting how often the sync will run. There are two possible values:
Note: you shouldn't use this option with the schedule_on option. |
schedule_on |
Array of strings containing the schedule of sync execution times. The time format is Note: you shouldn't use this option with the period_minutes option. |
logic |
Array of logical objects/blocks. Each block has a set of parameters such as LDAP base, DN and search filters. |
logic.priority |
Number defining the order of execution within the same JSON hierarchy level. For example, 1 . Lower value denotes higher priority and are executed first. |
logic.name |
String containing the name of the logic. For example, "Sync Agents" . |
logic.description |
String containing the description for the logic. For example, "Test AD sync agents audit" . |
logic.logic.type |
String containing the type of import. There are two possible values:
|
logic.base_dn |
String containing the root DN (Distinguished Name). For example, "DC=test,DC=com" . |
logic.filter |
String containing the LDAP search filter to be executed. For example, "(&(objectCategory=person)(name=*)(objectSid=*))" . |
logic.attributes |
String containing the query (and import) values of only the attributes separated by semicolon. For example, "objectSid;thumbnailPhoto" . In order to search for users or computers by objectSid, add "objectSid" to the list of attributes. By default this is done by email or FQDN (fully qualified domain name) respectively. |
logic.scope |
String containing the scope of the search filter. There are three possible values:
|
logic.rules |
Array containing rule objects to be executed against each row returned by the LDAP server. |
logic.rule.priority |
Number defining the order of execution within the same JSON hierarchy level. For example, 1 . Lower value denotes higher priority and are executed first. |
logic.rule.name |
String containing the name of the rule. For example, "Rule 1" . |
logic.rule.description |
String containing the description for the rule. For example, "Add agents rule" . |
logic.rule.scope |
String dictating the scope of the rule. There are two possible values:
|
logic.rule.matchers |
Array containing the matching objects. Defines whether the set of actions is applied to a matched object (row) or the object is skipped |
logic.rule.matchers.logical_op |
String containing matcher filters logical operation. There are two possible values:
|
logic.rule.matchers.filters |
Array containing the matcher filters. |
logic.rule.matchers.filters.attribute |
String containing the filter’s attribute name (exact name). For example, "name" , "distinguishedName" , etc. |
logic.rule.matchers.filters.operation |
String containing the filter’s operation. The following values are supported:
|
logic.rule.matchers.filters.value |
String/Number dictating the value to filter. For example, "OU=ou1,OU=root1,DC=qa,DC=local" or 0 or "" . |
logic.rule.matchers.filters.type |
String dictating the type of value being filtered. There are two possible values:
|
logic.rule.matchers.filters.inverse |
Number specifying if an inverse match should be performed. There are two possible values:
|
logic.rule.actions |
Array containing rule actions that will be taken on a matched object (row). |
logic.rule.action.priority |
Number defining the order of execution within the same JSON hierarchy level. For example, 1 . Lower value denotes higher priority and are executed first. |
logic.rule.acton.name |
String containing the name of the action. For example, "Action 1" . |
logic.rule.action.description |
String containing the description for the action. For example, "Action to enable Monitoring of agents" . |
logic.rule.action.type |
String containing the type of action to perform. There following values are supported:
|
logic.rule.action.target |
Array containing types and values of the action target. |
logic.rule.action.target.type |
String containing the target type. Supported values are:
|
logic.rule.action.target.value |
String containing the value for the target type. The values are different depending on the logic.rule.action.target.type. Here are some examples:
|