Creating the configuration file
A configuration file is required to sync users from your LDAP directory. It contains details about the FortiDLP Infrastructure and your LDAP server, which enable the LDAP Sync Tool to connect to them.
You must provide this configuration file in YAML format. For ease, we recommend naming the file config.yaml and saving it to the same directory as the LDAP Sync Tool. This will allow you to run commands faster using the default functionality.
Refer to the following tables and example configuration file when creating your configuration file. Required fields and default values are indicated. sync fields are optional and can be used to override the default LDAP filter (&(objectCategory=user)(objectSid=*)), override the default AD attributes detailed in Mapping user attributes, or provide a diff sync configuration.
You can configure the sync tool to perform a full sync or a diff sync:
- Full sync: With this sync method, all users are synced to FortiDLP. To enable a full sync,
diffsync(contained bysync) must be omitted from the configuration file. - Diff sync: With this sync method, only users that have been modified are synced to FortiDLP. To enable a diff sync,
diffsync(contained bysync) must be included in the configuration file.
|
|
The indentation in the example configuration file is mandatory. It is recommended that you use an indentation of two spaces per level and not tabs. In the following tables, a field preceded by an asterisk (*) contains nested fields, and the nested fields are listed directly below the containing field. Also, be mindful of YAML rules for escaping, as described here. |
| Field | Description | ||
|---|---|---|---|
apiurl
|
Required. Your FortiDLP Console URL. | ||
apitoken
|
Required. Your FortiDLP API access token. | ||
archivedeleted
|
The rule to automatically archive directory-deleted users when the directory is synced to FortiDLP.
Default =
|
||
skiptls
|
The TLS verification method for the FortiDLP API, specified as one of the following:
Default =
|
||
maxretries
|
The maximum number of retries that can occur after a failure connecting to the FortiDLP Infrastructure or LDAP server, or syncing users. Default = |
||
photosync
|
The photo syncing method for users' profile pictures in the FortiDLP Console, specified as one of the following:
Default = |
| Field | Description | ||
|---|---|---|---|
*ldap-config |
The configuration details for the LDAP directory to download users from. | ||
name
|
Required. Your LDAP directory name. This will be displayed in the command-line output and logs. | ||
*credentials |
The credentials for your LDAP directory. | ||
addr
|
Required. Your LDAP server's host address. | ||
port
|
Required. Your LDAP server’s port number. | ||
base
|
Required. The Base DN of your LDAP server. | ||
binddn
|
Required. The username configured for LDAP authentication. | ||
bindpassword
|
Required. The password configured for LDAP authentication. | ||
*tlsconfig |
The TLS configuration details determining how the connection between the LDAP Sync Tool and your LDAP server is encrypted. If you do not want to use TLS, omit the |
||
method
|
Required. The TLS encryption method, specified as one of the following:
|
||
skipverification
|
The TLS verification method for your LDAP server, specified as one of the following:
Default =
|
||
rootcabundle
|
The PEM contents of your LDAP server's CA-signed certificate if skipverification is set to false. |
||
*sync |
The optional configuration details for the LDAP directory to download users from if you do not use the default LDAP filter (&(objectCategory=user)(objectSid=*)) or the AD default attributes described in the previous tables. |
||
searchterm
|
The LDAP filter for importing users. | ||
diffsync
|
The method for determining directory changes, allowing only updated users to be synced rather than all users. An
|
||
*keyfields |
The user fields to which attributes are mapped for display in the FortiDLP Console and for identification purposes. See Field mappings for the list of supported fields and associated descriptions. |
||
*schemes |
The schemes to which attributes are mapped for associating events with users. See Scheme mappings for the list of supported schemes and associated descriptions. |
||
*labelfields |
The fields to which attributes are mapped for creating directory labels in the FortiDLP Console. Directory labels are assigned to users and are used to associate users with policy groups and Agent configuration groups. See Label mappings for the list of supported label fields and associated descriptions. |
Configuration file
--- apiurl: <FortiDLP Console URL> apitoken: <FortiDLP Console API access token> skiptls: true maxretries: 5 photosync: false archivedeleted: false ldap-config: name: directory credentials: addr: 192.0.2.108 port: 636 base: OU=admin,DC=example,DC=com binddn: OU=admin,DC=example,DC=com bindpassword: Password123 tlsconfig: method: 0 skipverification: false rootcabundle: <PEM contents of certificate> sync: searchterm: (&(objectCategory=user)(objectSid=*)) diffsync: attribute: uSNChanged type: 1 keyfields: name: displayName email: email image: thumbnailPhoto title: title department: department manager: manager phonenumbermobile: mobile phonenumberoffice: telephoneNumber addresshome: homePostalAddress addressoffice: physicalDeliveryOfficeName schemes: - scheme: sid attribute: objectSid - scheme: unix attribute: uidNumber - scheme: mail attribute: email labelfields: - key: department - key: city - key: country - key: memberOf labelName: Security Group match: "^CN=([^,])+,OU=Security Groups" transform: "$1" anonymise: false flagged: false