Source tree pruned and flattened.
[clldap.git] / doc / ldap.tex
blob0a322a459022a41718e4c038dd12f1db1c6ea63c
1 \documentclass{article}
2 \usepackage{fullpage}
3 \title{\textsc{net.quadium.ldap}\\LDAP Library User Manual}
4 \author{Tim Howe\\\texttt{vsync@quadium.net}}
5 \newcommand{\ldap}{\texttt{NET.QUADIUM.LDAP}}
6 \newcommand{\function}[1]{\texttt{\textsc{#1}}}
7 \newcommand{\variable}[1]{\texttt{\textsc{#1}}}
8 \begin{document}
9 \maketitle
11 \section{Overview}
12 \label{sec:overview}
14 \ldap{} is a library for interacting with LDAP servers by means of the
15 OpenLDAP command line utilities. It utilizes the
16 \texttt{NET.QUADIUM.LDIF} library to communicate with these utilities.
17 This approach, while perhaps lacking efficiency (although hopefully
18 this can be ameliorated by means of caching and appropriate scoping to
19 avoid redundant operations) has the advantage that it can be easily
20 ported to any environment which can run subprocesses and has the
21 OpenLDAP clients available.
23 \section{Settings}
24 \begin{description}
25 \item[*password-file*] A string designating file containing a password
26 to be used for LDAP authentication.
27 \item[*simple-auth-p*] Whether the LDAP utilities should use simple
28 authentication.
29 \item[*ldapsearch-command*] The command to invoke the ``ldapsearch''
30 utility.
31 \item[*ldapmodify-command*] The command to invoke the ``ldapmodify''
32 utility.
33 \end{description}
35 \section{Filters}
37 \ldap{} has the ability to convert search filters from a very Lispy
38 sexp form into that expected by LDAP.
40 \begin{description}
41 \item[convert-search-filter {\mdseries\itshape filter}]
42 \ \\Returns a filter string created from the FILTER sexp.
44 Example:
45 \begin{verbatim}(convert-search-filter '(and (not (or (= "objectClass" "computer")
46 (= "objectClass" "group")))
47 (= "location" "millenia*")))
49 "(&(!(|(objectClass=computer)(objectClass=group)))(location=millenia*))"
50 \end{verbatim}
51 \end{description}
53 \section{Searching}
55 \begin{description}
56 \item[ldap-search {\mdseries\itshape filter attributes {\ttfamily\slshape\&key} base (scope :sub) (password-file *password-file*) (simple-auth-p *simple-auth-p*)}]
57 \ \\Searches by FILTER and returns matching ATTRIBUTES.
58 FILTER may
59 be a filter string in the form expected by ldap\_search(3), or a
60 sexp which will be converted by CONVERT-SEARCH-FILTER. A null
61 FILTER is equivalent to \texttt{"objectClass=*"}. ATTRIBUTES is a
62 list of strings, each string designating the name of an attribute.
63 If ATTRIBUTES is empty, all attributes of a matching record will be
64 returned.
66 \item[ldap-fetch-by-dn {\mdseries\itshape dn attributes {\ttfamily\slshape\&key} base (password-file *password-file*) (simple-auth-p *simple-auth-p*)}]
67 \ \\Fetches the object designated by the distinguished name DN.
68 ATTRIBUTES are handled as by LDAP-SEARCH.
69 \end{description}
71 \section{Modifying}
73 \begin{description}
74 \item[ldap-modify {\mdseries\itshape change-records {\ttfamily\slshape\&key} (password-file *password-file*) (simple-auth-p *simple-auth-p*)}]
75 \ \\Transmits CHANGE-RECORDS to the LDAP server for execution.
77 \end{description}
79 \end{document}