Skip to content

LDAP

Note

This article covers the cross-domain identity management with Windows LDAP (aka Role-level authorization synchronization with Windows Active Directory using LDAP)

The sync process will select the users to be sync'd based on a list of LDAP queries that returns groups from the AD tree. Our suggestion is to create a Windows Group called "Sequel Application Users" and include all users to be sync'd in this group. However, it is possible to define custom LDAP queries and also multiple queries.

While being an expert on (https://ldap.com/) is not required; we highly recommend to be familiar with LDAP and understand properly how the AD tree is defined in the catalogue we want to sync from. Some basic concepts are important as: DNs, CN and basic query filters on groups.

Architecture

Below diagram describes how the solution integrates with the Sequel's Security Architecture and the AD server.

role-level-auth-architecture

The three services (not servers) involved in this solution are:

  • A Windows Active Directory (AD). Supporting LDAP.
  • A "Sequel Security AD Sync" Windows Service (sync service).
  • A Sequel's Security API Service (Security API).

The sync service periodically executes a "sync process", this process in requests information of groups and users, based on customized LDAP queries against the AD. This information is translated to an intermediate contract LdapUser that represents a user with some key attributes retrieved from AD, like name or groups that user is member of. The sync service will request the creation/update of this user to the Security API. This request will determine if this is a new user or an existing one, it will calculate the memberships for this user based on the information and it will apply the changes to the user. All actions during the process are audited in the Security API, and error logged to core logging repository (central logging repository used by Sequel Apps).

This solution is an ETL (extract, transform, load) where sync service is responsible of extracting data from AD using LDAP; and Security API is responsible of transforming and loading the data.

On premise deployment

The typical deployment of this feature is on a full on-premise installation where Windows AD and Sequel's products are installed on the customer's premises. Below diagram displays this topology, also in this sample authentication is configured using Windows.

role-level-auth-architecture-on-premise.png

Hybrid deployment

For cloud deployments, when Windows AD is at customer's premises is still possible to get this synchronization working, the conceptual architecture is described below:

role-level-auth-architecture-hybrid.png

  1. A VPN is required to connect the LDAP Sync Service with Windows AD
  2. LDAP Sync Service is running hosted in the cloud and performs synchronization, allowing creating and maintenance of users and groups. This is required for Authorization purposes.
  3. Authentication in this sample is done with Azure AD. The customer is responsible of synchronizing their Azure AD tenant with their Windows AD. We can assume this as a normal practice for all customers moving their authentication to Azure AD.

Terminology

Sync Process

Each execution performed to synchronize the Sequel's Security information from an Active Directory.

Each sync process contains below information:

  • Basic details: Unique Id, and when the process was started, completed or cancelled.
  • Audit information: traces about how the process is behaving during the different phases of the extract, transform and load.
  • Users to sync: list of users detected in the AD and the raw information collected and used to match and sync in the Sequel security service.

The sync process contains several models for configuring, executing and tracing the process; that we will be described in this document. As a first summary, all domain model for the sync process is included in the below class diagram:

role-level-auth-class-diagram

Above models are domain model, and they are not representing the database models.

MembershipSet

Understanding what is and how works MembershipSet is recommended.

Configuration

Membership management

MembershipSet can be configured from the Security API and from Administration UI at the Membership Set section. More info at MembershipSet management section.

Sync Configuration

LdapSyncConfiguration resource in API

The sync configuration is managed by Security API service, and is available at LdapSync\Configuration resource (protected by LdapSyncConfiguration securable). This configuration is stored in [authorization].[LdapSyncConfiguration] table in the security database.

role-level-auth-swagger-configuration

If there is not a configuration stored in the system; the GET endpoint returns a default configuration. If PUT is requested and there is not a configuration stored; then a new configuration is stored in the system. If there is already a configuration stored; this configuration is updated.

This resource is used by the Administration UI for configuring the sync process, al settings are described in the next section.

Configuring from UI

The configuration can be managed from the Admin UI as well from the System Configuration in the section Role-level Authorization sync with Active Directory.

role-level-auth-admin-home

Clicking on this option we will be able to configure the settings displayed above in below screen:

role-level-auth-mocks-configuration

A LdapSyncConfiguration object contains below properties:

Property Type Description
Enabled boolean Determines when the sync is enabled or not. By default is true. However, if the sync service is not enabled and active the sync will not work.
GroupQueries List of GroupQuery. List of LDAP queries to retrieve the DN groups involved in the sync process. The Vanilla configuration contains a single entry with below LDAP query (&(cn=Sequel Application Users)). So, by default all users assigned to the group Sequel Application Users will be sync'd. If there are no groups queries, the process will be cancelled.
PageSize int Queries executed are paged using this setting as the page size. Default value is 1000. This value should be lower or equal than the maximum number of objects returned by a single query in the AD server.
PollingMinutes int Polling frequency in minutes. By default 60 minutes. If changed and the service is already running this value will not be reflected until the next process execution.
ProcessAuditRetention int Maximum number of process audited retained in the system. By default value is 20. When a process is completed, the housekeeping process is executed deleting the oldest entries and keeping just ProcessAuditRetention process in the audit tables.
Domain string Defines the domain assigned to the sync'd users. This domain will be stored in the user record. This setting is quite important as the user will be authenticated using {domain}{ssoUserName}.
SearchBaseQuery string The base distinguished name to search from. Empty by default.
SyncBatchSize int Number of users to include in each batch sent to sync. By default 20.
UserMapping LdapUserMapping Mapping definition for SsoUsername, Username, FirstName and LastName.
UserQuery string LDAP query to retrieve users. If empty/null, then the default query is used: (&(memberOf={groupDn})), where {groupDn} is a token to be replaced with a DN group. If this query is customized, the token need to be present.

The GroupQuery object contains a single property called Query (string) that contains a LDAP query for retrieving group information. The Vanilla configuration contains a single entry with below LDAP query:

(&(cn=Sequel Application Users))

So, by default all users assigned to the group Sequel Application Users will be sync'd.

The SearchBaseQuery indicates a base domain to be used in the queries. This value must be set if request are done against the global catalog. The value should contain DC entries: if your base domain is office.local, the SearchBaseQuery should be DC=office,DC=local.

The approach followed to configure the LDAP queries reduces highly the risk of a LDAP injection, also this configuration can be done by security admin users so the risk is even lower. However, we recommend to use a service account for accessing Windows AD with read only permissions.

role-level-auth-mocks-configuration-query

The UserMapping object contains a few properties to define the mappings; Maybe the most important are SsoUsername and Username that must be assigned to SamAccountName or UserPrincipalName; in order to identify the user and define how to map the user. The SsoUsername identifies the user in the AD.

role-level-auth-mocks-configuration-mapping

Info

This configuration cannot be exported currently.

Monitoring

At monitoring page, we can review the list of recent sync process executed and its state. By expanding a process, you will be able to check the audit log and the synchronized users.

The monitoring will automatically refresh the information every 10 seconds when the user is in the Monitoring page.

role-level-auth-mocks-monitoring

At the audit tab, all steps of the process are logged and some of them provide more details about the process. If any step contains errors, the step indicates this state and provide details about the problem.

The users tab offers information about the users detected in the sync process and the status of synchronization: created, updated, not-changed,...

role-level-auth-mocks-monitoring-users

Clicking on the user icon of each row, the information collected from AD is presented.

role-level-auth-mocks-monitoring-users-details

Related API endpoints for retrieving information for this screen are:

  • GET LdaPSync\Process: returns all process registered by the system.
  • GET LdapSync\Process\{syncProcessId}\Audit: returns all audit entries for sync process syncProcessId ordered by AuditAt field.
  • GET LdapSync\Process\{syncProcessId}\Users: returns all LdapSyncUser entries for sync process syncProcessId ordered by AuditAt field. This model contains the LdapUser information and some control properties (when was requested the synchronization, the synchronization was completed, has created a new user, has updated an existing user,...).

Force a manual sync

Also, from this screen a new manual sync can be forced. Clicking on the "Synchronize" button, a request to API to POST LdapSync\Process\ is sent and the sync process is manually triggered. This functionality requires the service bus; as the process is triggered asynchronously.

role-level-auth-mocks-monitoring-sync

Extract: The Sync Service

Sync service is a .net core application that can be executed as a console application and also hosted as a Windows Service; and it is responsible of querying the AD server for getting the affected users and push these information to the Security API for reflecting the changes in the Sequel's security schema.

sequel-ladp-sync-windows-service

The sync service (sequel-security-sync-ldap.exe) executes the extract process:

  • after being started (startup).
  • after a scheduled time (polling): scheduled by default to be executed each hour. This value can be customized. The configuration is refreshed from the SecurityAPI during the startup and in each polling/execution.
  • a manual request (manually-forced): the process can be manually triggered from the Admin UI (also from Security API). For using this functionality is required to configure the message bus settings to the sync service. A manual request refreshes the configuration and restarts the polling.

Dependencies

The sync service has dependencies with:

  • Windows AD - LDAP server. (LdapConnection)
  • Sequel's Authentication Service
  • Sequel's Security API.
  • Message Bus. (MessageBusSettings)
  • Sequel's Logging repository. (LoggingSettings)

Process description

The extract part of the sync process is described with below activity and sequence diagrams.

Activity diagram

role-level-auth-architecture-activity-diagram

Sequence diagram

role-level-auth-sequence-diagram-extract

Starting the process

The process start because the service was started, it was scheduled or a message was received in the bus (Sequel.Security.MessageBus.Contracts.LdapSync.v1.RunProcess). If a request is received during the execution of the process, this request is ignored by the system, sending a Cancel message to the API.

Once started, the extract process is divided in four steps: initialize, detect groups, detect users and push users.

Note

at startup, if there are more than one messages pending to be consumed, those will be cleared and only one synchronization will be run.

Step 1. Initialize process

At this step the process is initialized:

  • a unique identifier for the process is generated. The ID will be generated as YYYYMMDDhhmmss-MachineName.
  • and, configuration is retrieved from the Security API service. As part of this request, the process is registered in the Security Service.

For starting the process, the sync service will call to POST LdapSync\Process\{SyncProcessId}. This endpoint will create entries on the [authorization].[LdapAudit] table. Once received the response, the sync service requests the current configuration and applies it to perform the process. The polling time can be affected with the refresh of the configuration.

If the sync process is disabled in configuration; the request to create a new one will return bad request; and the sync process will send a request for cancelling the process.

Always, the latest configuration will be requested and applied; even if the process is cancelled. So, the next execution is configured with the latest configuration (waiting time)

Step 2. Detect groups to sync

In this phase the groups to be sync'd are detected. The configuration process contains a list of LDAP queries to retrieve the DN of the groups that in the next phase will be used to retrieve the users to be sync'd. A sample query for retrieving groups will look like:

(&(cn=Sequel Application Users))

(&(cn=*Underwriters*))

The configuration contains a list of queries for retrieving DN of groups. All those queries have to be executed. Once all queries have been executed, this has to be notified to the security API calling to POST LdapSync\Process\{SyncProcessId}\Audit where the body contains below contract:

[
    {
        "Level" : "Error" | "Information" | "Warning",
        "Type"  : "DetectGroups" | "DetectUsers" | "PushUsers",
        "Message" : "Brief message describing the error/action",
        "Details" : "Details related to the error/action: query executed, parameters passed,...",
    },
    {
        "Level" : "Error",
        "Type"  : "DetectGroups",
        "Message" : "Error executing query X",
        "Details" : "Error message received when the query was executed"
    },
    {
        "Level" : "Information",
        "Type"  : "DetectGroups",
        "Message" : "Executed query X",
        "Details" : "Found n groups."
    }
]

The DNs retrieved from the queries will be stored by the process in memory managing below requirements:

  • Groups members of other groups are not processed. Inheritance of groups is not supported.
  • List of groups cannot contain duplicated groups to avoid duplicated request in the next steps.

Step 3. Detect users

With the list of DN groups from the previous phase; we will detect the users to be sync'd. The query for retrieving users is defined in the UserQuery property of the configuration; using the default one or the custom one. The query will be validated ensuring the query contains the token {groupDn} . As this token is replaced with the DN groups detected in the previous phase.

The list of attributes requested in this query to AD are:

Attribute Description
CN Common Name. Maps to ‘Name’ in the LDAP provider. CN is a mandatory property. See also SamAccountName.
DN Distinguished Name. A DN is a sequence of relative distinguished names (RDN) connected by commas. DN is simply the most important LDAP attribute.
DisplayName Display name
GivenName First name
Initials Initials
Mail User's email
Name Exactly the same as CN.
SamAccountName The old NT 4.0 logon name
SN Last name or surname.
UserAccountControl Used to disable an account. A value of 514 disables the account, while 512 makes the account ready for logon. More info https://support.microsoft.com/en-us/help/305144/how-to-use-useraccountcontrol-to-manipulate-user-account-properties
UserPrincipalName Often abbreviated to UPN, and looks like an email address. Note UPN must be unique in the AD.
MemberOf List of groups where user is member. Groups are described in DN format

The user information stored in memory uses the LdapUser model contract used in POST LdapSync\Process\{SyncProcessId}\Users for pushing changes to API. This information is stored in the database for tracing purposes as well at [authorization].[LdapSyncUser] .

Similar to the previous step, this process needs to notify to security API about the current state calling to the same endpoint POST LdapSync\Process\{SyncProcessId}\Audit where the body contains below contract:

[
    {
        "Level" : "Error" | "Information" | "Warning",
        "Type"  : "DetectGroups" | "DetectUsers" | "PushUsers",
        "Message" : "Brief message describing the error/action",
        "Details" : "Details related to the error/action: query executed, parameters passed,...",
    },
    {
        "Level" : "Error",
        "Type"  : "DetectUsers",
        "Message" : "Error executing query for group DN",
        "Details" : "Error message received when the query was executed"
    },
    {
        "Level" : "Information",
        "Type"  : "DetectUsers",
        "Message" : "Detected users for group DN",
        "Details" : "Found n users."
    }
]

The aggregated list of users detected cannot contain duplicated entries, so we can ensure we will not request duplicated syncs for a given user.

Step 4. Push users to Security API

At this step, the process is managing a list of users to be sync'd. Following the indications of the configuration, the process creates batches of users and post them to POST LdapSync\Process\{SyncProcessId}\Users, using below contract in the body:

Attribute Type Data Type Description
SyncProcessId url section string Unique identifier of the sync process
BatchSeqNumber body int Sequence number of the batch
TotalUsers body int Total number of users to sync in this process
TotalUsersInBatch body int Total number of users in this batch. This must be the same value than users.Count
FromUserNumber body int Position of the first user included in this batch in the complete list of users to sync.
ToUserNumber body int Position of the last user included in this batch in the complete list of users to sync.
Users body LdapUser[] List of LdapUser to sync

Completing the process

When the process is completed, this is notified to the API calling to PATCH LdapSync\Process\{SyncProcessId}\Complete.

In general, only unhandled errors will force to stop the process. In this case, errors are logged to the Sequel.Core.Logging repository; and cancellation will be notified to the Security API (if possible) PATCH LdapSync\Process\{SyncProcessId}\Cancel, including the reason: the error message of the unhandled exception.

Infrastructure settings

All infrastructure dependencies are reflected in the appsettings.json file located at the LDAP service installation folder (e.g.: C:\Security\sequel-security-ldap-sync). For further information, see also AD Sync Registration.

{
  "LdapConnection": {
      "Host" : "host-name (string)",
      "Port" : 3268,
      "SecureConnection": true,
      "DN" : "dn username",
      "Password" : "password encrypted"
  },
  "SecurityConnection": {
    "ClientId" : "sec.ldapsync",
    "ClientSecret" : "secret",
  },
  "ServiceDiscoverySettings": {
    "Mode": "PointToPoint",
    "RequiredServices": {
      "SecurityApi": {
        "InternalUrl": "<INTERNAL-URL>",
        "ExternalUrl": "<EXTERNAL-URL>"
      },
      "Authentication": {
        "InternalUrl": "<INTERNAL-URL>",
        "ExternalUrl": "<EXTERNAL-URL>"
      }
    }
  },
  "MessageBusSettings": {
    "Application": "SecurityLdapSync",
    "Instance": "{machine-name}",
    "RabbitMqSettings": {
      "Password": "pwd-encrypted",
      "ServerUri": "rabbitmq://sbsmpormqsmt.office.sbs/SuppAppTests",
      "UserName": "security",
      "PurgeOnStartup": true,
      "Timeout": "0.00:45:00.0000",
      "BindMessageExchanges": true
    },
    "Consumers": [
      {
        "ConsumerType": "Sequel.Security.Tools.LdapSync.Application.Consumers.RunProcessConsumer, Sequel.Security.Tools.LdapSync.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
        "MessageType": "Sequel.Security.MessageBus.Contracts.LdapSync.v1.RunProcess, Sequel.Security.MessageBus.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
        "QueueName": "LdapSyncRunProcess",
        "QueuePerInstance": false
      }
    ]
  },
  "LoggingSettings": {
    "MsSqlLoggingSettings": {
      "LoggingEnabled": true,
      "ConnectionString": "sql-connection-string",
      "IgnoredLogTypes": [],
      "MinimumLogLevel": "Debug"
    },
    "RollingFileLoggingSettings": {
      "LoggingEnabled": true,
      "PathFormat": "C:\\Temp\\log-{Date}.txt",
      "PropertiesTemplate": "{Message}{MessageTemplate}{TimeStamp}{Level}{Exception}{Properties}{LogEvent}{ErrorGuid}{TraceGuid}{SystemName}{ExecutionTime}{MachineName}{LogType}{UserName}",
      "PropertyFormat": "{{PropertyName}:{PropertyValue}}{Tab}",
      "IgnoredLogTypes": [],
      "MinimumLogLevel": "Debug"
    }
  }
}

LdapConnection

Parameter Type Description
Host string A host name or a dotted string representing the IP address of a host running an LDAP server. It may also contain a list of host names, space-delimited. Each host name can include a trailing colon and port number
Port integer The TCP or UDP port number to connect to or contact. The default LDAP port is 389 and LDAPS is 636 (enabled if SecureConnection is true). The port parameter is ignored for any host name which includes a colon and port number.
Port 3268. This port is used for queries specifically targeted for the global catalog. LDAP requests sent to port 3268 can be used to search for objects in the entire forest. However, only the attributes marked for replication to the global catalog can be returned. For example, a user’s department could not be returned using port 3268 since this attribute is not replicated to the global catalog.
Port 636. Port for LDAPS.
Port 389. Cannot be used as this port doesn't support the type of queries we are using.
SecureConnection boolean If the value is true, then uses TLS for the connection to LDAP (LDAPS). By default, is set to false.
DN string If non-null and non-empty, specifies that the connection and all operations through it should be authenticated with DN as the distinguished name. We highly recommend to use a service account or user with only read permissions on Windows AD.
Password string / encrypted If non-null and non-empty, specifies that the connection and all operations through it should be authenticated with DN as the distinguished name and this argument as password. This value is encrypted in the appsettings file.

SecurityConnection

Contains information for authenticating and connecting to the Security API, following the standard defined in other components of security services

Parameters Type Description
ClientId string Client id for this application: sec.ldapsync. The client requires access to sec.api scope
ClientSecret string / encrypted Secret for the client.

MessageBusSettings

Defined following schema provided by Sequel.Core.MessageBus, and configured with a single consumer Sequel.Security.Tools.LdapSync.Application.Consumers.RunProcessConsumer , for the contract Sequel.Security.MessageBus.Contracts.LdapSync.v1.RunProcess. The API publishes this message with a time to live of 5 minutes by default.

LoggingSettings

Defined following schema provided by Sequel.Core.Logging.

Transform: MembershipSet

When a request is received to POST LdapSync\Process\{SyncProcessId}\Users, two main actions occurs:

  • Transform a LdapUser to a Sequel's users.
  • Load User (upsert).

In this section, we will cover the transformation logic.

Transformation logic

The transformation logic is function that transforms a LdapUser into a Sequel's User. We have to differentiate two types of information.

Basic information

Including information as username, first name, last name or email address. This mapping is defined with default settings, and some of them can be customized. Below table describes the available fields and the default mappings:

Properties in LdapUser object Mapped Properties in Sequel's User object
CN -
DN -
DisplayName -
GivenName Yes FirstName
Initials -
Mail Yes EmailAddress
Name -
SamAccountName Yes SsoUsername
SN Yes LastName
UserAccountControl Yes IsActive (If UserAccountControl is disabled)
UserPrincipalName Yes Username
MemberOf Yes Membership using MembershipSets

The mapping for SsoUsername is quite important; as this will allow the user to SSO using Windows Authentication. But to complete the login, SsoDomain must be defined in the configuration (using UI) so both ${SsoDomain}\${SsoUsername} will form the valid username for the Authentication.

Note

SsoDomain is populated automatically by the LDAP Synchronization

The configuration for mappings (SamAccountName and UserPrincipalName) can be done from the Ldap Configuration API endpoint and associated UI (card "User mappings").

Membership information

The memberships translation logic is convered with details at membership set management section.

Load: The Security API Endpoint

The transformation and load parts of this ETL sync process are managed in the Security API; including configuration and monitoring functionalities; all defined under the LdapSync resource.

role-level-auth-swagger-ldapSyncResource

The creation of a new sync process will always audit the request; when the sync is disabled the response will be a BAD REQUEST with a validation error in the body indicating the sync process is disabled.

Process endpoints

GET /Process

Returns all process audited by the system.

POST /Process

Publishes a message in the bus that will be consumed by Sync Service and then the service will start the sync process.

GET /Process/{syncProcessId}

Returns information for syncProcessId

POST /Process/{syncProcessId}

Registers the start of a new sync process. This will record information in the sync audit tables a new entry of type Started.

DELETE /Process/{syncProcessId}

Delete all audit information for process syncProcess (auditing and user information).

PATCH /Process/{syncProcessId}/Complete

Completes the process. The underlying action is adding a new entry in Audit with the type Completed. If all process is successfully completed without errors, the detection of deleted users is executed. The audit retention policy is applied here.

PATCH /Process/{syncProcessId}/Cancel

Completes the process. The underlying action is adding a new entry in Audit with the type Cancelled. The audit retention policy is applied here.

Sync users

Users are stored in the Sequel's AuthZ schema when receiving a request in POST LdapSync\Process\{SyncProcessId}\Users. The logic for this save is described below:

role-level-auth-sequence-diagram-load-ldapSyncUsers

A few rules applies to this process:

  • All request are included in the LdapAudit when starting and when completing.
  • All LdapUsers included in the request are stored in the LdapSyncUser table; linked to the LdapSyncProcess.
  • All LdapUsers have to be processed. If one of them fails, the information is logged and audited; and the process carries on with the next one.
  • Users contains a flag to indicate if LDAP Sync is enabled (LdapSyncEnabled bit). If false, users are not synchronized. Also, a new field LdapSyncUpdatedAt: nullable datetime updated each time the user is updated due to the sync process.
  • Membership entries contains a flag to indicate when the entry has to be or not included in the synchronization (LdapSyncEnabled). All entries created by the sync process will be flagged as true. Only LdapSyncEnabled entries can be removed during the sync process.
  • Users will be updated only when there are changes: basic details or memberships. When the user is created or changed, the related message bus are expected to be published.
  • Saving/Creating users/memberships should apply the same rules applied to any action done to users/memberships from API.

Deleted users

Once the sync process is completed without errors; the "deleted user detection" will be triggered but only if enabled in configuration. This process will mark as inactive all users with LdapSyncEnabled enabled and were not included in the sync process.

Starting guide

For starting working with the role-level based authentication sync with Active Directory we need:

  • The LDAP Sync service installed and running (see Installation Guide)
  • Role-level based Authentication Sync minimal configuration (see Azure AD AuthN or Azure AD Authentication Registration if necessary). Assuming all default settings are used.
  • At least, the domain for the new users created must be populated.
  • Depending on Active Directory configurations; it could be required to review some LDAP query settings.
  • Membership Sets created and configured in Security; if there are no created Membership Sets created the sync process could create users but they will not have permissions to access.

Appendix

Models

LdapProcess model

Models a Sync Process. Contains below information:

Property Type Description
Id string Unique identifier of the sync process. The preferred format is YYYYMMDDhhmmss-MachineName
StartedAt DateTime When the process was started. In UTC format.
CancelledAt DateTime When the process was cancelled. In UTC format.
CompletedAt DateTime When the process was completed. In UTC format.

Authentication.User model

Changes to user model due to Ldap Sync:

Property Type Description
LdapSyncEnabled boolean Flag indicates if the user can be synchronized by Ldap Sync Process. New users are created with false as default; users created by the Ldap Sync Process are created with true.
LdapSyncUpdatedAt DateTime When the sync process applied changes for last time. In UTC format.

Authentication.Membership model

Changes to membership model due to Ldap Sync:

Property Type Description
LdapSyncEnabled boolean Flag indicates if the user can be synchronized by Ldap Sync Process. New users are created with false as default; users created by the Ldap Sync Process are created with true.

Enabling LDAP Sync on existing installation

If we enable LDAP Sync for an existing installation is important to analyse how this sync will affect to existing users. By default, users are flagged to do not sync with LDAP, just those ones created by the automated sync are created with this flag. There are a few points to bear in mind when LDAP Sync is enabled for an existing Security installation:

  • Existing users could be flagged with LDAP Sync disabled. Review if those existing users need to be synced. If those users are changed to enable sync, membership must be reviewed as described in the next point.
  • Review memberships defined for users with LDAP Sync enabled. In general, users with LDAP sync activated are expected to do not define membership manually (however, there are exceptions where this could be done in purpose).

Performance

Some performance tests have been done to determine the expected execution times. The test has been done in a server, with below specs, where all services of security where installed.

Server Specs
Operating System Version Microsoft Windows Server 2016 Standard
Processors DUAL Intel(R) Xeon(R) CPU E5-2683 v4 @ 2.10GHz
Installed Memory (RAM) 4 GB
Total disk space (Free) 59.51 GB (26.2 GB)

The AD server was in the same private network, and the tests was done against a single group with 445 users; where each membershipset was configured with three entries.

LDAP Sync Process was executed with the default settings.

Scenario 1: All new users

In this test all users were created..

Five executions. Min Max Avg
Total Time 24.4s 32.4s 26.8s
Collect AD 0.4s 0.4s 0.4s
Sync users 24s 32s 26.2s

Scenario 2: Updated 80% users

In this scenario, 80% of users were updated due to changes in the memberships.

Five executions. Min Max Avg
Total Time 22.4s 25.4s 24.4s
Collect AD 0.4s 0.4s 0.4s
Sync users 22s 25s 24s

Scenario 3: Updated 5% users

In this scenario 5% users were updated due to changes in the memberships.

Five executions. Min Max Avg
Total Time 11.4s 19.4s 16.4s
Collect AD 0.4s 0.4s 0.4s
Sync users 11s 19s 16s

Scenario 4: No Changes

In this scenario, the most probably, there were no changes detected and users were not changed.

Five executions. Min Max Avg
Total Time 9.4s 12.4s 10.4s
Collect AD 0.4s 0.4s 0.4s
Sync users 9s 12s 10s

Comparative

performance-metrics