LDAP Query Component

:icons:font :hardbreaks: :imagesdir: ../../../assets/images :toc-title: Contents :toc:

Description

Makes a request to the directory service server using the LDAP protocol.

Table 1. System characteristics

Index

142

Short name

ldap

Script types

All

Start module

r_script_component_ldap

Mode

Asynchronous

Icon

142

Branching type

Branching, closing

Properties

Table 2. Properties
Specification Description

Name: Protocol

Code: proto

Visibility condition: no

Default: LDAP

Protocol for connecting to the server.

Possible options:

  • LDAP (ldap, 0)

  • LDAPS (ldaps, 1)

Name: Server addresses Code: hosts Visibility condition: no

Default: — 

List of directory service server addresses.

As a string, where addresses are separated by any character: comma, semicolon, space, tab, end of line.

Domain names, IP addresses, as well as URIs from which the domain name will be obtained can be specified.

An attempt will be made to establish a connection, searching through all addresses until completion or success.

Name: Port

Code: port

Visibility condition: no

Default: — 

Port for connecting to servers. Default 389 for LDAP, 636 for LDAPS.

Name: Certificate

Code: cert

Visibility condition: no Default: — 

For SSL/TLS connection points, points to the PEM certificate file located in the ':SYNC_DOMAIN' or ':SYNC_COMMON' directory.

The certificate file can be loaded, for example, into the REST-endpoint '/rest/v1/fs/targets/files/certificates/cert.pem' and addressed via ':SYNC_DOMAIN_DATA/files/certificates/cert.pem'.

Used when switching LDAP to TLS, as well as LDAPS.

If not specified, the client connection will check the server certificate for trust using the trusted chains installed in the system.

To refuse verification of the server certificate for trust, specify 'verify_none' in the field.

Name: User domain

Code: domain

Visibility condition: no

Default: — 

Authorization parameter: domain.

For example, Siberia.ttt.

If a domain is specified, then when connecting, the user URI is formed as 'login@domain'. However, not all servers support this format.

If you need to specify the account URI in full format (cn=user,dc=example,dc=com), this string must be entered entirely in the 'Username' field, and the domain must be left empty.

Name: Username

Code: login

Visibility condition: no

Default: — 

Authorization parameter: login.

Can be in full cn=user,dc=example,dc=com format, then the 'User Domain' field should be left blank.

Name: Password

Code: password

Visibility condition: no

Default: — 

Authorization parameter: password.

Name: Timeout, s Code: timeoutSec Visibility condition: no

Default: — 

Timeout for waiting for the operation to complete, in seconds.

Name: Action

Code: actionLdap

Visibility condition: no

Default: Authorize

Options for operations in the directory service. Possible options:

  • Authorize (auth, 0) – Simple check of directory availability and correctness of authorization data.

  • Find (search, 1) – Search the directory service using the specified string and required parameters.

  • Create (add, 2) – Creates an object in the specified directory service domain.

  • Delete (delete, 3) – Deletes an object in the specified directory service domain.

  • Edit (modify, 4) – Creates an object in the specified directory service domain.

  • Change password (modify_pwd, 5) – Change the account password.

  • Change DN (modify_dn, 6) – Change the domain name.

Name: DN Code: dn

Visibility condition: yes

Default: — 

Name of the domain in which the operation is performed. Applies to all actions except Authorize.

For example, ou=AD-TEST,dc=Siberia,dc=ttt

Name: Reach

Code: scope

Visibility condition: yes

Default: Entire branch

Select scope for search operation. Applies to the Find action.

Possible options:

  • Base object (baseobject, 0) – Only inside the object.

  • Level only (siglelevel, 1) – By the specified list level, that is, without recursion.

  • Entire branch (wholesubtree, 2) – Throughout the entire child tree.

Name: Attributes

Code: attributes

Visibility condition: yes

Default: — 

Attributes to search.

Applies to the Find action.

For example, objectGUID,cn,telephoneNumber,mobile. Or *.

Name: Search string

Code: filter

Visibility condition: yes

Default: — 

Search string in the directory service.

Applies to the Find action.

Two formats are supported.

Format 1 - LDAP filter (rfc4515)

Example: (&(objectClass=person)(cn=)(sn=*ur*e)

  • Available functions: (&…​), (|…​), (!(…​)) - logical AND, OR and NOT;

  • Available operations on attribute values: =, ⇐, >=, ~= - coincidence, less than, greater than, approximately equal;

  • Operation for checking the presence of an attribute: =*

  • Available masks in attribute values: *

Format 2 - expression

Example: present("cn") and present("telephoneNumber") and present("objectGUID") and substrings("mobile",5551234)

Available functions: present/1, substrings/2, equalityMatch/2, greaterOrEqual/2, lessOrEqual/2, approxMatch/2, extensibleMatch/2, and/1, or/1, not/1.

Available operations: not, and, andalso, or, orelse, ==, !=, >, >=, <, =<.

Name: Attributes

Code: attrs

Visibility condition: yes

Default: — 

Attributes of the new or modified element.

Applies to the Create and Edit actions.

Name: New password Code: newpwd Visibility condition: yes

Default: — 

New password.

Applies to the Change Password action.

Name: Old password

Code: oldpwd

Visibility condition: yes Default: — 

Old password used to check correctness when changing.

Applies to the Change Password action.

Name: New DN

Code: newdn

Visibility condition: yes

Default: — 

New name for the element. Applies to the Change DN action.

Name: Parent DN

Code: newsupdn

Visibility condition: yes

Default: — 

Parent element.

Applies to the Change DN action.

Name: Result into variable

Code: resultVar

Visibility condition: no

Default: — 

Variable for storing the result of the operation.

Name: Error code into variable

Code: errorVar

Visibility condition: no Default: — 

Variable for storing the error code.

Name: Transition, success

Code: transfer

Visibility condition: no

Default: — 

The component to which control is transferred if the operation completes successfully.

Name: Transition, error Code: transferError Visibility condition: no

Default: — 

Component to which control is transferred in case of an error.

See also