Skip to content

Commit e815260

Browse files
committed
- Fix max_down_retries >= 1 issue
- Add clean_on_timeout parameter - Improve debug traces when multiple connections are used
1 parent ccc8666 commit e815260

File tree

3 files changed

+235
-146
lines changed

3 files changed

+235
-146
lines changed

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# LDAP Authentication module for nginx
2+
23
LDAP module for nginx which supports authentication against multiple LDAP servers.
34

45
## Project history
@@ -17,7 +18,9 @@ The reasons for this fork are:
1718
* Added an `encoding` attribute to the binddn_passwd parameter.
1819
* Manage connections waiting a reconnect delay in a specific queue, so that we can
1920
cancel the reconnect delay when a new request ask for an authentication and no free
20-
connection is available.
21+
connection is available, but some are waiting to re-connect.
22+
* Fix the usage of `max_down_retries` parameter
23+
* Add the `clean_on_timeout` option
2124

2225
## How to install
2326

@@ -29,8 +32,7 @@ cd /usr/ports/www/nginx && make config install clean
2932

3033
Check HTTP_AUTH_LDAP options
3134

32-
33-
```
35+
```text
3436
[*] HTTP_AUTH_LDAP 3rd party http_auth_ldap module
3537
```
3638

@@ -225,7 +227,7 @@ Tell to search for full DN in member object.
225227
* Context: `ldap_server` block
226228

227229
Retry count for attempting to reconnect to an LDAP server if it is considered
228-
"DOWN". This may happen if a KEEP-ALIVE connection to an LDAP server times
230+
"DOWN". This may happen if a KEEP-ALIVE connection to an LDAP server times
229231
out or is terminated by the server end after some amount of time.
230232

231233
This can usually help with the following error:
@@ -309,3 +311,12 @@ The delay before reconnection attempts (see <https://nginx.org/en/docs/syntax.ht
309311
* Context: `ldap_server` block
310312

311313
The number of connections to the server use in //
314+
315+
### clean_on_timeout
316+
317+
* Syntax: clean_on_timeout on | off;
318+
* Default: clean_on_timeout off;
319+
* Context: `ldap_server` block
320+
321+
Tell the module to shutdown an re-connect a LDAP server connection after a
322+
send timeout detected (instead of just marking the connection as free again).

config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ if test -n "$ngx_module_link"; then
1313
ngx_module_name=ngx_http_auth_ldap_module
1414
ngx_module_incs=
1515
ngx_module_deps=
16+
ngx_module_order="ngx_http_auth_ldap_module ngx_http_access_module"
1617
ngx_module_srcs="$ngx_addon_dir/ngx_http_auth_ldap_module.c"
1718
ngx_module_libs="$LDAP_REQUIRED_LIBS"
1819
. auto/module

0 commit comments

Comments
 (0)