Commit Graph

58 Commits

Author SHA1 Message Date
Robert Szulist d0e80bf79f Allow to select Python version at build
With this anyone can effectively use Python 2 or 3 using --build-arg
The default version is 2.
2019-09-07 17:53:27 +02:00
Vladimir Homutov 6fad4f3715
Merge pull request #64 from nikolaev-rd/patch-1
Formating fixed and optimized
2019-05-06 11:57:34 +03:00
Roman Nikolaev 8da8eef360
Formating fixed and optimized 2019-04-24 11:26:00 +03:00
Igor Ippolitov 3704dc25ff several minor fixes into spec file 2019-04-11 17:50:37 +03:00
A compound of Fe and O bbbde8d22b
Merge pull request #56 from alexjfisher/fix_spec_file
Fix logrotate and update rpm spec file
2019-02-07 13:42:01 +03:00
Alexander Fisher 61d8777204
Fix logrotate and update rpm spec file
* Create log directory in spec file
* Fix logrotate file
2018-11-16 13:01:18 +00:00
Vladimir Homutov d9a2149825 Added tests with multiple LDAP servers.
The directory is distributed on two servers, and search now may return
continuation object for specific users.
2018-10-29 11:46:59 +03:00
Vladimir Homutov 86687e2887 Added additional tests for user search results.
This fixes https://github.com/nginxinc/nginx-ldap-auth/issues/55.

It was possible to perform successful bind with unknown user with recent
versions of python-ldap, in case when LDAP server returned continuation
object and allowed anonymous bind.
2018-10-29 11:42:22 +03:00
Vladimir Homutov 57fb98b528 Added test suite.
The testsuite depends on nginx test suite, and requires an OpenLDAP server
installed.
2018-10-23 18:37:24 +03:00
Vladimir Homutov 850f5ea5ca
Merge pull request #42 from trunk-studio/fix/readme
Add Comment for HTTP basic authentication.
2018-08-20 12:47:35 +03:00
Vladimir Homutov f56178b6ee Added configuration option to disable referrals.
The options is boolean, header name is  'X-Ldap-DisableReferrals' and
the command-line switch is '--disable-referrals', default value is
false.
2018-08-20 12:31:55 +03:00
dd-han b5c580bac9 add Comment for HTTP basic authentication. 2018-04-19 15:26:59 +08:00
Igor Ippolitov 732eb15f07 fix log rotation in debian (#40) 2018-03-26 12:05:35 +03:00
A compound of Fe and O 3776f634c0
Merge pull request #34 from LMNetworks/issue_33
create missing etc/logrotate.d directory in buildroot
2018-01-16 16:30:04 +03:00
Vladimir Homutov 7ed1e2dfc9 Added StartTLS support.
This is a rebased version and slightly modified version of patch submitted by
Matthieu Cerda <matthieu.cerda@gmail.com> via pull-request #29
(https://github.com/nginxinc/nginx-ldap-auth/pull/29)
2017-12-25 13:04:42 +03:00
Vladimir Homutov b732f8c585 Fixed LDAP name of the "sAMAccountName" attribute.
The correct name starts with the lowercase 's'.

https://msdn.microsoft.com/en-us/library/ms679635
2017-12-25 13:04:42 +03:00
Vladimir Homutov d234e67497 Style: retabbed README.md 2017-12-25 13:04:42 +03:00
Vladimir Homutov 1262eaf8a3 Added Dockerfile for nginx-ldap-auth-daemon.py. 2017-12-22 19:14:10 +03:00
Vladimir Homutov cdc0abff91 Fixed typos in README.md 2017-12-22 17:22:39 +03:00
Vladimir Homutov 37be5adf9c Added default redirection destination to /dev/stdout.
When a nginx-ldap-auth-daemon.py is executed from console, its output
is set to /dev/stdout by default.  Otherwise, value of a 'LOG' variable is
used, exported by wrapper script.
2017-12-22 15:21:53 +03:00
Vladimir Homutov 8d187d9acf Replaced bash-specific redirections. 2017-12-22 15:02:12 +03:00
Vladimir Homutov 18e0b9c29c Fixed a typo in realm default value. 2017-12-22 14:21:23 +03:00
Vladimir Homutov 9df349f98e Removed trailing spaces. 2017-12-22 14:20:43 +03:00
Luca Lesinigo 38d220dd58 create missing etc/logrotate.d directory in buildroot 2017-12-20 14:23:43 +01:00
Vladimir Homutov b5de9a539c Merge pull request #28 from cawemo/kubernetes
Exit on SIGTERM for Kubernetes, print startup message
2017-10-25 12:17:39 +03:00
Christian Nicolai b860648a33 Exit on SIGTERM for Kubernetes, print startup message 2017-10-25 11:09:59 +02:00
Igor Ippolitov 8952b217a8 Put correct link to an architecture solution image 2017-09-12 12:25:18 +03:00
arozyev 937def0caa Added Template usage example to README.md 2017-05-17 14:46:03 +03:00
A compound of Fe and O f9e1a42329 Merge pull request #19 from nichivo/master
Fixed logging and typo for bind DN argument
2017-05-02 16:46:01 +03:00
Rick Hansen d66d4a04e7 Update spec file to rotate log file 2017-05-01 14:34:22 +10:00
Rick Hansen f94670848e Use unbuffered IO and redirect output to log file 2017-05-01 14:31:45 +10:00
Rick Hansen 481b02a979 Fixed typo for bind DN argument in .default 2017-05-01 14:28:41 +10:00
Vladimir Homutov 9d7cfcd1cc Merge pull request #14 from oxpa/master
Fixed a typo in .service file and fixed missing file in .install
2016-11-07 15:31:16 +04:00
Igor Ippolitov bd3f672763 Fixed a typo in .service file and fixed missing file in .install 2016-11-07 14:20:38 +03:00
Vladimir Homutov b56c9ef686 Merge pull request #13 from ArfyFR/patch-1
Quoted-string Basic realm ctx according to rfc7235
2016-11-03 14:10:01 +04:00
ArfyFR 64bb271b2e Quoted-string Basic realm ctx according to rfc7235
Hi,

I faced some problems with 401 message and an Android client.

It yelded because in the WWW-Authenticate header the
Basic ream=<ctx>
wasn't surrouned by ""

In the https://tools.ietf.org/html/rfc7235 it is written that 
 - Authentication parameters are name=value pairs
 - and "auth-param     = token BWS "=" BWS ( token / quoted-string )"
 - and "For historical reasons, a sender MUST only generate the quoted-string
   syntax.  Recipients might have to support both token and
   quoted-string syntax for maximum interoperability with existing
   clients that have been accepting both notations for a long time."

After my modification, the Android worked again (and iOs and PC clients faicing the 401 still worked ;) )

BR,
Arfy
2016-11-03 11:00:33 +01:00
Vladimir Homutov 9f7537ef34 Merge pull request #12 from oxpa/master
cli options for the daemon and basic debian packaging
2016-11-03 13:24:23 +04:00
Igor Ippolitov f824aee3ef files needed for debian packaging and minor changes into rpm spec 2016-11-02 20:06:42 +03:00
Igor Ippolitov 438518509d ensure required parameters are set at the time of a request 2016-11-02 20:06:42 +03:00
Igor Ippolitov 5fec096aa6 added options for commandline 2016-11-02 18:33:15 +03:00
Vladimir Homutov 3873fab889 Merge pull request #11 from thresheek/master
Added systemd service file and rpm spec file
2016-11-02 18:47:07 +04:00
Konstantin Pavlov 6cd01885aa Added RPM spec file. 2016-11-02 17:37:28 +03:00
Konstantin Pavlov fe3b441727 Added systemd service file for nginx-ldap-auth-daemon.
This service file assumes nginx-ldap-auth-daemon.py was installed to
/usr/bin under the name of nginx-ldap-auth-daemon.
2016-11-02 17:31:29 +03:00
Vladimir Homutov 40fc2ef257 Merge pull request #10 from rysiekpl/master
Minor bugfixes
2016-10-10 23:53:52 +04:00
Michał 'rysiek' Woźniak 24bf24ffbb Minor bugfixes: password can now contain colons, log_message uses self.ctx (instead of global ctx, which does not exist) 2016-10-10 21:38:15 +02:00
Vladimir Homutov c61f0137b7 Merge /home/vl/tasks/0216-ldap_auth_lab/src/nginx-ldap-auth 2016-10-10 16:51:28 +03:00
Vladimir Homutov d56a55e21e Updated documentation and example.
Commit 06444b36f6 changed returned error
code from 403 to 401 in case of failed auth and documentaion must be
updated accordingly.
2016-10-10 16:48:29 +03:00
Vladimir Homutov 06444b36f6 Merge pull request #9 from ArfyFR/patch-1
Use RFC2616 recommandation to reply 401 instead on 403 for auth_failed
2016-10-10 17:46:18 +04:00
Vladimir Homutov 7f3634bba0 more robust error routine.
self.ctx may be unset in case of bad request or other low-level error.
2016-10-10 16:39:56 +03:00
ArfyFR f57c05388d Use RFC2616 recommandation to reply 401 instead on 403 for auth_failed
Cf https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html ,

401 is for: auth failed... please retry ;)
-----------
10.4.2 401 Unauthorized
 The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.47) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity might include relevant diagnostic information. HTTP access authentication is explained in "HTTP Authentication: Basic and Digest Access Authentication" [43].



403 is for: more or less auth shouldn't be repeated
-----------
10.4.4 403 Forbidden
 The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. If the server does not wish to make this information available to the client, the status code 404 (Not Found) can be used instead.

Regards,
Pascal
2016-10-10 09:09:05 +02:00