Skip to content

LDAP Testing Task

The LDAP Testing Task defines a test task for LDAP protocol, used for functionality, performance, stability, and custom testing of LDAP.

Main Parameter List

ParameterTypeRequiredLength LimitDescription
targetenumYes-Task Type
Fixed value: LDAP
namestringYes≤400 charsTask Name
Unique identifier for the LDAP task
descriptionstringNo≤800 charsTask Description
Detailed explanation of the task purpose
enabledbooleanYes-Enable Status
true: Enabled (default)
false: Disabled
beforeNamestringNo≤400 charsPredecessor Task
Controls task execution order
serverobjectYes-Server Configuration
LDAP server connection information
testTypeenumYes-Operation Type
ADD: Add entry
MODIFY: Modify entry
DELETE: Delete entry
SEARCH: Search entry
userDefinedbooleanNo-Custom Entry
true: Use custom entry configuration
false: Use predefined configuration (default)
entryDnstringConditional≤4096 charsEntry Distinguished Name
Required when testType is ADD or MODIFY
argumentsmapConditional1-50 itemsEntry Attributes
Required when testType is ADD or MODIFY
Format: attribute: value
searchBasestringConditional≤4096 charsSearch Base
Required when testType is SEARCH
searchFilterstringConditional≤4096 charsSearch Filter
Required when testType is SEARCH
Example: (objectClass=*)
deleteEntrystringConditional≤4096 charsDelete Entry
Required when testType is DELETE

Note

Multiple LDAP interfaces can be orchestrated simultaneously, but only one LDAP task can be enabled for testing at a time.

Complete LDAP configuration example:

yaml
- target: LDAP
  name: Add customized entry
  description: Add user defined person entry
  enabled: true
  server:
    # LDAP server configuration ...
  testType: ADD
  userDefined: true
  entryDn: cn=TestUser
  arguments:
    # Entry parameter configuration ...
  searchBase: cn=TestUser
  searchFilter: cn=TestUser
  deleteEntry: cn=TestUser

Server Configuration (server)

Field NameTypeRequiredLength/Range LimitDefaultDescription
serverstringYes≤253 chars-LDAP Server Address
Supports IPv4/IPv6 addresses or domain names
Example: ldap.example.com
portintegerYes1-65535389Service Port
Standard ports: 389 (plaintext)/636 (SSL)
Enterprise recommendation: Use port 636
usernamestringConditional≤400 chars-Bind DN
Complete DN for authenticated user
Example: cn=admin,dc=example,dc=com
passwordstringConditional≤4096 chars-Bind Credentials
Supports encrypted storage
Enterprise recommendation: Use TLS encrypted transmission
rootDnstringNo≤4096 chars-Base DN
Starting point for search operations
Example: ou=users,dc=example,dc=com

FTP server configuration example:

yaml
server:
  server: 192.168.0.102
  port: 180
  username: "cn=admin,dc=dev-ldap,dc=xcan,dc=work"
  password: admin@mnbv123
  rootDn: "dc=dev-ldap,dc=xcan,dc=work"

Operation Types (testType)

  • Add Entry (ADD)

    • entryDn: Unique distinguished name for the new entry
    • arguments: Key-value pairs of entry attributes
  • Modify Entry (MODIFY)

    • entryDn: Distinguished name of the entry to modify
    • arguments: Key-value pairs of attributes to modify
  • Delete Entry (DELETE)

    • deleteEntry: Distinguished name of the entry to delete
  • Search Entry (SEARCH)

    • searchBase: Starting node for the search
    • searchFilter: Search filter condition

Script Examples (target)

Built-in default person entry information

objectClass: top,person,organizationalPerson,inetOrgPerson
givenname: User
sn: Test
cn: TestUser + unique counter number
uid: user
userpassword: Test

Complete Parameter Configuration Example

yaml
- target: LDAP
  name: Add customized entry
  description: Add user defined person entry
  enabled: true
  server:
    server: 192.168.0.102
    port: 180
    username: "cn=admin,dc=dev-ldap,dc=xcan,dc=work"
    password: admin@mnbv123
    rootDn: "dc=dev-ldap,dc=xcan,dc=work"
  testType: ADD
  userDefined: true
  entryDn: cn=TestUser
  arguments:
    givenname: User
    sn: Test
    cn: TestUser
    uid: user
    userpassword: passd
  searchBase: cn=TestUser
  searchFilter: cn=TestUser
  deleteEntry: cn=TestUser

Add Default Person Entry

yaml
- target: LDAP
  name: Add entry
  description: Add person entry
  enabled: true
  server:
    server: 192.168.0.102
    port: 180
    username: "cn=admin,dc=dev-ldap,dc=xcan,dc=work"
    password: admin@mnbv123
    rootDn: "dc=dev-ldap,dc=xcan,dc=work"
  testType: ADD

Notes

For non-custom tests (userDefined=false), the default person entry information will be automatically deleted after addition.

Add User-Defined Person Entry

yaml
- target: LDAP
  name: Add customized entry
  description: Add user defined person entry
  enabled: true
  server:
    server: 192.168.0.102
    port: 180
    username: "cn=admin,dc=dev-ldap,dc=xcan,dc=work"
    password: admin@mnbv123
    rootDn: "dc=dev-ldap,dc=xcan,dc=work"
  testType: ADD
  userDefined: true
  entryDn: cn=TestUser
  arguments:
    givenname: User
    sn: Test
    cn: TestUser
    uid: user
    userpassword: passd

Modify Default Person Entry

yaml
- target: LDAP
  name: Modify entry
  description: Modify person entry
  enabled: true
  server:
    server: 192.168.0.102
    port: 180
    username: "cn=admin,dc=dev-ldap,dc=xcan,dc=work"
    password: admin@mnbv123
    rootDn: "dc=dev-ldap,dc=xcan,dc=work"
  testType: MODIFY

Notes

For non-custom tests (userDefined=false), the default person entry will be added first before modification, and automatically deleted after completion.

Modify User-Defined Person Entry (Modify Phone Number and Password)

yaml
- target: LDAP
  name: Modify customized entry
  description: Modify user defined person entry
  enabled: true
  server:
    server: 192.168.0.102
    port: 180
    username: "cn=admin,dc=dev-ldap,dc=xcan,dc=work"
    password: admin@mnbv123
    rootDn: "dc=dev-ldap,dc=xcan,dc=work"
  testType: MODIFY
  userDefined: true
  entryDn: cn=TestUser
  arguments:
    mobile: 18910691700
    userpassword: passd2

Search Default Person Entry

yaml
- target: LDAP
  name: Modify entry
  description: Modify person entry
  enabled: true
  server:
    server: 192.168.0.102
    port: 180
    username: "cn=admin,dc=dev-ldap,dc=xcan,dc=work"
    password: admin@mnbv123
    rootDn: "dc=dev-ldap,dc=xcan,dc=work"
  testType: MODIFY

Notes

For non-custom tests (userDefined=false), the default person entry will be added first before searching, and automatically deleted after completion.

Search User-Defined Person Entry

yaml
- target: LDAP
  name: Search customized entry
  description: Search user defined person entry
  enabled: true
  server:
    server: 192.168.0.102
    port: 180
    username: "cn=admin,dc=dev-ldap,dc=xcan,dc=work"
    password: admin@mnbv123
    rootDn: "dc=dev-ldap,dc=xcan,dc=work"
  testType: SEARCH
  userDefined: true
  searchBase: cn=TestUser
  searchFilter: cn=TestUser

Delete Default Person Entry

yaml
- target: LDAP
  name: Delete entry
  description: Delete person entry
  enabled: true
  server:
    server: 192.168.0.102
    port: 180
    username: "cn=admin,dc=dev-ldap,dc=xcan,dc=work"
    password: admin@mnbv123
    rootDn: "dc=dev-ldap,dc=xcan,dc=work"
  testType: DELETE

Notes

For non-custom tests (userDefined=false), the default person entry will be added first before deletion.

Delete User-Defined Person Entry

yaml
- target: LDAP
  name: Delete customized entry
  description: Delete user defined person entry
  enabled: true
  server:
    server: 192.168.0.102
    port: 180
    username: "cn=admin,dc=dev-ldap,dc=xcan,dc=work"
    password: admin@mnbv123
    rootDn: "dc=dev-ldap,dc=xcan,dc=work"
  testType: DELETE
  userDefined: true
  deleteEntry: cn=TestUser

Released under the GPL-3.0 License.