Skip navigation links

Package scriptella.driver.ldap

LDAP Driver for Scriptella.

See: Description

Package scriptella.driver.ldap Description

LDAP Driver for Scriptella.

This driver allows to execute LDIF scripts and search filter queries.

Details of LDIF syntax are described in RFC 2849, LDAP Search Filters are described in RFC 2254

This driver supports ${} syntax for variables substitution

General information

Driver class:scriptella.driver.ldap.Driver
URL:ldap://host:port/dn?attributes?scope?filter?extensions according to RFC 2255
Runtime dependencies:None

Driver Specific Properties

Name Description Required
search.scope Search scope for queries. The value must be one of the: object, onelevel, subtree No, the default value is object.
search.basedn base dn for search. No, the default value is "". Specifiying may be required for searches using connections to the root directory context.
search.timelimit Time limit for queries. No, the default value is 0(wait indefinitely).
search.countlimit Maximum number of entries to be returned by queries. No, the default value is 0(all entries will be returned).
file.maxlength Maximum size in KBs of the external files referenced from LDIFs. No, the default value is 10000 (10MB).
readonly If true, LDIF update statements are logged but not executed. May be helpful for debugging. No, the default value is false.

This driver is JNDI-based and uses com.sun.jndi.ldap.LdapCtxFactory LDAP provider. You may specify additional JNDI settings as connection properties. For a complete list of JNDI properties see LDAP Naming Service Provider for the JNDI

Example

<connection driver="ldap" url="ldap://localhost:389/dc=scriptella" user="cn=root,dc=scriptella" password="secret" >
    search.scope=subtree
    #search.basedn=dc=scriptella
</connection>

<query>
    
     <![CDATA[(&(objectClass=groupOfUniqueNames)(uniqueMember=$dn))]]>
</query>

<script>
#LDIF add entry
#Avoid leading whitespaces because LDIF is a whitespace sensitive format.
dn: ou=people,dc=scriptella
objectClass: organizationalUnit
ou: people
</script>
Register an LDAP connection with subtree scope search mode and perform a search for entries satisfying specified search filter, $ is used for variables/expressions subsitution.

The script element is used to add ou=people,dc=scriptella entry.

Skip navigation links

Copyright © Copyright 2006-2019 The Scriptella Project Team.