In this article:

The MultiDomain Section

Additional Domain Controllers

Domain or Subdomain Settings

Credentials for Connecting to Directory Service Server

Working with Directory Services

Foresight Analytics Platform gets information about domain security subjects from the domain catalog service or global catalog that must be set up in the computer network. Interaction with the directory service is executed via the LDAP/LDAPS protocol.

If repository login is to be executed via domain/integrated domain authentication, to search and add domain users and/or groups in the security manager set the parameters of comparison between directory service attributes and security subject attributes in Foresight Analytics Platform and specify user credentials to connect to the directory service in the settings.xml file. If required, connect additional controllers for domains or subdomains.

NOTE. Configuration settings in the settings.xml file for the web application and desktop application must match if the same repository is used to work at the same time in Windows OS and Linux OS.

Examples of the settings.xml file for the Active Directory service depending on OS type, on which Foresight Analytics Platform works:

<Configuration>
  <Root>
    <Key Name="PP">
      <BIS>
        <Key Name="System">
          <MultiDomain>
            <Key Name="domain 1 name" aliases="list of alternative name of domain 1" Proto="LDAP" url="ldap[s]://IP address or server domain -address or server domain name:[port]" base="dc=...,dc=..." libldap="libldap-2.4.so.2" liblber="liblber-2.4.so.2">
              <controllers>
                <Key Name="controller 1 name" url="ldap[s]://IP address or server domain name:[port]" />
                <Key Name="controller 2 name" url="ldap[s]://IP address or domain server name:[port]" />
              </controllers>
              <user filter="(&amp;(objectClass=user)(sAMAccountType=805306368))" groupsFilter="(&amp;(member=%1)(objectClass=group)(sAMAccountType=268435456))">
                <Key Name="a0" filter="user" ldap="objectClass"/>
                <Key Name="a1" map_to="DistinguishedName" ldap="distinguishedName" get_full_domain="1"/>
                <Key Name="a2" map_to="Name" ldap="sAMAccountName" make_upn="1"/>
                <Key Name="a3" map_to="Sid" ldap="objectSid"/>
                <Key Name="a4" map_to="DisplayName" ldap="cn"/>
                <Key Name="a5" map_to="Descr" ldap="displayName"/>
                <Key Name="a6" map_to="LookupName" ldap="sAMAccountName"/>
                <Key Name="a7" map_to="LookupName" ldap="userPrincipalName"/>
                <Key Name="a8" map_to="LookupName" ldap="displayName"/>
                <Key Name="a9" map_to="LookupName" ldap="cn"/>
              </user>
              <group filter="(&amp;(objectClass=group)(sAMAccountType=268435456))">
                <Key Name="a0" filter="group" ldap="objectClass"/>
                <Key Name="a1" map_to="DistinguishedName" ldap="distinguishedName" get_full_domain="1"/>
                <Key Name="a2" map_to="Name" ldap="sAMAccountName"/>
                <Key Name="a3" map_to="Sid" ldap="objectSid"/>
                <Key Name="a4" map_to="DisplayName" ldap="cn"/>
                <Key Name="a5" map_to="Descr" ldap="description"/>
                <Key Name="a6" map_to="LookupName" ldap="sAMAccountName"/>
                <Key Name="a7" map_to="LookupName" ldap="description"/>
              </group>
              <credentials realm="" Crs="..." Crsa="..." mechanism="GSSAPI"/>
            </Key>
            <Key Name="subdomain 1 name" aliases="list of alternative names of subdomain 1" url="ldap[s]://IP addressor domain server name:[port]" base="dc=...,dc=...">
              <controllers>
                <Key Name="controller 1 name" url="ldap[s]://IP address or server domain name:[port]" />
                <Key Name="controller 2 name" url="ldap[s]://IP address or domain server name:[port]" />
              </controllers>
              <user filter="(&amp;(objectClass=user)(sAMAccountType=805306368))" groupsFilter="(&amp;(member=%1)(objectClass=group)(sAMAccountType=268435456))">
                ...
              </user>
              <group filter="(&amp;(objectClass=group)(sAMAccountType=268435456))">
                ...
              </group>
              <credentials realm="" Crs="..." Crsa="..." mechanism="GSSAPI"/>
            </Key>
            <Key Name="subdomain 2 name" aliases="list of alternative names of subdomain 2" url="ldap[s]://IP address or domain server name:[port]" base="dc=...,dc=...">
              <controllers>
                <Key Name="controller 1 name" url="ldap[s]://IP address or server domain name:[port]" />
                <Key Name="controller 2 name" url="ldap[s]://IP address or domain server name:[port]" />
              </controllers>
              <user filter="(&amp;(objectClass=user)(sAMAccountType=805306368))" groupsFilter="(&amp;(member=%1)(objectClass=group)(sAMAccountType=268435456))">
                ...
              </user>
              <group filter="(&amp;(objectClass=group)(sAMAccountType=268435456))">
                ...
              </group>
              <credentials realm="" Crs="..." Crsa="..." mechanism="GSSAPI"/>
            </Key>
            <Key Name="domain 2 name" aliases="list of alternative names of domain 2" Proto="LDAP" url="ldap[s]://IP address or server domain name:[port]" base="dc=...,dc=..." libldap="libldap-2.4.so.2" liblber="liblber-2.4.so.2">
              ...
            </Key>
          </MultiDomain>
          <Gssapi libgssapi="libgssapi_krb5.so.2" libkrb5="libkrb5.so.3"/>
        </Key>
      </BIS>
    </Key>
  </Root>
</Configuration>
<Configuration>
  <Root>
    <Key Name="PP">
      <BIS>
        <Key Name="System">
          <MultiDomain>
            <Key Name="domain 1 name" aliases="list of alternative names of domain 1" Proto="LDAP" url="ldap[s]://IP address or server domain name:[port]" base="dc=...,dc=..." libldap="libldap.dll" liblber="libldap.dll">
              <controllers>
                <Key Name="controller 1 name" url="ldap[s]://IP address or server domain name:[port]" />
                <Key Name="controller 2 name" url="ldap[s]://IP address or domain server name:[port]" />
              </controllers>
              <user filter="(&amp;(objectClass=user)(sAMAccountType=805306368))" groupsFilter="(&amp;(member=%1)(objectClass=group)(sAMAccountType=268435456))">
                <Key Name="a0" filter="user" ldap="objectClass"/>
                <Key Name="a1" map_to="DistinguishedName" ldap="distinguishedName" get_full_domain="1"/>
                <Key Name="a2" map_to="Name" ldap="sAMAccountName" make_upn="1"/>
                <Key Name="a3" map_to="Sid" ldap="objectSid"/>
                <Key Name="a4" map_to="DisplayName" ldap="cn"/>
                <Key Name="a5" map_to="Descr" ldap="displayName"/>
                <Key Name="a6" map_to="LookupName" ldap="sAMAccountName"/>
                <Key Name="a7" map_to="LookupName" ldap="userPrincipalName"/>
                <Key Name="a8" map_to="LookupName" ldap="displayName"/>
                <Key Name="a9" map_to="LookupName" ldap="cn"/>
              </user>
              <group filter="(&amp;(objectClass=group)(sAMAccountType=268435456))">
                <Key Name="a0" filter="group" ldap="objectClass"/>
                <Key Name="a1" map_to="DistinguishedName" ldap="distinguishedName" get_full_domain="1"/>
                <Key Name="a2" map_to="Name" ldap="sAMAccountName"/>
                <Key Name="a3" map_to="Sid" ldap="objectSid"/>
                <Key Name="a4" map_to="DisplayName" ldap="cn"/>
                <Key Name="a5" map_to="Descr" ldap="description"/>
                <Key Name="a6" map_to="LookupName" ldap="sAMAccountName"/>
                <Key Name="a7" map_to="LookupName" ldap="description"/>
              </group>
              <credentials realm="" Crs="..." Crsa="..." mechanism="GSSAPI"/>
            </Key>
            <Key Name="subdomain 1 name" aliases="list of alternative names of subdomain 1" url="ldap[s]://IP addressor domain server name:[port]" base="dc=...,dc=...">
              <controllers>
                <Key Name="controller 1 name" url="ldap[s]://IP address or server domain name:[port]" />
                <Key Name="controller 2 name" url="ldap[s]://IP address or domain server name:[port]" />
              </controllers>
              <user filter="(&amp;(objectClass=user)(sAMAccountType=805306368))" groupsFilter="(&amp;(member=%1)(objectClass=group)(sAMAccountType=268435456))">
                ...
              </user>
              <group filter="(&amp;(objectClass=group)(sAMAccountType=268435456))">
                ...
              </group>
              <credentials realm="" Crs="..." Crsa="..." mechanism="GSSAPI"/>
            </Key>
            <Key Name="subdomain 2 name" aliases="list of alternative names of subdomain 2" url="ldap[s]://IP address or domain server name:[port]" base="dc=...,dc=...">
              <controllers>
                <Key Name="controller 1 name" url="ldap[s]://IP address or server domain name:[port]" />
                <Key Name="controller 2 name" url="ldap[s]://IP address or domain server name:[port]" />
              </controllers>
              <user filter="(&amp;(objectClass=user)(sAMAccountType=805306368))" groupsFilter="(&amp;(member=%1)(objectClass=group)(sAMAccountType=268435456))">
                ...
              </user>
              <group filter="(&amp;(objectClass=group)(sAMAccountType=268435456))">
                ...
              </group>
              <credentials realm="" Crs="..." Crsa="..." mechanism="GSSAPI"/>
            </Key>
            <Key Name="domain 2 name" aliases="list of alternative names of domain 2" Proto="LDAP" url="ldap[s]://IP address or domain server name:[port]" base="dc=...,dc=..." libldap="libldap.dll" liblber="libldap.dll">
              ...
            </Key>
          </MultiDomain>
          <Gssapi libgssapi_32="gssapi32.dll" libgssapi_64="gssapi64.dll" libkrb5_32="krb5_32.dll" libkrb5_64="krb5_64.dll"/>
        </Key>
      </BIS>
    </Key>
  </Root>
</Configuration>

The MultiDomain Section

The MultiDomain section contains settings of domains and subdomains. One can connect additional domain controllers for domains and subdomains. Parameters of connection to domains and subdomains are specified in Key child elements.

If user names do not contain domain name, when setting up multi-domain authentication, first, reconnect users in the current repository.

NOTE. Specification of several domains is supported only if built-in authorization is used. If built-in authorization is not used, it is recommended to specify one domain to avoid work issues, for example, on using groups with equal names in different domains.

Features of attributes use in the Key element:

Take into account the following features of working with Active Directory:

<Key Name="DOMAIN" aliases="domain.server.name" Proto="LDAP" url="ldap://domain.server.name" base="dc=domain,dc=server,dc=name" libldap="libldap-2.4.so.2" liblber="liblber-2.4.so.2">
<Key Name="DMN" aliases="domain.server.name;domain" Proto="LDAP" url="ldap://domain.server.name" base="dc=domain,dc=server,dc=name" libldap="libldap-2.4.so.2" liblber="liblber-2.4.so.2">

When setting up access permissions and granting privileges for domain users, take into account the following:

IMPORTANT. Values of the Proto, libldap and liblber attributes are taken into account only in the first specified Key element. The rest of the settings of domains and subdomains should correspond to the same value of the Proto attribute.

NOTE. If global directory port (3268 for ldap, 3269 for ldaps) is set, when selecting users or groups in the Search Users and Groups dialog box, the web application will search for all subjects within the domain and its subdomains, regardless of the specific domain.

NOTE. The attribute can be set only on one of the files: ldap.conf or settings.xml. By default, ldap.conf is contained in the folder: /etc/ldap in Debian-based distributions, /etc/openldap in RedHat-based distributions, and ALT Linux, C:\OpenLDAP in Windows OS.

When a domain user is added in the security manager, the system takes into account the UseUPN parameter from repository connection settings:

Additional Domain Controllers

Additional domain controllers are used as alternative ones if the main domain controller or subdomain are unavailable after three connection attempts. If connection with one controller is interrupted, and another controller becomes active, the active user session is maintained active too.

The list of additional domain controllers is set in the controllers section with the Key elements in the Key parent element, which corresponds to the specified main domain controllers or subdomain. Available attributes of the Key sections:

The example of the controllers section:

<controllers>
  <Key Name="controller 1 name" url="ldap[s]://IP address or server domain name:[port]" />
  <Key Name="controller 2 name" url="ldap[s]://IP address or server domain name:[port]" />
</controllers>

Domain or Subdomain Settings

Each domain or subdomain can contain the user and group sections, in which Key elements are determined.

Features of attributes use in the Key element:

NOTE. If the Name value is used with the make_upn attribute, DistinguishedName should be set with the get_full_domain attribute.

If the map_to attribute is set to Name, and the ldap attribute is set to sAMAccountName, the domain name is always added to the value obtained from LDAP directory: DOMAIN\ATTRVALUE.

NOTE. At least one map_to attribute with the LookupName value should be specified for ldap attribute.

When specifying a name creation method for the Name subject make sure that the following conditions are satisfied for subject names:

Subjects with invalid names are skipped, and one of the following errors is displayed in the log:

If all subjects were skipped, check again settings of the map_to attribute.

Credentials for Connecting to Directory Service Server

Each main domain or subdomain should contain the credentials element with the attributes:

TIP. For safety reasons, it is recommended to use encrypted credentials. If both pairs of attributes Crs/Crsa and username/password are specified, the higher priority is given to the Crs/Crsa attributes.

NOTE. Make sure that the used mechanism is supported by directory service server.

See also:

Settings in settings.xml | Foresight Analytics Platform Authentication