LDAP Synchronization

Description

This module installs LDAP/Active Directory synchronisation software

Release notes

Version 1.17.5 - Early deployment
  • Improvement: allow passing a constant for caller id (TS-1978)
  • Dependency:
    • System Base >= 1.5.0 if StartTLS is used

Version 1.16.2 - Early deployment
  • Bugfix: When resolving the DN to bind with, properly handle a bind failure (TS-2639)
  • Dependency:
    • System Base >= 1.5.0 if StartTLS is used

Version 1.16.1 - Early deployment
  • Bugfix: ldap.ini was generated incorrectly in 1.16.0
  • Dependency:
    • System Base >= 1.5.0 if StartTLS is used

Version 1.16.0 - Deprecated
  • Feature: Support for Active Directory UPN authentication (PC-1080)
  • Deprecated: ldap.ini incorrectly generated
  • Dependency:
    • System Base >= 1.5.0 if StartTLS is used

Version 1.15.4 - Early deployment
  • Improvement: Adding parameter assign_ddi (PC-1080)
  • Dependency:
    • System Base >= 1.5.0 if StartTLS is used

Version 1.15.3 - Early deployment
  • Bugfix: Don't generate error when no allowed ips are defined (M0)
  • Dependency:
    • System Base >= 1.5.0 if StartTLS is used

Version 1.15.2 - Early deployment
  • Bugfix: Correctly pass UTF-8 through (TS-268)
  • Dependency:
    • System Base >= 1.5.0 if StartTLS is used

Version 1.15.1 - Early deployment
  • Bugfix: Allow other sources to query LDAP (M24156)
  • Dependency:
    • System Base >= 1.5.0 if StartTLS is used

Version 1.15.0 - Early deployment
  • Feature: Retrieve template extensions from LDAP (M21560)
  • Dependency:
    • System Base >= 1.5.0 if StartTLS is used

Version 1.14.1 - Early deployment
  • Bugfix: LDAP synchronization 1.4.0 was not importing DDIs any more (M20763)
  • Dependency:
    • System Base >= 1.5.0 if StartTLS is used

Version 1.14.0 - Deprecated
  • Feature: Expose the definition of LDAP attribute to determine the user role for FUSION 4 (M12721)
  • Feature: Added the ability to define primary and secondary phone (M18517)
  • Deprecated: LDAP synchronization 1.4.0 was not importing DDIs any more (M20763)
  • Dependency:
    • System Base >= 1.5.0 if StartTLS is used

Version 1.13.0 - Early deployment
  • Feature: Support LDAP redundancy in LDAP module (M14430)
  • Dependency:
    • System Base >= 1.5.0 if StartTLS is used

Version 1.12.0 - Early deployment
  • Feature: Added the ability to configure ldap paged size (M12109)
  • Bugfix: Fixed fax number synchronization (M12290)
  • Bugfix: Fixed issue caused by leading and trailing spaces in configuration values (M12197)
  • Dependency:
    • System Base >= 1.5.0 if StartTLS is used

Version 1.10.2 - General deployment
  • Bugfix: accented characters garbled in smp(web), regression since 1.9.3 (M0)

Version 1.10.0 - General deployment
  • Feature: Synchronize the callflow from an ldap attribute (M3299)
  • Improvement: Extend OpenLDAP login option (M4330)
  • Bugfix: Username with underscore was not allowed for authenticating user (M5936)
  • Potential update impact level 2 DONE: in the event this update contains a bug, it might have critical impact. Respect dependencies and retest your most important callflows and applicative integrations.: If the callflow ldap property parameter is set, the callflows of the extensions will be synchronized each time the ldap sync task is executed. Leave the callflow property field empty to retain the old behaviour.

Version 1.9.4 - General deployment
  • Bugfix: in some cases non-ascii characters become ? in smp
  • Limitation: The fax number and the home number are inverted

Version 1.9.3 - General deployment
  • Bugfix: sync user attributes
  • Limitation: The fax number and the home number are inverted

Version 1.9.2 - General deployment
  • Improvement: Added Fax and Home number field to LDAP Synchronization (M0004802)
  • Limitation: The fax number and the home number are inverted

Version 1.9.1 - General deployment
  • Bugfix: avoid windomain prefixed and suffixed at the same time (M0004970)
  • Limitation: Not installable on baseline 2.1.0 with SOP Base 1.4.2 (M0005453)
  • Limitation: The fax number and the home number are inverted

Version 1.8.3 - General deployment
  • Bugfix: Correctly escape unicode characters when creating XML messages (M0004609)
  • Limitation: Not installable on baseline 2.1.0 with SOP Base 1.4.2 (M0005453)

Version 1.8.2 - Deprecated
  • Bugfix: Escape correctly special characters when creating XML messages (M0004609)
  • Deprecated: The fix corrected in M0004609 wasn't complete (M0004609)

Version 1.8.1 - General deployment
  • Bugfix: Imported language not always in lower case (M0004018)
  • Limitation: Not installable on baseline 2.1.0 with SOP Base 1.4.2 (M0005453)

Version 1.8.0 - General deployment
  • Feature: Support for SASL authentication (M0002722)
  • Feature: Added support for baseline 2 (M0003103)
  • Improvement: regexp handling: all parenthesis are matched and concatenated. This allow patterns like telephoneNumber/^32233(?:11(1..)|22(2..))$/_ which matches only 3223311(1..) and 3223322(2..) yielding the 3 last digits in the result.
  • Limitation: Not installable on baseline 2.1.0 with SOP Base 1.4.2 (M0005453)

Version 1.7.0 - General deployment
  • Improvement: regexp handling: all parenthesis are matched and concatenated. This allow patterns like telephoneNumber/^32233(?:11(1..)|22(2..))$/_ which matches only 3223311(1..) and 3223322(2..) yielding the 3 last digits in the result
  • Limitation: Only supported on baseline 1 SOPs.

Version 1.6.0 - General deployment
  • Feature: user defined attributes
  • Limitation: Only supported on baseline 1 SOPs.

Version 1.5.0 - General deployment
  • Feature: Supports cluster.
  • Feature: Added language property.
  • Limitation: Only supported on baseline 1 SOPs.

Version 1.3.0 - General deployment
  • Feature: allows to disable users synchronization.
  • Limitation: Only supported on baseline 1 SOPs.

Version 1.2.0 - General deployment
  • Feature: supports external numbers
  • Limitation: parameters are not backward compatible
  • Limitation: Only supported on baseline 1 SOPs.

Version 1.1.0 - General deployment
  • Improvement: initial version.
  • Limitation: Only supported on baseline 1 SOPs.

Version 0.0.0 - Deprecated
  • Feature: supports cluster (M0)
  • Feature: added language property (M0)
  • Deprecated: Module was rejected by or has not been validated by our quality assurance department. (M5733)

Module configuration interface

create_resource_form: .:/usr/share/escaux/glue/lib:/usr/share/escaux/glue/bin/gen_wiki_documentation/src/lib:/usr/share/escaux/glue/bin/gen_wiki_documentation/src/lib/

LDAP Host
User
Password
Windows domain
Base DN
E.g: dc=mycompany,dc=com
Company domain name
default callflow
E.g. User.Office
Filter
default = (objectClass=user)
Extension
LDAP property/pattern/replacement
E.g. telephoneNumber/^32.....(...)$/1_
DDI(s) number(s)
A second DDI entry can be created with ' & '
LDAP prop/patt/repl[ & prop/patt/repl]
E.g. telephoneNumber/^32(........)$/_ & mobile/^0031(.........)$/+31_
Username
LDAP property/pattern/replacement
E.g. sAMAccountName
E-mail address
LDAP property/pattern/replacement
E.g. mail
Mobile number
LDAP property/pattern/replacement
E.g. mobile/^32(.........)/00_
Sync users
Language
LDAP property
E.g. language
Department
LDAP property/pattern/replacement
E.g. department
Office
LDAP property/pattern/replacement
E.g. physicalDeliveryOfficeName
Home Number
LDAP property/pattern/replacement
E.g. homePhone
Fax Number
LDAP property/pattern/replacement
E.g. facsimileTelephoneNumber
Callflow
LDAP property/pattern/replacement
E.g. callflow/^(.*)\.Office$/1_
SASL Authentication
User Defined Attributes
LDAP property 1, LDAP property 2, ...
E.g. initials,number
Caller ID (Public Number)
LDAP property/pattern/replacement
Eg. mobile
Enable StartTLS
StartTLS root CA certificate
Paged size
LDAP host
(IP address or hostname of backup LDAP server)
Backup Sopkeys
(Comma separated list of sopkeys to use as backup for authentication)
Role
LDAP property/pattern/replacement
Eg. LdapRoleProperty
Primary Phone id
Secondary Phone id
Template extension
Template user
Template DDI
Allowed IPs
(Comma separated list of ip addresses)
Windows bind method

Module configuration parameters

The LDAP module requires several parameters to be configured:

  • LDAP Host: The hostname or IP address of your Active Directory server. Your Active Directory server should be reachable from the Escaux UCS.
  • User: A valid user having read access on Active Directory. See below for more details.
  • Password: the user's password in clear-text
  • Windows domain: the user's domain
  • Base DN: The root node to start the search. Check your LDAP server. This is typically the DN representing your company, possibly including a OU component as well.
  • Company domain name: This is used to suffix the usernames in LDAP to form a username suitable for the SMP. E.g. A user named 'joe' in LDAP may be translated to 'joe@mycompany.com' in the SMP. Make sure to use this feature if you can have different "joe"s on your SMP, located in different SOPs or clusters: 'joe@company1.com', 'joe@company2.com' etc.
  • Default callflow: When records are created in the internal directory, the first time they must be assigned a callflow, e.g. 'User.Office'. Since version 1.10.0 of the module and the SyncLDAP task, this value can also be fetched from the ldap directory. Records that don't have the ldap attribute will use the default callflow defined here.
  • Filter: An LDAP filter to select which users should be read from LDAP. See your LDAP server's documentation for the syntax.
  • The following parameters specify which LDAP attributes should be used to obtain the data.
    • Extension
    • DDIs (previously External Number)
    • Username
    • E-mail address
    • Mobile number
    • Language (MANDATORY): points to an attribute containing the ISO language code, e.g. "en", "nl", "fr"
    • Office
    • Department
    • Callflow : If this parameter is filled in, callflows are always synchronized from LDAP. See more information about this in the Further Information section below.
    • Caller ID : set P_CallerIDNumber of created extension (Template-User) to either a constant ('+32471...' the number of customer's reception for ex.) either a value from 'attr/regexp/repl' mechanism. To use the attribute without replacement, you can't just pass it's name as it will be considered as a constant, so use the workaround 'attribute/(.*)/_'. If Caller ID field left empty -> CallerID = DDI number (the first if ' & ' expression, see below) created for the entry

Optionally, the data can be manipulated in order to, for example, strip or add digits to phone numbers. If only the name of an LDAP attribute is given, no translation is done but if the pattern 'attribute/regexp/replacement' is used, then the value read from LDAP will be matched against a regular expression:

- If it doesn't match, the record is not used.

- If it does match, the part between the parenthesis is taken and put inplace of the underscore in the replacement string.

For example 'telephoneNumber/^32.....(...)$/1_' will read the 'telephoneNumber' attribute, check that it starts well with '32' followed by exactly 8 digits and finally extract the 3 last digits and prefixe them with the number '1'.

You can use several groups '(...)' in the regex. See it as '_' in the replacement part will be substituted by the concatenation of matching groups. Here are some example regarding phone numbers where we can encounter special characters, from which we'll extract the _x_'s :
  • xxxx xxx xxxx (spaces) with "attr/(....) (..) (....)/_"
  • 0 xxxxxxxxxx (extra leading 0) with "attr/0(..........)/_"
  • 32 xxxxxxxxx (without +) with "attr/32(.........)/_"
  • 0 xxx.xx.xx.xx (dot) with "attr/0(...)\.(..)\.(..)\.(..)/_"
  • 0 xxx-xx-xx-xx (hyphen) with "attr/0(...)-(..)-(..)-(..)/_"
  • 0 xxx / xx.xx.xx (slash and dots) with "attr/0(...).(..)\.(..)\.(..)/_"

Maybe the customer has some mix of formats and you want to capture all, but be careful to 'earliest matching logic' applied by perl :
  • WRONG : "telexNumber/(....) (..) (....)|0(..........)|32(.........)|0(...)\.(..)\.(..)\.(..)|0(...)-(..)-(..)-(..)/_"
  • OK : "telexNumber/^0(...)\.(..)\.(..)\.(..)$|^0(...)-(..)-(..)-(..)$|^(....) (..) (....)$|^0(..........)$|^32(.........)$/_"
EXPLANATION : Let, for example, the value of attribute telexNumber be 0471-53-69-98 for an entry. ‘0(..........)’ will capture it first as it finds “10 characters after a ‘0'“, so returning the value ‘471-53-69-'. To solve it place the most 'specific’ matching '0(...)-(..)-(..)-(..)’ first in the chain and mark implicitly the length of match with ^regex$

For DDIs field (>= 1.17.5), the syntax is extended to allow the creation of 2 distinct DDIs entries using the ' & ' separator. For example 'telephoneNumber/^32(........)$/_ & mobile/^32(........)/99_' will lead to the API method list() returning 2 ddis for each LDAP entry (from the 2 distinct attributes telephoneNumber and mobile). It is allowed, in each member of the expression '... & ...', to have composed expressions to capture several patterns, using '|' just like in other fields.
  • Note that, by default, if the above fields are not filled, the extension will be set to the "Phone number" attribute of the active directory user.
  • The First Name and Last Name attributes are always synced from the standard LDAP attributes "givenName" and "sn" respectively, they cannot be manipulated.
  • Sync Users: allows to disable the creation of user accounts in the SMP, i.e. only create extensions and external numbers.
  • SASL Authentication: Do authentication by using SASL (MD5) to prevent passwords from being stored and sent in clear-text.
  • Data encoding (default: utf8): Select the data encoding of the LDAP server. You can set this to latin1 or utf8 (the default).
  • StartTLS: Set to yes to encrypt all connections towards the LDAP server with TLSv1. The connection is initiated with the StartTLS mechanisms described in RFC4511 and RFC4513. Note that the StartTLS root CA certificate parameter is required when this is set to yes. The name of the LDAP host parameter and the name presented in the LDAP server certificate (Subject name or Subject alternative names) must match.
  • StartTLS root CA certificate: The contents of this parameter is required when StartTLS is enabled. It needs to be a PEM formatted certificate (including the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- statements). Make sure that this is the topmost certificate in the certificate chain (aka, the root CA certificate). Your LDAP server should present the whole certificate chain while initiating the connection.
  • Windows bind method: This defines the bind method that is used to authenticate users in active directory. The default is to use the old style DOMAIN_NAME\samAccountName bind method. Optionally it's possible to use UPN authentication which will use the userPrincipalName attribute when binding to active directory.

User field

If the user field does contain the "=" character, it won't be changed. If the user field does not contain the "=" character, it will be modified to allow to bind to OpenLDAP. The prefix cn= will be added (in front of the field's value) and the base DN will be added after the field's value.

For example, if the field contains TestUser and the base DN contains dc=example,dc=com the username used to bind to the LDAP server will be cn=TestUser,dc=example,dc=com

Further Information

After installing this module, you can initiate the LDAP synchonization process by using the SyncLDAP task.

Further information about the LDAP functionality in general can be found in the LDAP Sync admin guide.

Synchronizing callflows

If the callflow parameter is filled in, the callflow will be synchronized at every synchronization. If it is not filled in, the old behaviour is retained. In this case the default callflow be set once at extension creation.

For dynamic profiles, always make sure a default status is properly set for the profile. Regardless of the value synced from ldap, the first apply changes after synchronization, it will push the default status to the SOP. Subsequent synchronizations will leave the profile/status untouched, unless the profile was changed.
Copyright © Escaux SA