nginx-auth-ldap icon indicating copy to clipboard operation
nginx-auth-ldap copied to clipboard

Any plans to support StartTLS?

Open tdm4 opened this issue 10 years ago • 17 comments

Hi, are there any plans to implement StartTLS (over port 389)? Reason I'm asking is ldaps over port 636 is deprecated and it would be nice to still have the connection encrypted. I've set up my LDAP server to require StartTLS before it will send back any information on port 389.

Thanks!

tdm4 avatar Apr 11 '14 14:04 tdm4

+1

StartTLS would be great.

crashr avatar Jun 20 '14 08:06 crashr

I would also like to express that StartTLS would be extremely usable - without that I am being forced to use Apache instead of my server of choice - Nginx because I do not accept sending user data (like passwords) via non encrypted channel.

bartekrutkowski avatar Aug 05 '14 13:08 bartekrutkowski

Hi, I've noticed some activity in this issue. Any chance for a comment if/when starttls will be supported? That really is the only acceptable way to use ldap auth in most envs I work on.

kudu-rex avatar Aug 05 '14 13:08 kudu-rex

Same here, STARTTLS would be extremely useful.

igoratencompass avatar Aug 28 '14 00:08 igoratencompass

:+1:

itn3rd77 avatar Feb 07 '15 13:02 itn3rd77

If anyone takes this up, my (lack of) progress so far has been:

I tried adding a call to ldap_start_tls_s ( c->ld, NULL, NULL) in ngx_http_auth_ldap_connection_established() after the sockbuf provider is set and before the initial bind. It didn't work. Watching the tcpdumps it appears that TLS gets started but not completely set up, then ldap_start_tls_s() returns and ngx_http_auth_ldap just goes back to sending clear text.

In the dump I saw the SERVER_HELLO and CLIENT_HELLO, and also the SERVER_CERTIFICATE but around the same time as the cert, ngx_http_auth_ldap sent the bind attempt as clear text instead of completing the TLS negotiation. It would appear that the openldap tls sockbuf io layer or the negotiation in ldap_start_tls_s() doesn't work right the way ngx_http_auth_ldap is using it.

This was on ubuntu 14.04.02, which I think is gnutls based.

markfinn avatar Mar 25 '15 15:03 markfinn

How about that StartTLS? We're also missing it here.

samupl avatar Apr 15 '15 20:04 samupl

FYI- I switched to NGINX Auth PAM because of the lack of STARTTLS support with this module. SSSD + PAM + NGINX Auth PAM module was a much better solution overall. It requires a bit more knowledge of Linux, but provides enormous set of options, including two factor authentication, etc... plus PAM in general has a ton of support.

jasonwbarnett avatar Apr 22 '15 18:04 jasonwbarnett

I've actually went the other way around - I used the auth_request module and created a custom app, that allows me to handle basic auth via my python webapp, that DOES support StartTLS and allows me to easily select which groups should have access to which locations (by defining a custom header with group names).

I don't know if it's the most optimal solution, but it gave me a bit more controll over who and how is able to authenticate, and since this is MY app, I can decide how caching works, etc.

samupl avatar Apr 29 '15 15:04 samupl

And I've went a third way - I've just dropped the Nginx in favor of Apache, that with all its drawbacks, when compared to Nginx, have at least ldap auth module fully functional...

bartekrutkowski avatar Apr 29 '15 15:04 bartekrutkowski

kvspb still commits to the repo, but I don't know if this issue is considered important :( There's been no input from the author.

tdm4 avatar Jul 02 '15 14:07 tdm4

Three years later and no updates :(

I'm here to add my +1. We're looking at switching from using this module to auth_pam because we require StartTLS support.

ctso avatar Jan 25 '18 04:01 ctso

Especially when OpenLDAP says, I quote: ldaps:// is deprecated in favor of Start TLS [RFC2830]. I have moved all SMTP and LDAP servers to STARTTLS long time ago.

igoratencompass avatar Oct 08 '18 23:10 igoratencompass

Especially when OpenLDAP says, I quote: ldaps:// is deprecated in favor of Start TLS [RFC2830]. I have moved all SMTP and LDAP servers to STARTTLS long time ago.

Hey don't feel bad, Atlassian Jira is still stuck on ldaps://. There's been a ticket for 10 years to get that changed and they've not done a thing!

tdm4 avatar Oct 21 '18 15:10 tdm4

Yeah, like the adoption of SSL that took decades until the browsers started penalizing websites that don't support it so people take it seriously. Sometimes you need to smack people so they start doing the things properly ;-)

igoratencompass avatar Oct 21 '18 22:10 igoratencompass

Any news on adding StartTLS support to nginx-auth-ldap? It looks like a pretty nifty authentication module, but I just can't use it until it supports StartTLS to connect to the LDAP server.

JoeKun avatar Nov 21 '18 20:11 JoeKun

You could just use ldap and run through stunnel. It supports all of the tls stuff natively. Just set your local endpoint to 127.0.0.1 xxxx (xxxx being a port of your choice) and you don't have to contend with any modifications of the base nginx.

munntjlx avatar Nov 13 '19 19:11 munntjlx