Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Hackers > Proposed Patch ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 8 Topic 9265 of 9685
Post > Topic >>

Proposed Patch - LDAPS sup****t for servers on ****t 636 w/o TLS

by steve@[EMAIL PROTECTED] (stephen layland) Apr 25, 2008 at 09:02 PM

--6sX45UoQRIJXqkqR
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline

Hey Postgres Hackers,

this is my first time here, so... hi!

I've written a quick patch against the head branch (8.4DEV, but it also
works with 8.1.3 sources) to fix LDAP authentication sup****t to
work with LDAPS servers that do not need start TLS.   I'd be interested
to hear your opinions on this.

Quick overview:

	The OpenLDAP recommended LDAPS configuration (as of OpenLDAP
	2.4?) is to have a regular (unencrypted) LDAP server listening
	on standard ****t 389.  Encryption will begin when the client
	issues a STARTTLS request ala SMTPS.

	Some older LDAP servers may not sup****t TLS and instead have the
	SSL enabled ldap server listening on the ldaps ****t (usually
	636).

	While I agree it's probably not worth it to sup****t older
	'unrecommended' setups, many organizations are slow on the
	uptake of recommended practices (mine is one of them :) ). 
	Allowing PostgreSQL to work with these organization's setups out
	of the box helps us pitch the db to organizations easier,
	especially those possibly overly paranoid about security.

	My solution was to create a boolean config variable called
	ldap_use_start_tls which the user can toggle whether or not
	start tls is necessary.  The default is to use start tls and 
	the recommended configuration.  I also updated the documentation
	and cleaned up the prefix/suffix/basedn interface so it's a bit
	more intuitive to the user (i.e. - the basedn setting is
	actually used, what they do are explained in the docs, etc.)
	Some people actually found that using an auth uri of:

		ldaps://ldap.example.org/junk;cn=;,dc=example,dc=com

	worked.  I think a more intuitive form would be:

		ldaps://ldap.example.org/dc=example,dc=com;cn=

	though this can be debated.

If any of you are interested in this, feel free to check out the patch
located here: 

	http://rockpunk.org/ldaps-postgres_8.4DEV.patch
	http://rockpunk.org/ldaps-postgres_8.4DEV.patch.asc

Please note that this patch does not implement ldaps for Albe Laurenz'
code that allows config to pull from LDAP via pg_service.conf, though it
should be easy to do.

I have tested this patch on the following configurations:

Client OS: RHEL4
Database:
	Postgres 8.1.3 sources
	Postgres 8.4DEV (cvs HEAD branch as of Apr 24)
libldap client:
	OpenLDAP version 2.2.12 (latest for RHEL4 subscriptions)
	OpenLDAP version 2.3.39 (stable)
libldap server:
	OpenLDAP slapd version 2.2.x? on CentOS 4 or 5. (<-- no access)

Thanks a bunch,

-Steve (rockpunk @[EMAIL PROTECTED]
 #postgresql)

-- 
 *------------------------*
//  ste\/e || 0x158f7a45 //
*------------------------*
   live now. die later.

--6sX45UoQRIJXqkqR
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFIEn8wIBlLQBWPekURAiXSAJ9nAQ0nh2jJGBisAG8jK/Bmc4zgmACgmYFR
XakbU2u+7W7rAXv32fMFMNc=
=y3/C
-----END PGP SIGNATURE-----

--6sX45UoQRIJXqkqR--
 




 8 Posts in Topic:
Proposed Patch - LDAPS sup****t for servers on ****t 636 w/o TLS
steve@[EMAIL PROTECTED]   2008-04-25 21:02:40 
Re: Proposed Patch - LDAPS sup****t for servers on ****t 636 w/o T
direvus@[EMAIL PROTECTED]  2008-04-26 11:36:48 
Re: Proposed Patch - LDAPS sup****t for servers on ****t 636 w/o T
tgl@[EMAIL PROTECTED] (T  2008-05-04 13:29:28 
Re: Proposed Patch - LDAPS sup****t for servers on ****t
pgadmin@[EMAIL PROTECTED]  2008-05-05 13:40:38 
Re: Proposed Patch - LDAPS sup****t for servers on ****t
david_list@[EMAIL PROTECT  2008-05-05 07:36:13 
Re: Proposed Patch - LDAPS sup****t for servers on ****t 636 w/o T
steve@[EMAIL PROTECTED]   2008-05-05 23:54:03 
Re: Proposed Patch - LDAPS sup****t for servers on
bruce@[EMAIL PROTECTED]   2008-06-25 22:53:24 
Re: Proposed Patch - LDAPS sup****t for servers on ****t
magnus@[EMAIL PROTECTED]   2008-05-05 13:51:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Tue Jul 8 23:44:04 CDT 2008.