File: ldap-controls.rst

package info (click to toggle)
python-ldap 3.4.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,756 kB
  • sloc: python: 9,558; ansic: 3,052; makefile: 139; sh: 79
file content (225 lines) | stat: -rw-r--r-- 6,239 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
*********************************************************************
:py:mod:`ldap.controls` High-level access to LDAPv3 extended controls
*********************************************************************

.. py:module:: ldap.controls
   :synopsis: High-level access to LDAPv3 extended controls.
.. moduleauthor:: python-ldap project (see https://www.python-ldap.org/)


Variables
=========

.. py:data:: KNOWN_RESPONSE_CONTROLS

   Dictionary mapping the OIDs of known response controls to the accompanying
   :py:class:`ResponseControl` classes. This is used
   by :py:func:`DecodeControlTuples` to automatically decode control values.
   Calling application can also register their custom :py:class:`ResponseControl`
   classes in this dictionary possibly overriding pre-registered classes.


Classes
=======

This module defines the following classes:


.. autoclass:: ldap.controls.RequestControl
   :members:

.. autoclass:: ldap.controls.ResponseControl
   :members:

.. autoclass:: ldap.controls.LDAPControl
   :members:


Functions
=========

This module defines the following functions:


.. autofunction:: ldap.controls.RequestControlTuples

.. autofunction:: ldap.controls.DecodeControlTuples


Sub-modules
===========

Various sub-modules implement specific LDAPv3 extended controls. The classes
therein are derived from the base-classes :py:class:`ldap.controls.RequestControl`,
:py:class:`ldap.controls.ResponseControl` or :py:class:`ldap.controls.LDAPControl`.

Some of them require :py:mod:`pyasn1` and :py:mod:`pyasn1_modules` to be installed:

Usually the names of the method arguments and the class attributes match
the ASN.1 identifiers used in the specification. So looking at the referenced
RFC or Internet-Draft is very helpful to understand the API.


:py:mod:`ldap.controls.simple` Very simple controls
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. py:module:: ldap.controls.simple
   :synopsis: simple request and response controls implemented in pure Python


.. autoclass:: ldap.controls.simple.ValueLessRequestControl
   :members:

.. autoclass:: ldap.controls.simple.OctetStringInteger
   :members:

.. autoclass:: ldap.controls.simple.BooleanControl
   :members:

.. autoclass:: ldap.controls.simple.ManageDSAITControl
   :members:

   .. seealso::

      :rfc:`3296` - Named Subordinate References in Lightweight Directory Access Protocol (LDAP) Directories

.. autoclass:: ldap.controls.simple.RelaxRulesControl
   :members:

   .. seealso::

      `draft-zeilenga-ldap-relax <https://tools.ietf.org/html/draft-zeilenga-ldap-relax>`_

.. autoclass:: ldap.controls.simple.ProxyAuthzControl
   :members:

   .. seealso::

      :rfc:`4370` - Lightweight Directory Access Protocol (LDAP): Proxied Authorization Control

.. autoclass:: ldap.controls.simple.AuthorizationIdentityRequestControl
   :members:

   .. seealso::

      :rfc:`3829` - Lightweight Directory Access Protocol (LDAP): Authorization Identity Request and Response Controls

.. autoclass:: ldap.controls.simple.AuthorizationIdentityResponseControl
   :members:

   .. seealso::

      :rfc:`3829` - Lightweight Directory Access Protocol (LDAP): Authorization Identity Request and Response Controls

.. autoclass:: ldap.controls.simple.GetEffectiveRightsControl
   :members:



:py:mod:`ldap.controls.libldap` Various controls implemented in OpenLDAP libs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


.. py:module:: ldap.controls.libldap
   :synopsis: request and response controls implemented by OpenLDAP libs

This module wraps C functions in OpenLDAP client libs which implement various
request and response controls into Python classes.


.. autoclass:: ldap.controls.libldap.AssertionControl
   :members:

   .. seealso::

      :rfc:`4528` - Lightweight Directory Access Protocol (LDAP) Assertion Control


.. autoclass:: ldap.controls.libldap.MatchedValuesControl
   :members:

   .. seealso::

      :rfc:`3876` - Returning Matched Values with the Lightweight Directory Access Protocol version 3 (LDAPv3)


.. autoclass:: ldap.controls.libldap.SimplePagedResultsControl
   :members:

   .. seealso::

      :rfc:`2696` - LDAP Control Extension for Simple Paged Results Manipulation


:py:mod:`ldap.controls.psearch` LDAP Persistent Search
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. py:module:: ldap.controls.psearch
   :synopsis: request and response controls for LDAP persistent search

This module implements request and response controls for LDAP persistent
search.

.. seealso::

   `draft-ietf-ldapext-psearch <https://tools.ietf.org/html/draft-ietf-ldapext-psearch>`_


.. autoclass:: ldap.controls.psearch.PersistentSearchControl
   :members:

.. autoclass:: ldap.controls.psearch.EntryChangeNotificationControl
   :members:

.. |ASN.1| replace:: Asn1Type

:py:mod:`ldap.controls.sessiontrack` Session tracking control
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. py:module:: ldap.controls.sessiontrack
   :synopsis: request control for session tracking

.. seealso::

   `draft-wahl-ldap-session <https://tools.ietf.org/html/draft-wahl-ldap-session>`_


.. autoclass:: ldap.controls.sessiontrack.SessionTrackingControl
   :members:


:py:mod:`ldap.controls.readentry` Read entry control
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. py:module:: ldap.controls.readentry
   :synopsis: read entryrequest and response controls

.. seealso::

   :rfc:`4527` - Lightweight Directory Access Protocol (LDAP): Read Entry Controls

.. versionchanged:: 4.0
   The attribute values of the entry now consists of `bytes` instead of ISO8859-1 decoded `str`.


.. autoclass:: ldap.controls.readentry.ReadEntryControl
   :members:

.. autoclass:: ldap.controls.readentry.PreReadControl
   :members:

.. autoclass:: ldap.controls.readentry.PostReadControl
   :members:


:py:mod:`ldap.controls.ppolicy` Password Policy Control
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. seealso::
   `draft-behera-ldap-password-policy <https://tools.ietf.org/html/draft-behera-ldap-password-policy>`_

.. py:module:: ldap.controls.ppolicy
   :synopsis: passworld policies

.. autoclass:: ldap.controls.ppolicy.PasswordPolicyControl
   :members: