The Lightweight Directory Access Protocol (LDAP) is an open, vendor-neutral, industry-standard application protocol for accessing and maintaining distributed directory information services over an Internet Protocol (IP) network.
LDAP integration allows connecting your instance to LDAP or AD server and using it as a source of the user data. It provides the ability to connect to a directory service storing the authentication data, such as usernames, passwords, user home directories used for keeping business and other data, etc. The global objective of the LDAP engine is importing users into the system. And through this, synchronization with various corporate services can be achieved, and one account can be used to authorize in all corporate services, such as email, website, VoIP, and so on.
The RDN (relative distinguished name) is the attribute defining the search directory like this: dc=instance,dc=com
In this client-server infrastructure scheme, the SimpleOne instance has to be a client connecting to the LDAP server.
The system synchronizes with the LDAP server in two ways:
- via the Schedule Jobs (automatic) – scheduled script defining periods of synchronization (for example, every 3 hours). See the Scheduled Script article to learn more.
- via the Autoprovision (triggered by logging in) – when user logs in, the system updates the requested data. Configure this way of synchronization via the user.ldap_autoprovision property.
You can also use third-party authorization services on your instance. See the Single Sign-On article to learn more.
Establishing LDAP connection
To establish the connection between your SimpleOne instance and the LDAP server, complete the following steps:
Additional tools for setting up LDAP connection:
Specifying an LDAP server
To configure an LDAP connection, complete the steps below:
- Navigate to LDAP → LDAP Servers.
- Click New and fill in the fields.
- Click Save to apply changes.
- Copy the current record ID.
LDAP Server form fields
Field | Mandatory | Description |
---|---|---|
Name | Y | Enter the server name. |
Root Directory | N | Enter the RDN of the search directory. Example: |
Active | N | Select this checkbox to make the server active or inactive. |
Username | Y | Specify the username authenticating the LDAP connection. |
Password | N | Specify the server password. |
If the RDN attribute is not specified, then LDAP server will attempt to reach the server root directory during the authorization process. If the user logging in is not authorized to access this directory, the authorization process will be interrupted.
Defining an LDAP URL
Sometimes, customer infrastructure may contain more than one LDAP server, for example, as a standby (reserve) server. In this case, you may need to specify some particular server used for authorization by arranging the URL order. If you have more than one server, create a separate LDAP URL for each of them.
To create a URL, complete the steps below:
- Navigate to LDAP → LDAP URL.
- Click New and fill in the fields.
- Click Save or Save and Exit to apply changes.
LDAP URL form fields
Field | Mandatory | Description |
---|---|---|
URL | Y | Enter the LDAP URL there. Here's an example: |
Active | N | Select this checkbox to make the URL active or inactive. |
Order | N | Specify the order of this URL if there are more than one similar items. In this case, they will be processed in descending order. |
Operational Status | N | State of the LDAP connection. Available options:
|
Server | Y | Specify the appropriate LDAP server. |
LDAP Settings
After configuring an LDAP server and an LDAP URL and performing all necessary customer infrastructure preparations, you are ready to set up an LDAP.
To configure the LDAP, perform the following steps:
- Navigate to LDAP → LDAP Settings.
- Click New and fill in the fields.
- Click Save or Save and Exit to apply changes.
LDAP Definition form fields Specify the LDAP server containing users and groups directory and other information related to LDAP. To configure the server, navigate to System LDAP → LDAP Servers and perform the needed actions. Select the target table that will store data from your LDAP server. For users, select the Users (sys_user) table. The target table specified is used for LDAP auto-provisioning (automatic creation of users in the Users (sys_user) table). This feature can be enabled or disabled by setting the user.ldap_autoprovision property. Enter a filter string to select specific records to import from the OU (organizational unit). For example, this filter specifies the excerpt, as shown below: (&(objectClass=person)(sn=*)(!(objectClass=computer))(!(userAccountControl:1.2.840.113556.1.4.803:=2))(!(userPrincipalName=*.admin@simpleone.ru))) For more information about LDAP filter syntax, refer to the appropriate RFC. Specify the attribute name within the LDAP server for querying the records. Active Directory mostly uses the sAMAccountName attribute. Other LDAP servers tend to use the cn attribute. Note that the Query Field is temporarily not working correctly – our team is working on its logic improvement to make it more efficient and secure. We will inform you about changes in the next releases. Use the Attribute List field to specify (include and limit) the attributes the LDAP query returns. This approach is preferable for large LDAP imports in terms of timing.Field Mandatory Description Name Y Specify the LDAP definition name. The name you enter here becomes a target in the Import Sources record. Active N Select this checkbox to activate the LDAP definition and to allow data import. Relative Distinguished Name (RDN) N Enter the relative distinguished name (RDN) of the subdirectory to search through. Server Y Table Y Filter N Query Field N Attribute List N
If the field remains empty, the system loads all the objects with their attributes that your LDAP server is allowed to read.
You can check the LDAP structure by clicking the Browse LDAP on the corresponding LDAP Server record.
Checking settings
Make sure that the connection is set up by performing the following steps:
- Navigate to LDAP → LDAP Servers.
- Open the record you need.
- Click Test connection. The system will check the first URL connection defined by the order. If the connection is fine, you will see the Successfully connected message.
- Click Test all connections. The system will check all defined connections. If the connections are fine, you will see the All connections are checked message.
If an error is thrown, check LDAP Log records.
LDAP Import
Import all necessary data from your LDAP server to the instance.
To complete the data import using LDAP, you will need to set up the following system elements:
- LDAP Settings – specifies filters for retrieving data from a defined LDAP table.
- Import Source – loads row data for further processing and transformation.
The scheme below illustrates the process of data import from an LDAP server.
See the Importing using LDAP article to learn more.
Example of the integration with AD
The "out-of-the-box" solution contains an example of the connection to the Active Directory (AD) service.
Check out the examples mentioned below before setting up the LDAP import on an instance. The settings of the examples are protected from changes. In the hamburger menu of each record, click Make a copy to copy the example setting and change their values.
The following records are created and configured:
- the Demo_Active_Directory LDAP Server with the LDAP URL example. In your copy, specify the parameters of the server.
the SimpleOneCourses1 and SimpleOneCourses2 LDAP Settings. Use one of these definitions as an example to create a working connection to the AD service.
Field Value Description Filter SimpleOneCourses1(&
(objectClass=person)
(sn=*)
)
SimpleOneCourses2(&
(objectClass=person,top)
(sn=*)
)
The defined filter selects user records with any username to import from the AD service. Query Field sAMAccountName The field that is used for connecting with the AD and querying the records. Attribute List samaccountname,sn,givenname,distinguishedname,msDS-cloudExtensionAttribute6,telephonenumber, mobile,mail,manager,company,useraccountcontrol,thumbnailphoto The attributes the LDAP query returns. - the LDAP Users Import Source. Use one import source for the same LDAP settings.
- the Daily Import SimpleOne Employees and Daily Import SimpleOne Employees 2 scheduled imports. The AD data is imported daily at a specific time. Use one of the imports as an example to create your scheduled import.
- the Daily Deletion of Obsolete Import Sets scheduled script. The script deletes inactive import sets. When an import set is deleted, a cascading deletion occurs for the Import Set column of the Import Set Row table.
To connect and import users from the AD service, complete the following steps:
- Create a local pack in the Simple application for the LDAP import settings.
- Create copies of the records mentioned above and set up the LDAP integration by changing the field values to the required ones.
- Click Test connection in the LDAP Server record. If the connection is established successfully, click Browse LDAP to check the LDAP structure.
- After you checked the structure, go to the LDAP Setting you need and open the related import source.
- (optional) Click Test Load (20 records) to create a test import set.
- Click Load all records.
- Click View Transform Map to create a Transform Map record. The Target Table value should match the value of the Table field in the LDAP Settings record.
- On the Transform Map create Field Maps through the related list. The Login and Email field map records should have the selected Coalesce checkbox. The parameter defines the fields of the target table that will be used to search for the records based on the imported data. If a record is found in the target table, it will be updated. Otherwise, the system creates a new record.
- Go back to the Import Source record and open the Import Set record via the related list.
- Click Transform to import data from the AD service.
- Configure the copy of the Daily Import SimpleOne Employees scheduled import. Add the reference to the created Import Source.
- Configure the copy of the Daily Deletion of Obsolete Import Sets scheduled script and select the Active checkbox. Copy the ID of the Import Source to the import_source_id variable of the script.
LDAP Log
In case the system troughs an error, you can check the log messages to find the cause. In the LDAP Log, you can find records of failed authorization attempts or authorization policy avoidance attempts. In fact, all these messages are written into the Logs (sys_log) table.
To see the LDAP logs, navigate to LDAP → LDAP log.
LDAP Log form fields
Field | Mandatory | Description |
---|---|---|
Source | Y | Displays the source from where this log record comes from (LDAP Authorization or LDAP Autoprovision, as an example). |
Message | N | The log record message text. |
Level | Y | This field specifies the error level. Available options:
|
Username | N | Reference to the user initiated this record creation. |
LDAP System Properties
Some LDAP abilities can be configured on the client-side using the System Properties engine. These properties are listed below.
Property name | Type | Default value | Description |
---|---|---|---|
user.authorization_when_no_ldap_connection | Boolean | true | Enables authorization if there's no LDAP connection. |
user.ldap_authentication | Boolean | true | Enables or disables LDAP authentication. |
user.ldap_autoprovision | Boolean | true | Enables the automatic creation of users in the User table if there is no such record on the instance. |
.
- No labels