Commit Graph

156 Commits

Author SHA1 Message Date
Valery Komarov bf64cf217a Merge pull request #199 from AVENTER-UG/issue_180
Issue 180: wrong ldap dn path to search the group
2020-03-20 16:26:57 +03:00
Valery Komarov f022103e31 Merge pull request #213 from jcu-eresearch/master
Allow compiling on GCC < 5 / CentOS 6 (see #138)
2020-03-20 16:22:00 +03:00
Valery Komarov e2081531c1 Merge pull request #195 from gouzhuang/master
handle NULL search result for group dn
2019-07-05 17:23:12 +03:00
Valery Komarov 81f7e2448c Merge pull request #219 from landryb/check_cache
Check cache for all configured servers for this location (cf #201)
2019-07-05 17:22:44 +03:00
Valery Komarov a33b5c5102 Merge pull request #214 from Kartinkin/master
Set replied=0 before search of group dn
2019-07-05 17:22:20 +03:00
Landry Breuil 19773cea9e Check cache for all configured servers for this location (cf #201) 2019-06-06 11:09:49 +02:00
Kirill Kartinkin 6baf193c27 Set replied=0 before search of group dn 2018-11-15 00:00:14 +02:00
David Beitey 766fe023bf Allow compiling on GCC < 5/CentOS 6 See #138.
As per https://github.com/kvspb/nginx-auth-ldap/issues/138#issuecomment-317625746
the issue is that:

* nginx compiles with `-Werror` (treating warnings as errors)
* CentOS 6 has OpenSSL 1.0.1e and so the LDAP module has a warning on compile
* CentOS 6 has GCC 4.4.  GCC treats `#pragma GCC diagnostic warning "-Wcpp"` as itself an error and thus skips the statement, leading the the `#warning` still being an error.

This adds version-checking to the warning options and the warning
itself.  This means that no warning is issued at compile time on this
type of platform, but warnings are still emitted when starting Nginx
without certificate verification, so it isn't as though the issue has
been hidden.
2018-11-08 15:10:15 +10:00
Valery Komarov 22d1e849a3 Merge pull request #212 from bhudgens/patch-1
max_down_retries is the setting?
2018-10-27 22:05:20 +03:00
Benjamin Hudgens 962c278ec5 max_down_retries is the setting?
I've been reading the implementation from [this](https://github.com/kvspb/nginx-auth-ldap/pull/169/files).  It seems like the documentation suggests we should be setting the counter.  I notice the counter is reset [here](https://github.com/kvspb/nginx-auth-ldap/blob/master/ngx_http_auth_ldap_module.c#L1682).  Isn't the setting we are intended to configure `max_down_retries` found [here](https://github.com/kvspb/nginx-auth-ldap/blob/master/ngx_http_auth_ldap_module.c#L418-L424)?
2018-10-15 07:54:40 -05:00
Andreas Peters e67df3d5fe change error to debug 2018-02-21 17:18:05 +01:00
Andreas Peters 82d79f8490 remove debug lines 2018-02-21 17:04:33 +01:00
Andreas Peters 3aa566d576 change user_dn to dn 2018-02-21 17:03:04 +01:00
Andreas Peters 49cfe7820a remove ctx 2018-02-21 16:43:01 +01:00
Andreas Peters 583a5093ac change debug mode 2018-02-21 16:41:09 +01:00
Andreas Peters 961832fe8e much more debug 2018-02-21 15:18:33 +01:00
Andreas Peters 5f9f013601 add more rebug
Signed-off-by: Andreas Peters <ap@aventer.biz>
2018-02-21 13:22:11 +01:00
Andreas Peters 4e223dbd23 add debug
Signed-off-by: Andreas Peters <ap@aventer.biz>
2018-02-21 11:26:46 +01:00
Gou Zhuang 0bed9d5b01 handle NULL search result for group dn 2017-12-17 17:29:10 +08:00
Valery Komarov 42d195d7a7 Merge pull request #181 from jmakai/patch-1
Make it compatible with OpenSSL < 1.1
2017-07-25 07:58:46 +03:00
József Makai 1965254b94 Make it compatible with OpenSSL < 1.1
Please make this code compatible with older versions of Open SSL.
2017-07-24 16:01:40 +02:00
Valery Komarov aca69ecd3c Merge pull request #170 from Flashed/1.2.840.113556.1.4.1941_support
Added OID 1.2.840.113556.1.4.1941 support
2017-07-12 21:43:20 +03:00
Valery Komarov 5fd5a40851 Merge pull request #177 from itsoli/master
Fixes for OpenSSL 1.1 API changes
2017-07-12 21:41:23 +03:00
Valery Komarov 22f4b32e38 Merge pull request #166 from i-rinat/auth-ldap-with-no-servers
Require alcf->server array to be non-empty before using it.
2017-07-12 21:39:38 +03:00
Valery Komarov 313c40f963 Merge pull request #169 from dkiser/max_down_retries
adding max_down_retries for #136 and #51
2017-07-12 21:36:48 +03:00
oli 1b4f36e469 Fixes for OpenSSL 1.1 API changes 2017-04-27 16:48:21 +02:00
Mikhail Zaytsev 66d69ef70c Added OID 1.2.840.113556.1.4.1941 support for ldap nested group membership.
Use group_attribute member:1.2.840.113556.1.4.1941:;
2017-03-17 11:45:31 +03:00
dkiser 94462bf74f adding max_down_retries for #136 and #51 2017-03-14 14:59:16 -07:00
Rinat Ibragimov d516b0dd41 Require alcf->server array to be non-empty before using it 2017-02-04 17:57:58 +03:00
Valery Komarov b809421604 Merge pull request #157 from i-rinat/remove-item-from-waiting-requests-queue
remove timedout request ctx's from waiting_requests queue
2017-02-04 02:30:04 +03:00
Rinat Ibragimov b766012bff remove timedout request ctx's from waiting_requests queue 2016-11-30 01:41:01 +03:00
Valery Komarov 978ba1eb1e Merge pull request #155 from vamitrou/fix_magic_srv_num
[bug-fix] + added directive for number of LDAP configs
2016-11-23 22:52:47 +03:00
Valery Komarov 1d1e6d8b68 Merge pull request #153 from mihu/referral
add referral option
2016-11-23 22:52:17 +03:00
Mitrousis, Vasileios (AMOS SE) b355e89ba5 added directive for number of LDAP configs 2016-10-27 19:13:25 +02:00
Michal Humpula e79758b2be add referral option
Add posibility to turn the processing of LDAP referral messages of.
2016-10-08 10:44:06 +02:00
Valery Komarov 49a8b4d28f Update config 2016-09-22 12:39:56 +03:00
Valery Komarov ba8bb9d182 Merge pull request #146 from XSmeets/patch-1
Corrected a typo in README.md
2016-09-22 13:38:47 +04:00
Valery Komarov 8f7c1f3cbb Merge pull request #139 from victorhahncastell/master
Supress escalating manual warnings to errors for clang
2016-09-22 13:38:26 +04:00
Valery Komarov 39e59fadaf Merge pull request #147 from eramoto/not-insert-same-request
Not insert the same request at ngx_http_auth_ldap_get_connection()
2016-09-22 13:37:48 +04:00
ERAMOTO Masaya 0e919ab838 Not insert the same request at ngx_http_auth_ldap_get_connection()
When inserting the same request to waiting_requests queue twice, the queue will be broken.
In addition, the following segmentation fault occurs at the second ngx_http_auth_ldap_return_connection()
if the nginx binary was compiled with --with-debug.

By this fix, ngx_http_auth_ldap_get_connection() will not insert the same request.

  * debug messages at the moment nginx dumped core

    ====
    2016/07/26 13:19:09 [debug] 4299#0: *2 http_auth_ldap: Authentication loop (phase=0, iteration=0)
    2016/07/26 13:19:09 [debug] 4299#0: *2 event timer add: 3: 10000:1469506759827
    2016/07/26 13:19:09 [debug] 4299#0: *2 http_auth_ldap: request_timeout=10000
    2016/07/26 13:19:09 [debug] 4299#0: *2 http_auth_ldap: Authentication loop (phase=1, iteration=0)
    2016/07/26 13:19:09 [debug] 4299#0: *2 http_auth_ldap: Wants a free connection to "test_ldap"
    2016/07/26 13:19:09 [debug] 4299#0: *2 http_auth_ldap: No connection available at the moment, waiting...
    2016/07/26 13:19:09 [debug] 4299#0: *2 http run request: "/portal/Image?"
    2016/07/26 13:19:09 [debug] 4299#0: *2 access phase: 6
    2016/07/26 13:19:09 [debug] 4299#0: *2 http_auth_ldap: Authentication loop (phase=1, iteration=0)
    2016/07/26 13:19:09 [debug] 4299#0: *2 http_auth_ldap: Wants a free connection to "test_ldap"
    2016/07/26 13:19:09 [debug] 4299#0: *2 http_auth_ldap: No connection available at the moment, waiting...
    <snip>
    2016/07/26 13:19:09 [debug] 4299#0: *5 http_auth_ldap: Authentication loop (phase=6, iteration=1)
    2016/07/26 13:19:09 [debug] 4299#0: *5 event timer del: 12: 1469506759826
    2016/07/26 13:19:09 [debug] 4299#0: http_auth_ldap: Marking the connection to "test_ldap" as free
    <snip>
    2016/07/26 13:19:09 [debug] 4299#0: *2 http_auth_ldap: Authentication loop (phase=6, iteration=1)
    2016/07/26 13:19:09 [debug] 4299#0: *2 event timer del: 3: 1469506759827
    2016/07/26 13:19:09 [debug] 4299#0: http_auth_ldap: Marking the connection to "test_ldap" as free
    2016/07/26 13:19:09 [notice] 4298#0: signal 17 (SIGCHLD) received
    2016/07/26 13:19:09 [alert] 4298#0: worker process 4299 exited on signal 11 (core dumped)
    ====

  * backtrace

    ====
    Program terminated with signal SIGSEGV, Segmentation fault.
    #0  0x0000000000491b73 in ngx_http_auth_ldap_return_connection (c=0x26a84e8) at /tmp/test/nginx-1.11.2/../nginx-auth-ldap/ngx_http_auth_ldap_module.c:1117
    1117                ngx_queue_remove(q);
    (gdb) bt
    #0  0x0000000000491b73 in ngx_http_auth_ldap_return_connection (c=0x26a84e8) at /tmp/test/nginx-1.11.2/../nginx-auth-ldap/ngx_http_auth_ldap_module.c:1117
    #1  0x000000000049496a in ngx_http_auth_ldap_authenticate (conf=<optimized out>, ctx=0x26e4698, r=0x26e35a0)
        at /tmp/test/nginx-1.11.2/../nginx-auth-ldap/ngx_http_auth_ldap_module.c:1902
    #2  ngx_http_auth_ldap_handler (r=0x26e35a0) at /tmp/test/nginx-1.11.2/../nginx-auth-ldap/ngx_http_auth_ldap_module.c:1717
    #3  0x0000000000446c38 in ngx_http_core_access_phase (r=<optimized out>, ph=0x26a7f48) at src/http/ngx_http_core_module.c:1071
    #4  0x00000000004428a3 in ngx_http_core_run_phases (r=r@entry=0x26e35a0) at src/http/ngx_http_core_module.c:845
    #5  0x0000000000491ab7 in ngx_http_auth_ldap_wake_request (r=0x26e35a0) at /tmp/test/nginx-1.11.2/../nginx-auth-ldap/ngx_http_auth_ldap_module.c:1063
    #6  0x0000000000491c44 in ngx_http_auth_ldap_reply_connection (c=c@entry=0x26a84e8, error_code=0, error_msg=<optimized out>)
        at /tmp/test/nginx-1.11.2/../nginx-auth-ldap/ngx_http_auth_ldap_module.c:1141
    #7  0x00000000004956b8 in ngx_http_auth_ldap_read_handler (rev=0x265d500) at /tmp/test/nginx-1.11.2/../nginx-auth-ldap/ngx_http_auth_ldap_module.c:1486
    #8  0x00000000004384fe in ngx_epoll_process_events (cycle=0x26594e0, timer=<optimized out>, flags=<optimized out>) at src/event/modules/ngx_epoll_module.c:900
    #9  0x000000000042ea85 in ngx_process_events_and_timers (cycle=cycle@entry=0x26594e0) at src/event/ngx_event.c:242
    #10 0x0000000000435fe0 in ngx_worker_process_cycle (cycle=0x26594e0, data=<optimized out>) at src/os/unix/ngx_process_cycle.c:753
    #11 0x0000000000434942 in ngx_spawn_process (cycle=cycle@entry=0x26594e0, proc=proc@entry=0x435f3d <ngx_worker_process_cycle>, data=data@entry=0x0,
        name=name@entry=0x49abb7 "worker process", respawn=respawn@entry=-3) at src/os/unix/ngx_process.c:198
    #12 0x000000000043613d in ngx_start_worker_processes (cycle=cycle@entry=0x26594e0, n=1, type=type@entry=-3) at src/os/unix/ngx_process_cycle.c:358
    #13 0x0000000000436bd6 in ngx_master_process_cycle (cycle=cycle@entry=0x26594e0) at src/os/unix/ngx_process_cycle.c:130
    #14 0x000000000041168b in main (argc=<optimized out>, argv=<optimized out>) at src/core/nginx.c:367
    ====
2016-07-28 11:40:43 +09:00
Xander Smeets 6af58b4cc3 Corrected a typo in README.md 2016-07-25 16:08:22 +02:00
Victor Hahn ac3e805216 Merge branch 'master' of github.com:kvspb/nginx-auth-ldap 2016-05-27 14:08:25 +02:00
Victor Hahn df18cf0a41 Supress escalating manual warnings to errors for clang 2016-05-27 14:06:41 +02:00
Valery Komarov dbcef31beb Merge pull request #131 from gringus/master
Support for building as dynamic module
2016-04-28 18:48:18 +03:00
Marcin Deranek c8d8678368 Support for building as dynamic module 2016-04-28 14:32:05 +02:00
Valery Komarov 8517bb05ec Merge pull request #121 from victorhahncastell/master
Verify certificate CN/SAN
2016-02-05 22:28:15 +03:00
Victor Hahn 2e3e8a9e14 Verify certificate CN/SAN 2016-02-05 17:18:01 +01:00
Valery Komarov d0f2f829f7 Merge pull request #100 from victorhahncastell/master
Provide SSL certificate verification
2016-01-13 22:08:10 +03:00
Valery Komarov 256cafe826 Merge pull request #109 from rascal-hats/patch-1
Update ngx_http_auth_ldap_module.c - Initialize variable before use.
2016-01-13 22:07:26 +03:00
Valery Komarov d0058d6930 Merge pull request #89 from denji/darwin
darwin requires lber
2016-01-13 22:06:59 +03:00