
LDAP Search
CertifiedSearch LDAP entries and store results
LDAP Search
Search LDAP entries and store results
Queries an LDAP server with a rendered filter and attributes, optionally paging to bypass server result limits. Accepts an optional size cap that truncates results when set and writes the LDIF output to internal storage.
type: io.kestra.plugin.ldap.SearchExamples
Retrieve LDAP entries.
In this example, assuming exactly one entry matches each filter,
the resulting LDIF file (referenced by the task output uri) will contain four entries
in this order (we search twice on the same baseDn):
(dn, description, mail) of {melusine, metatron, melusine, metatron}.
id: ldap_search
namespace: company.team
tasks:
- id: search
type: io.kestra.plugin.ldap.Search
userDn: cn=admin,dc=orga,dc=en
password: "{{ secret('LDAP_PASSWORD') }}"
baseDn: ou=people,dc=orga,dc=en
filter: (|(sn=melusine*)(sn=metatron*))
attributes:
- description
- mail
hostname: 0.0.0.0
port: 15060
Properties
hostname *Requiredstring
Hostname
Hostname for connection.
password *Requiredstring
Password
User password for connection.
port *Requiredintegerstring
Port
A whole number describing the port for connection.
userDn *Requiredstring
User
Username for connection.
attributes array
["*"]Attributes to return
LDAP attributes to fetch; defaults to all user attributes. Special tokens: "+" (operational), "1.1" (none), "0.0" (all except operational, cannot be combined with others).
authMethod string
simplesimplegssapiAuthentication method
Authentication method to use with the LDAP server.
baseDn string
ou=systemBase DN
Search root DN; defaults to ou=system.
filter string
(objectclass=*)Filter
Filter for the search in the LDAP. Must be a complete, syntactically valid LDAP filter expression (RFC 4515); it is parsed and validated before use. Avoid interpolating untrusted, unescaped values into this filter (e.g. via Pebble expressions), as doing so can allow LDAP filter injection (CWE-90).
kdc string
Kerberos key distribution center
Needed for GSSAPI authentication method. If this is not provided, an attempt will be made to determine the appropriate value from the system configuration.
pageSize integerstring
Page size
Enable LDAP paging (RFC2696) and fetch results by chunks of this size; null or <=0 disables paging.
Use this when you want to RETRIEVE ALL matching entries safely, even if there are more than the server limit (often ~1000). The task will perform multiple paged searches until all entries are collected.
- Typical use case: full export / sync of an LDAP tree.
- Consequence: no truncation, but potentially more requests and longer execution time.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
realm string
Realm
Needed for GSSAPI authentication method. If this is not provided, an attempt will be made to determine the appropriate value from the system configuration.
saslAllowedQoP array
["AUTH_CONF","AUTH_INT","AUTH"]AUTHAUTH_INTAUTH_CONFsaslAllowedQoP
Used for GSSAPI authentication method only. The list of allowed qualities of protection that may be used for communication after authentication has completed, ordered from most preferred to least preferred.
By default, the full list is allowed, sorted from the most secure to the least secure: - AUTH_CONF # This ensures that third-party observers will not be able to decipher communication between the client and server (i.e., that the communication will be encrypted). - AUTH_INT # This ensure that the communication cannot be altered in an undetectable manner. - AUTH # Only authentication is to be performed, with no integrity or confidentiality protection for subsequent communication.
sizeLimit integerstring
Size limit
Maximum number of entries to return; truncates results when hit and accepts SIZE_LIMIT_EXCEEDED responses. Leave blank to use the server default.
sslOptions Non-dynamic
SSL Configuration
Configure SSL/LDAPS connection parameters.
io.kestra.core.http.client.configurations.SslOptions
Whether to disable checking of the remote SSL certificate.
Only applies if no trust store is configured. Note: This makes the SSL connection insecure and should only be used for testing. If you are using a self-signed certificate, set up a trust store instead.
sub Non-dynamic
{
"name": "SUB"
}Search scope
LDAP search scope; defaults to SUB (base entry plus all descendants). Options: BASE (base only), ONE (immediate children), SUB, SUBORDINATE_SUBTREE (descendants only).
com.unboundid.ldap.sdk.SearchScope
Outputs
uri string
uriResult file URI
A file that contains zero or more matching queries as LDIF formatted strings.
Metrics
entries.found counter
The total number of LDAP entries found by the search.
search.mean.time timer
The average time taken to complete the LDAP search.