pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: LDAP authentication
30+ messages / 24 participants
[nested] [flat]
* LDAP authentication
@ 2002-10-23 19:38 Richard Ray <rray1@netdoor.com>
2002-10-23 20:29 ` Re: LDAP authentication Tommi Mäkitalo <t.maekitalo@epgmbh.de>
2002-10-23 20:55 ` Re: LDAP authentication Ray Hunter <shunter@venticon.com>
2002-10-23 20:56 ` Re: LDAP authentication Ray Hunter <rhunter@venticon.com>
0 siblings, 3 replies; 30+ messages in thread
From: Richard Ray @ 2002-10-23 19:38 UTC (permalink / raw)
To: pgsql-general
Does anyone know if anyone has tried to use LDAP for authentication?
The management here is insisting on it. I'll write it from scratch if
neccassary. Any hints or pointers are appreciated.
Thanks
Richard
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP authentication
2002-10-23 19:38 LDAP authentication Richard Ray <rray1@netdoor.com>
@ 2002-10-23 20:29 ` Tommi Mäkitalo <t.maekitalo@epgmbh.de>
1970-01-01 00:00 ` Re: LDAP authentication Fathi Ben Nasr <fathi.engineer@gnet.tn>
2002-10-23 21:26 ` Re: LDAP authentication Richard Ray <rray1@netdoor.com>
2 siblings, 2 replies; 30+ messages in thread
From: Tommi Mäkitalo @ 2002-10-23 20:29 UTC (permalink / raw)
To: pgsql-general
Postgresql supports pam. And there is pam_ldap. I haven't tried out yet. But
I'm sure you need to create users in postgresql. Just authentication comes
through pam. There is no nss_ldap as far as I know.
Tommi
Am Mittwoch, 23. Oktober 2002 21:38 schrieb Richard Ray:
> Does anyone know if anyone has tried to use LDAP for authentication?
> The management here is insisting on it. I'll write it from scratch if
> neccassary. Any hints or pointers are appreciated.
>
> Thanks
> Richard
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP authentication
2002-10-23 19:38 LDAP authentication Richard Ray <rray1@netdoor.com>
2002-10-23 20:29 ` Re: LDAP authentication Tommi Mäkitalo <t.maekitalo@epgmbh.de>
@ 1970-01-01 00:00 ` Fathi Ben Nasr <fathi.engineer@gnet.tn>
1 sibling, 0 replies; 30+ messages in thread
From: Fathi Ben Nasr @ 1970-01-01 00:00 UTC (permalink / raw)
To: pgsql-general
Create a file named postgresql in your /etc/pam.d/ directory with this
content
#%PAM-1.0
auth required /lib/security/pam_ldap.so #nullok #set_secrpc
account required /lib/security/pam_ldap.so
and something like this in your pg_hba.conf
host all 10.0.0.0 255.0.0.0 pam
It worked for me. Unfortunately/fortunatly you have to create each user who
will
acces the database but this can be done easily (i.e. through a php script
on an
autheticated web location)
Fathi Ben Nasr
Tommi Mäkitalo a écrit :
> Postgresql supports pam. And there is pam_ldap. I haven't tried out yet.
But
> I'm sure you need to create users in postgresql. Just authentication
comes
> through pam. There is no nss_ldap as far as I know.
>
> Tommi
>
> Am Mittwoch, 23. Oktober 2002 21:38 schrieb Richard Ray:
> > Does anyone know if anyone has tried to use LDAP for authentication?
> > The management here is insisting on it. I'll write it from scratch if
> > neccassary. Any hints or pointers are appreciated.
> >
> > Thanks
> > Richard
> >
> > ---------------------------(end of broadcast)
---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> > (send "unregister YourEmailAddressHere" to
majordomo@postgresql.org)
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
(See attached file: smime.p7s)
Attachments:
smime.p7s (application/octet-stream, 1.9K) download
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP authentication
2002-10-23 19:38 LDAP authentication Richard Ray <rray1@netdoor.com>
2002-10-23 20:29 ` Re: LDAP authentication Tommi Mäkitalo <t.maekitalo@epgmbh.de>
@ 2002-10-23 21:26 ` Richard Ray <rray1@netdoor.com>
2002-10-24 10:06 ` Re: LDAP authentication Tommi Maekitalo <t.maekitalo@epgmbh.de>
1 sibling, 1 reply; 30+ messages in thread
From: Richard Ray @ 2002-10-23 21:26 UTC (permalink / raw)
To: pgsql-general
I've had no luck gettting PAM to work with PostgreSQL on HP/UX 11.00 and I
read that PostgreSQL doesn't allow user triggers on system tables. Not much
left but hack the PostgreSQL authentication code.
Richard
On Wednesday 23 October 2002 03:29 pm, you wrote:
> Postgresql supports pam. And there is pam_ldap. I haven't tried out yet.
> But I'm sure you need to create users in postgresql. Just authentication
> comes through pam. There is no nss_ldap as far as I know.
>
>
> Tommi
>
> Am Mittwoch, 23. Oktober 2002 21:38 schrieb Richard Ray:
> > Does anyone know if anyone has tried to use LDAP for authentication?
> > The management here is insisting on it. I'll write it from scratch if
> > neccassary. Any hints or pointers are appreciated.
> >
> > Thanks
> > Richard
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP authentication
2002-10-23 19:38 LDAP authentication Richard Ray <rray1@netdoor.com>
2002-10-23 20:29 ` Re: LDAP authentication Tommi Mäkitalo <t.maekitalo@epgmbh.de>
2002-10-23 21:26 ` Re: LDAP authentication Richard Ray <rray1@netdoor.com>
@ 2002-10-24 10:06 ` Tommi Maekitalo <t.maekitalo@epgmbh.de>
0 siblings, 0 replies; 30+ messages in thread
From: Tommi Maekitalo @ 2002-10-24 10:06 UTC (permalink / raw)
To: pgsql-general
Hi,
I just tried out. Pam works fine with pam_ldap on linux. But as a told you
need to create databaseusers. I just configured postgresql with --with-pam
and created (or copied one and modified) a /etc/pam.d/postgresql. Her is it:
#%PAM-1.0
auth required pam_nologin.so
auth sufficient pam_ldap.so
auth required pam_unix.so nullok try_first_pass #set_secrpc
account sufficient pam_ldap.so
account required pam_unix.so
password required pam_pwcheck.so nullok
password required pam_ldap.so use_first_pass use_authok
password required pam_unix.so nullok use_first_pass use_authtok
Maybe you can create users with a cronjob, which queries ldap on a daily base
about new (and retired) users. Postgresql do need entries in pg_shadow. I
think it would be hard to hack authentication so that it does not need.
It might be fine to see a generic way to create pg_shadow on the fly like nss
does. It should be a table-function, which might query a ldap-tree.
Tommi
Am Mittwoch, 23. Oktober 2002 23:26 schrieb Richard Ray:
> I've had no luck gettting PAM to work with PostgreSQL on HP/UX 11.00 and I
> read that PostgreSQL doesn't allow user triggers on system tables. Not much
> left but hack the PostgreSQL authentication code.
>
> Richard
>
> On Wednesday 23 October 2002 03:29 pm, you wrote:
> > Postgresql supports pam. And there is pam_ldap. I haven't tried out yet.
> > But I'm sure you need to create users in postgresql. Just authentication
> > comes through pam. There is no nss_ldap as far as I know.
> >
> >
> > Tommi
> >
> > Am Mittwoch, 23. Oktober 2002 21:38 schrieb Richard Ray:
> > > Does anyone know if anyone has tried to use LDAP for authentication?
> > > The management here is insisting on it. I'll write it from scratch if
> > > neccassary. Any hints or pointers are appreciated.
> > >
> > > Thanks
> > > Richard
> > >
> > > ---------------------------(end of
> > > broadcast)--------------------------- TIP 2: you can get off all lists
> > > at once with the unregister command (send "unregister
> > > YourEmailAddressHere" to majordomo@postgresql.org)
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo@postgresql.org so that your
> > message can get through to the mailing list cleanly
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
--
Dr. Eckhardt + Partner GmbH
http://www.epgmbh.de
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP authentication
2002-10-23 19:38 LDAP authentication Richard Ray <rray1@netdoor.com>
@ 2002-10-23 20:55 ` Ray Hunter <shunter@venticon.com>
2002-10-28 23:53 ` Re: LDAP authentication Evert Carton <evertcarton@netscape.net>
2 siblings, 1 reply; 30+ messages in thread
From: Ray Hunter @ 2002-10-23 20:55 UTC (permalink / raw)
To: Richard Ray <rray1@netdoor.com>; +Cc: pgsql-general
I have used LDAP authentication with PHP. It works really well..I have
even done it with using MS domain controllers to....
On Wed, 2002-10-23 at 13:38, Richard Ray wrote:
> Does anyone know if anyone has tried to use LDAP for authentication?
> The management here is insisting on it. I'll write it from scratch if
> neccassary. Any hints or pointers are appreciated.
>
> Thanks
> Richard
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
--
S RAY HUNTER
email: shunter@venticon.com
email: rhunter@venticon.com
www: http://venticon.com
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP authentication
2002-10-23 19:38 LDAP authentication Richard Ray <rray1@netdoor.com>
2002-10-23 20:55 ` Re: LDAP authentication Ray Hunter <shunter@venticon.com>
@ 2002-10-28 23:53 ` Evert Carton <evertcarton@netscape.net>
0 siblings, 0 replies; 30+ messages in thread
From: evertcarton@netscape.net @ 2002-10-28 23:53 UTC (permalink / raw)
To: pgsql-general
It is true that you have to create the users on PostGreSQL level too.
But once they are created on PG-level, PAM does work fine.
I had the same problem. I create a utility that synchronises the
postgresql users/groups with LDAP. It is not done automatically. You
have to invoke a function for it.
It is pretty ugly for the moment, it was my first experience writing
C-functions for PostGreSQL. I am rewriting it for PostGreSQL 7.3b2,
which has a way nicer API for outputting tables in C.
It does indeed consist of some C and some PLPGSQL functions.
If you're interested, please shoot me an email ...
Evert
shunter@venticon.com (Ray Hunter) wrote in message news:<camel@pclnxrhunter.digitalglobe.com/">1035406530.2775.6.camel@pclnxrhunter.digitalglobe.com>...
> I have used LDAP authentication with PHP. It works really well..I have
> even done it with using MS domain controllers to....
>
>
>
> On Wed, 2002-10-23 at 13:38, Richard Ray wrote:
> > Does anyone know if anyone has tried to use LDAP for authentication?
> > The management here is insisting on it. I'll write it from scratch if
> > neccassary. Any hints or pointers are appreciated.
> >
> > Thanks
> > Richard
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
> --
> S RAY HUNTER
> email: shunter@venticon.com
> email: rhunter@venticon.com
> www: http://venticon.com
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP authentication
2002-10-23 19:38 LDAP authentication Richard Ray <rray1@netdoor.com>
@ 2002-10-23 20:56 ` Ray Hunter <rhunter@venticon.com>
2 siblings, 0 replies; 30+ messages in thread
From: Ray Hunter @ 2002-10-23 20:56 UTC (permalink / raw)
To: Richard Ray <rray1@netdoor.com>; +Cc: pgsql-general
I have used LDAP authentication with PHP. It works really well..I have
even done it with using MS domain controllers to....
On Wed, 2002-10-23 at 13:38, Richard Ray wrote:
> Does anyone know if anyone has tried to use LDAP for authentication?
> The management here is insisting on it. I'll write it from scratch if
> neccassary. Any hints or pointers are appreciated.
>
> Thanks
> Richard
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
--
Thank you,
Ray Hunter
^ permalink raw reply [nested|flat] 30+ messages in thread
* LDAP authentication
@ 2006-05-26 01:06 carlos.reimer@opendb.com.br
0 siblings, 0 replies; 30+ messages in thread
From: carlos.reimer@opendb.com.br @ 2006-05-26 01:06 UTC (permalink / raw)
To: pgsql-general
Hello,
I saw many messages about ldap authentication but I´m still not sure if
PostgreSQL can use it?
Can I use it or should I apply some patch before?
Reimer
^ permalink raw reply [nested|flat] 30+ messages in thread
* LDAP authentication
@ 2006-05-26 13:16 carlosreimer@terra.com.br
2006-05-26 13:44 ` Re: LDAP authentication Florian G. Pflug <fgp@phlo.org>
2006-05-26 15:55 ` Re: LDAP authentication codeWarrior <gpatnude@hotmail.com>
0 siblings, 2 replies; 30+ messages in thread
From: carlosreimer@terra.com.br @ 2006-05-26 13:16 UTC (permalink / raw)
To: pgsql-general
Hello,
I saw many messages about ldap authentication but I´m still not sure if
PostgreSQL can use it?
Can I use it? Should I apply some patch before? Where can I find some doc
about?
Reimer
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP authentication
2006-05-26 13:16 LDAP authentication carlosreimer@terra.com.br
@ 2006-05-26 13:44 ` Florian G. Pflug <fgp@phlo.org>
1 sibling, 0 replies; 30+ messages in thread
From: Florian G. Pflug @ 2006-05-26 13:44 UTC (permalink / raw)
To: carlosreimer@terra.com.br; +Cc: pgsql-general
carlosreimer@terra.com.br wrote:
> Hello,
>
> I saw many messages about ldap authentication but I´m still not sure if
> PostgreSQL can use it?
Are you using windows or unix? On unix, postgresql can use pam
(pluggable authentication modules) for authentication. There are
pam modules for about any authentication schema you can image, including
ldap.
> Can I use it? Should I apply some patch before? Where can I find some doc
> about?
Just compile a version of postgres that includes pam support (Most
binary packages already include that), add a line containing
"all all 0.0.0.0 0.0.0.0 pam" to pg_hba.conf, and create a
/etc/pam.d/postgres file.
greetings, Florian Pflug
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP authentication
2006-05-26 13:16 LDAP authentication carlosreimer@terra.com.br
@ 2006-05-26 15:55 ` codeWarrior <gpatnude@hotmail.com>
2006-05-26 16:00 ` Re: LDAP authentication Scott Marlowe <smarlowe@g2switchworks.com>
2006-05-26 16:16 ` Re: LDAP authentication Jorge Godoy <jgodoy@gmail.com>
1 sibling, 2 replies; 30+ messages in thread
From: codeWarrior @ 2006-05-26 15:55 UTC (permalink / raw)
To: pgsql-general
May I suggest you take a look at www.openldap.org and the following:
http://www.samse.fr/GPL/ldap_pg/HOWTO/
<carlosreimer@terra.com.br> wrote in message
news:PEEPKDFEHHEMKBBFPOOKCEOGCNAA.carlosreimer@terra.com.br...
> Hello,
>
> I saw many messages about ldap authentication but I´m still not sure if
> PostgreSQL can use it?
>
> Can I use it? Should I apply some patch before? Where can I find some doc
> about?
>
> Reimer
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP authentication
2006-05-26 13:16 LDAP authentication carlosreimer@terra.com.br
2006-05-26 15:55 ` Re: LDAP authentication codeWarrior <gpatnude@hotmail.com>
@ 2006-05-26 16:00 ` Scott Marlowe <smarlowe@g2switchworks.com>
1 sibling, 0 replies; 30+ messages in thread
From: Scott Marlowe @ 2006-05-26 16:00 UTC (permalink / raw)
To: codeWarrior <gpatnude@hotmail.com>; +Cc: pgsql-general
On Fri, 2006-05-26 at 10:55, codeWarrior wrote:
> May I suggest you take a look at www.openldap.org and the following:
> http://www.samse.fr/GPL/ldap_pg/HOWTO/
Note that that's more about backing LDAP with PostgreSQL, not the other
way around.
still a good faq though
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP authentication
2006-05-26 13:16 LDAP authentication carlosreimer@terra.com.br
2006-05-26 15:55 ` Re: LDAP authentication codeWarrior <gpatnude@hotmail.com>
@ 2006-05-26 16:16 ` Jorge Godoy <jgodoy@gmail.com>
1 sibling, 0 replies; 30+ messages in thread
From: Jorge Godoy @ 2006-05-26 16:16 UTC (permalink / raw)
To: pgsql-general@postgresql.org, "codeWarrior" <gpatnude@hotmail.com>
Em Sexta 26 Maio 2006 12:55, codeWarrior escreveu:
> May I suggest you take a look at www.openldap.org and the following:
> http://www.samse.fr/GPL/ldap_pg/HOWTO/
This looks like the opposite: the HOWTO above is for LDAP using PostgreSQL as
backend not PostgreSQL using LDAP to authenticate.
--
Jorge Godoy <jgodoy@gmail.com>
^ permalink raw reply [nested|flat] 30+ messages in thread
* LDAP Authentication
@ 2008-06-29 13:44 Taha Ozket <tahaozket@gmail.com>
2008-06-29 15:58 ` Re: LDAP Authentication Magnus Hagander <magnus@hagander.net>
2008-07-04 01:17 ` Re: LDAP Authentication Ron Peterson <rpeterso@mtholyoke.edu>
0 siblings, 2 replies; 30+ messages in thread
From: Taha Ozket @ 2008-06-29 13:44 UTC (permalink / raw)
To: pgsql-general
Hi,
I have a ldap group, "pgsql-developers". I have an user (user1) member
of this group;
group
dn: cn=pgsql-developers,ou=Groups,o=Dep,dc=x,dc=x,dc=x
objectClass: groupOfUniqueNames
objectClass: top
cn: SVN Committers
uniqueMember: uid=user1,ou=Users,o=Dep,dc=x,dc=x,dc=x
user
dn: uid=user1,ou=Users,o=Dep,dc=x,dc=x,dc=x
objectClass: person
objectClass: top
objectClass: uidObject
cn:: Denem1
sn:: Deneme2
uid: user1
userPassword:: e01ENX10WnhudnhscVIxZ1pIa0wzWm5ET3VnPT0=
I added this line to pg_hba.conf [1]
host all all 172.20.0.0/16 ldap
"ldap://localhost/basedn;cn=;,cn=pgsql-developers,ou=Groups,o=Dep,dc=x,dc=x,dc=x"
But now postgresql requires my user1 must be define under
cn=pgsql-developers,ou=Groups.. But I want to give login permission to
pgsql-developers members.
How can I change this line for give login permission to
pgsql-developers members?
[1] http://wiki.postgresql.org/wiki/LDAP_Authentication_against_AD
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP Authentication
2008-06-29 13:44 LDAP Authentication Taha Ozket <tahaozket@gmail.com>
@ 2008-06-29 15:58 ` Magnus Hagander <magnus@hagander.net>
2008-07-03 02:50 ` Re: LDAP Authentication Brian A. Seklecki (Mobile) <bseklecki@collaborativefusion.com>
1 sibling, 1 reply; 30+ messages in thread
From: Magnus Hagander @ 2008-06-29 15:58 UTC (permalink / raw)
To: Taha Ozket <tahaozket@gmail.com>; +Cc: pgsql-general
Taha Ozket wrote:
> Hi,
>
> I have a ldap group, "pgsql-developers". I have an user (user1) member
> of this group;
>
> group
> dn: cn=pgsql-developers,ou=Groups,o=Dep,dc=x,dc=x,dc=x
> objectClass: groupOfUniqueNames
> objectClass: top
> cn: SVN Committers
> uniqueMember: uid=user1,ou=Users,o=Dep,dc=x,dc=x,dc=x
>
> user
> dn: uid=user1,ou=Users,o=Dep,dc=x,dc=x,dc=x
> objectClass: person
> objectClass: top
> objectClass: uidObject
> cn:: Denem1
> sn:: Deneme2
> uid: user1
> userPassword:: e01ENX10WnhudnhscVIxZ1pIa0wzWm5ET3VnPT0=
>
> I added this line to pg_hba.conf [1]
>
> host all all 172.20.0.0/16 ldap
> "ldap://localhost/basedn;cn=;,cn=pgsql-developers,ou=Groups,o=Dep,dc=x,dc=x,dc=x"
>
> But now postgresql requires my user1 must be define under
> cn=pgsql-developers,ou=Groups.. But I want to give login permission to
> pgsql-developers members.
>
> How can I change this line for give login permission to
> pgsql-developers members?
This is not something you currently can do. We can only do LDAP
authentication, not authorization. There's no way to restrict it to a
particular group.
One way to accomplish what you're trying to do is to have a script that
synchronizes the members of the group to PostgreSQL accounts (account
name and role membership only), and still use LDAP for authentication.
It doesn't work in every case, but it does work in most.
//Magnus
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP Authentication
2008-06-29 13:44 LDAP Authentication Taha Ozket <tahaozket@gmail.com>
2008-06-29 15:58 ` Re: LDAP Authentication Magnus Hagander <magnus@hagander.net>
@ 2008-07-03 02:50 ` Brian A. Seklecki (Mobile) <bseklecki@collaborativefusion.com>
0 siblings, 0 replies; 30+ messages in thread
From: Brian A. Seklecki (Mobile) @ 2008-07-03 02:50 UTC (permalink / raw)
To: Magnus Hagander <magnus@hagander.net>; +Cc: Taha Ozket <tahaozket@gmail.com>; pgsql-general
On Sun, 2008-06-29 at 17:58 +0200, Magnus Hagander wrote:
> This is not something you currently can do. We can only do LDAP
> authentication, not authorization. There's no way to restrict it to a
> particular group.
We're very interested in this functionality (nss_ldap for PgSQL) -- so
if there's a joint-development effort that we can contribute man-hours
or development resources (challenge grant funding, hardware, etc.) to,
let us know.
~BAS
> One way to accomplish what you're trying to do is to have a script
> that
> synchronizes the members of the group to PostgreSQL accounts (account
> name and role membership only), and still use LDAP for authentication.
IMPORTANT: This message contains confidential information and is intended only for the individual named. If the reader of this message is not an intended recipient (or the individual responsible for the delivery of this message to an intended recipient), please be advised that any re-use, dissemination, distribution or copying of this message is prohibited. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP Authentication
2008-06-29 13:44 LDAP Authentication Taha Ozket <tahaozket@gmail.com>
@ 2008-07-04 01:17 ` Ron Peterson <rpeterso@mtholyoke.edu>
2008-07-04 01:31 ` Re: LDAP Authentication Ron Peterson <rpeterso@mtholyoke.edu>
1 sibling, 1 reply; 30+ messages in thread
From: Ron Peterson @ 2008-07-04 01:17 UTC (permalink / raw)
To: Taha Ozket <tahaozket@gmail.com>; +Cc: pgsql-general
2008-06-29_09:44:01-0400 Taha Ozket <tahaozket@gmail.com>:
> I have a ldap group, "pgsql-developers". I have an user (user1) member
> of this group;
> ...
> How can I change this line for give login permission to
> pgsql-developers members?
If you have pam available, you could do pam authentication, and
configure pam_ldap to enforce group membership.
--
Ron Peterson
Network & Systems Manager
Mount Holyoke College
http://www.mtholyoke.edu/~rpeterso
-
I wish my computer would do what I want it to do - not what I tell it to do.
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP Authentication
2008-06-29 13:44 LDAP Authentication Taha Ozket <tahaozket@gmail.com>
2008-07-04 01:17 ` Re: LDAP Authentication Ron Peterson <rpeterso@mtholyoke.edu>
@ 2008-07-04 01:31 ` Ron Peterson <rpeterso@mtholyoke.edu>
0 siblings, 0 replies; 30+ messages in thread
From: Ron Peterson @ 2008-07-04 01:31 UTC (permalink / raw)
To: pgsql-general
2008-07-03_21:17:50-0400 Ron Peterson <rpeterso@mtholyoke.edu>:
> 2008-06-29_09:44:01-0400 Taha Ozket <tahaozket@gmail.com>:
>
> > I have a ldap group, "pgsql-developers". I have an user (user1) member
> > of this group;
> > ...
> > How can I change this line for give login permission to
> > pgsql-developers members?
>
> If you have pam available, you could do pam authentication, and
> configure pam_ldap to enforce group membership.
ps - FWIW, I typically make group membership an attribute of the user
object itself, rather than maintain groups objects and user objects
separately. Primarily because many apps aren't sophisticated enough to
deal with having them separated.
--
Ron Peterson
Network & Systems Manager
Mount Holyoke College
http://www.mtholyoke.edu/~rpeterso
-
I wish my computer would do what I want it to do - not what I tell it to do.
^ permalink raw reply [nested|flat] 30+ messages in thread
* LDAP Authentication
@ 2015-04-22 18:37 Joseph Kregloh <jkregloh@sproutloud.com>
2015-04-22 21:30 ` Re: LDAP Authentication John R Pierce <pierce@hogranch.com>
0 siblings, 1 reply; 30+ messages in thread
From: Joseph Kregloh @ 2015-04-22 18:37 UTC (permalink / raw)
To: pgsql-general
I am currently setting up various environments to allow our developers to
login to Postgresql using their LDAP password. Also limiting the servers
they can access.
I have successfully setup LDAP and setup simple authentication using simple
bind. This was my test case. Now I need to move to the next lever which
would be search and bind. This will allow me to grant access to particular
servers for some people. I am not sure where or how the ldapsearchattibute
comes into play.
For example, this would be the search filter I will
use: (&(objectClass=posixAccount)(uid=$username)(|(host=$hostname)(host=$fqdn)(host=\\*)))
So it makes sure that the object class is possixAccount and the user id is
$username, next match is, host = $hostname or host = $fqdn or host = *.
These are attributes on the user's account.
How will Postgres match the username? How does it pass it to the query,
everything else I can hardcode into the search filter.
Would an ldapurl be better here? But again how will I pass the uid to the
ldapurl?
Thanks,
-Joseph Kregloh
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP Authentication
2015-04-22 18:37 LDAP Authentication Joseph Kregloh <jkregloh@sproutloud.com>
@ 2015-04-22 21:30 ` John R Pierce <pierce@hogranch.com>
2015-04-22 21:57 ` Re: LDAP Authentication Joseph Kregloh <jkregloh@sproutloud.com>
0 siblings, 1 reply; 30+ messages in thread
From: John R Pierce @ 2015-04-22 21:30 UTC (permalink / raw)
To: pgsql-general
On 4/22/2015 11:37 AM, Joseph Kregloh wrote:
> I have successfully setup LDAP and setup simple authentication using
> simple bind. This was my test case. Now I need to move to the next
> lever which would be search and bind. This will allow me to grant
> access to particular servers for some people. I am not sure where or
> how the ldapsearchattibute comes into play.
>
you would do this by CREATE USER on the various servers for those
people, along with GRANT. LDAP only provides authentication, it doesn't
manage authorization.
--
john r pierce, recycling bits in santa cruz
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP Authentication
2015-04-22 18:37 LDAP Authentication Joseph Kregloh <jkregloh@sproutloud.com>
2015-04-22 21:30 ` Re: LDAP Authentication John R Pierce <pierce@hogranch.com>
@ 2015-04-22 21:57 ` Joseph Kregloh <jkregloh@sproutloud.com>
2015-04-22 22:06 ` Re: LDAP Authentication John R Pierce <pierce@hogranch.com>
0 siblings, 1 reply; 30+ messages in thread
From: Joseph Kregloh @ 2015-04-22 21:57 UTC (permalink / raw)
To: John R Pierce <pierce@hogranch.com>; +Cc: pgsql-general
On Wed, Apr 22, 2015 at 5:30 PM, John R Pierce <pierce@hogranch.com> wrote:
> On 4/22/2015 11:37 AM, Joseph Kregloh wrote:
>
>> I have successfully setup LDAP and setup simple authentication using
>> simple bind. This was my test case. Now I need to move to the next lever
>> which would be search and bind. This will allow me to grant access to
>> particular servers for some people. I am not sure where or how the
>> ldapsearchattibute comes into play.
>>
>>
>
> you would do this by CREATE USER on the various servers for those people,
> along with GRANT. LDAP only provides authentication, it doesn't manage
> authorization.
>
>
I see. That would still require a manual process to create the user on each
server. I was planing on using some already existing scripts to create the
user automatically on all servers and then LDAP would authorize depending
on attributes in their LDAP profile.
> --
> john r pierce, recycling bits in santa cruz
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP Authentication
2015-04-22 18:37 LDAP Authentication Joseph Kregloh <jkregloh@sproutloud.com>
2015-04-22 21:30 ` Re: LDAP Authentication John R Pierce <pierce@hogranch.com>
2015-04-22 21:57 ` Re: LDAP Authentication Joseph Kregloh <jkregloh@sproutloud.com>
@ 2015-04-22 22:06 ` John R Pierce <pierce@hogranch.com>
2015-04-23 07:08 ` Re: LDAP Authentication Rafal Pietrak <rafal@ztk-rp.eu>
0 siblings, 1 reply; 30+ messages in thread
From: John R Pierce @ 2015-04-22 22:06 UTC (permalink / raw)
To: pgsql-general
On 4/22/2015 2:57 PM, Joseph Kregloh wrote:
>
>
>
> I see. That would still require a manual process to create the user on
> each server. I was planing on using some already existing scripts to
> create the user automatically on all servers and then LDAP would
> authorize depending on attributes in their LDAP profile.
but thats not how it works, so all the 'planing' in the world won't
change a thing.
access rights per database are managed with GRANT, users must be CREATE
USER on each server regardless of how they are authenticated.
--
john r pierce, recycling bits in santa cruz
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP Authentication
2015-04-22 18:37 LDAP Authentication Joseph Kregloh <jkregloh@sproutloud.com>
2015-04-22 21:30 ` Re: LDAP Authentication John R Pierce <pierce@hogranch.com>
2015-04-22 21:57 ` Re: LDAP Authentication Joseph Kregloh <jkregloh@sproutloud.com>
2015-04-22 22:06 ` Re: LDAP Authentication John R Pierce <pierce@hogranch.com>
@ 2015-04-23 07:08 ` Rafal Pietrak <rafal@ztk-rp.eu>
0 siblings, 0 replies; 30+ messages in thread
From: Rafal Pietrak @ 2015-04-23 07:08 UTC (permalink / raw)
To: pgsql-general
W dniu 23.04.2015 o 00:06, John R Pierce pisze:
> On 4/22/2015 2:57 PM, Joseph Kregloh wrote:
>>
>>
>>
>> I see. That would still require a manual process to create the user
>> on each server. I was planing on using some already existing scripts
>> to create the user automatically on all servers and then LDAP would
>> authorize depending on attributes in their LDAP profile.
>
> but thats not how it works, so all the 'planing' in the world won't
> change a thing.
>
> access rights per database are managed with GRANT, users must be
> CREATE USER on each server regardless of how they are authenticated.
>
As I understand:
1. postgresql maintains whatever's GRANTed within its system tables.
2. postgresql supports DBLINK
<whatif>
there was a way to supplement (join) system rights table with DBLINKed LDAP?
</whatif>
-R
^ permalink raw reply [nested|flat] 30+ messages in thread
* LDAP Authentication
@ 2023-08-21 08:42 Roger Tannous <roger.tannous@gmail.com>
2023-08-21 09:05 ` Re: LDAP Authentication Emile Amewoto <emileam@yahoo.com>
0 siblings, 1 reply; 30+ messages in thread
From: Roger Tannous @ 2023-08-21 08:42 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hello,
In section 21.10 LDAP Authentication
<https://www.postgresql.org/docs/current/auth-ldap.html; of the
documentation, it says that the DB *user must already exist in the database
before LDAP can be used for authentication*.
I'm checking the possibility to use LDAP Authentication with Postgres, but
I'm confused about the user creation that must be initially done regarding
the value of the password.
Suppose I create user_x with pass_x, this user will be able to connect to
the DB using these credentials and, of course, depending on the role
assigned to them.
But once I configure LDAP authentication on the database server, user_x has
to connect to the database according to whatever is set up in LDAP, and the
initially configured password becomes obsolete ? Is that correct ?
Thank you in advance,
Roger
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP Authentication
2023-08-21 08:42 LDAP Authentication Roger Tannous <roger.tannous@gmail.com>
@ 2023-08-21 09:05 ` Emile Amewoto <emileam@yahoo.com>
2023-08-24 19:06 ` Re: LDAP Authentication Stephen Frost <sfrost@snowman.net>
0 siblings, 1 reply; 30+ messages in thread
From: Emile Amewoto @ 2023-08-21 09:05 UTC (permalink / raw)
To: Roger Tannous <roger.tannous@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
Hi Roger,
Here is the high level process:
1- Create the user x without password in Postgres.
2- Assign role or roles to the user x
3- Update pg_hba.conf with the ldap connection link.
You might need cert for the ldap to connect to AD, assuming you are using AD.
Regards,
Emile
> On 21 Aug 2023, at 10:42, Roger Tannous <roger.tannous@gmail.com> wrote:
>
> Hello,
>
> In section 21.10 LDAP Authentication <https://www.postgresql.org/docs/current/auth-ldap.html; of the documentation, it says that the DB user must already exist in the database before LDAP can be used for authentication.
>
> I'm checking the possibility to use LDAP Authentication with Postgres, but I'm confused about the user creation that must be initially done regarding the value of the password.
>
> Suppose I create user_x with pass_x, this user will be able to connect to the DB using these credentials and, of course, depending on the role assigned to them.
>
> But once I configure LDAP authentication on the database server, user_x has to connect to the database according to whatever is set up in LDAP, and the initially configured password becomes obsolete ? Is that correct ?
>
>
> Thank you in advance,
> Roger
>
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP Authentication
2023-08-21 08:42 LDAP Authentication Roger Tannous <roger.tannous@gmail.com>
2023-08-21 09:05 ` Re: LDAP Authentication Emile Amewoto <emileam@yahoo.com>
@ 2023-08-24 19:06 ` Stephen Frost <sfrost@snowman.net>
2023-08-25 08:33 ` Re: LDAP Authentication Dominique Devienne <ddevienne@gmail.com>
0 siblings, 1 reply; 30+ messages in thread
From: Stephen Frost @ 2023-08-24 19:06 UTC (permalink / raw)
To: Emile Amewoto <emileam@yahoo.com>; +Cc: Roger Tannous <roger.tannous@gmail.com>; pgsql-general@lists.postgresql.org
Greetings,
* Emile Amewoto (emileam@yahoo.com) wrote:
> Here is the high level process:
> 1- Create the user x without password in Postgres.
> 2- Assign role or roles to the user x
> 3- Update pg_hba.conf with the ldap connection link.
>
> You might need cert for the ldap to connect to AD, assuming you are using AD.
If you're using AD, you should *really* be using Kerberos/gssapi for
your authentication and *not* LDAP. LDAP is insecure as it involves
passing around the user's credentials which is extremely bad practice
and is strongly discouraged. LDAP auth also involves in-line round
trips to the LDAP server which can delay or even fail database
connections in the event that the LDAP server is even temporarily
unavailable.
Thanks,
Stephen
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP Authentication
2023-08-21 08:42 LDAP Authentication Roger Tannous <roger.tannous@gmail.com>
2023-08-21 09:05 ` Re: LDAP Authentication Emile Amewoto <emileam@yahoo.com>
2023-08-24 19:06 ` Re: LDAP Authentication Stephen Frost <sfrost@snowman.net>
@ 2023-08-25 08:33 ` Dominique Devienne <ddevienne@gmail.com>
2023-08-25 13:09 ` Re: LDAP Authentication Stephen Frost <sfrost@snowman.net>
0 siblings, 1 reply; 30+ messages in thread
From: Dominique Devienne @ 2023-08-25 08:33 UTC (permalink / raw)
To: Stephen Frost <sfrost@snowman.net>; +Cc: Emile Amewoto <emileam@yahoo.com>; Roger Tannous <roger.tannous@gmail.com>; pgsql-general@lists.postgresql.org
On Thu, Aug 24, 2023 at 10:07 PM Stephen Frost <sfrost@snowman.net> wrote:
> Greetings,
>
> * Emile Amewoto (emileam@yahoo.com) wrote:
> > Here is the high level process:
> > 1- Create the user x without password in Postgres.
> > 2- Assign role or roles to the user x
> > 3- Update pg_hba.conf with the ldap connection link.
> >
> > You might need cert for the ldap to connect to AD, assuming you are
> using AD.
>
> If you're using AD, you should *really* be using Kerberos/gssapi for
> your authentication and *not* LDAP. LDAP is insecure as it involves
> passing around the user's credentials which is extremely bad practice
> and is strongly discouraged. LDAP auth also involves in-line round
> trips to the LDAP server which can delay or even fail database
> connections in the event that the LDAP server is even temporarily
> unavailable.
>
Hi. Sorry, will probably be a stupid question, since these Auth issues are
way outside my expertise...
But as part of a team that wants to hook PostgreSQL to the company's
Windows AD, could you please
provide more info on how to configure the alternative you suggest should be
used instead?
Are you saying AD already "speaks" Kerberos/GSSAPI, and instead of
configuring LDAP in hba.conf,
one should configure GSSAPI instead? As "simple" as that?
What about SSO? Can the local creds / token from the already-AD-connected
local OS user be extracted,
so the user doesn't need to supply any password, not even the AD-one?
We've successfully tested LDAP with PostgreSQL in the past (on a test AD,
not the "real" one though).
Regarding your second point about availability of the LDAP server, isn't
that normal to fail connecting
when Auth cannot be ascertained / verified? Kerberos/GSSAPI somehow main
some cache to avoid that?
Given that caching is often more trouble than it's worth, how is that
better? Naïve question, really. --DD
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP Authentication
2023-08-21 08:42 LDAP Authentication Roger Tannous <roger.tannous@gmail.com>
2023-08-21 09:05 ` Re: LDAP Authentication Emile Amewoto <emileam@yahoo.com>
2023-08-24 19:06 ` Re: LDAP Authentication Stephen Frost <sfrost@snowman.net>
2023-08-25 08:33 ` Re: LDAP Authentication Dominique Devienne <ddevienne@gmail.com>
@ 2023-08-25 13:09 ` Stephen Frost <sfrost@snowman.net>
2023-08-25 15:19 ` Re: LDAP Authentication Dominique Devienne <ddevienne@gmail.com>
0 siblings, 1 reply; 30+ messages in thread
From: Stephen Frost @ 2023-08-25 13:09 UTC (permalink / raw)
To: Dominique Devienne <ddevienne@gmail.com>; +Cc: Emile Amewoto <emileam@yahoo.com>; Roger Tannous <roger.tannous@gmail.com>; pgsql-general@lists.postgresql.org
Greetings,
* Dominique Devienne (ddevienne@gmail.com) wrote:
> On Thu, Aug 24, 2023 at 10:07 PM Stephen Frost <sfrost@snowman.net> wrote:
> > * Emile Amewoto (emileam@yahoo.com) wrote:
> > > Here is the high level process:
> > > 1- Create the user x without password in Postgres.
> > > 2- Assign role or roles to the user x
> > > 3- Update pg_hba.conf with the ldap connection link.
> > >
> > > You might need cert for the ldap to connect to AD, assuming you are
> > using AD.
> >
> > If you're using AD, you should *really* be using Kerberos/gssapi for
> > your authentication and *not* LDAP. LDAP is insecure as it involves
> > passing around the user's credentials which is extremely bad practice
> > and is strongly discouraged. LDAP auth also involves in-line round
> > trips to the LDAP server which can delay or even fail database
> > connections in the event that the LDAP server is even temporarily
> > unavailable.
> But as part of a team that wants to hook PostgreSQL to the company's
> Windows AD, could you please
> provide more info on how to configure the alternative you suggest should be
> used instead?
https://www.crunchydata.com/blog/windows-active-directory-postgresql-gssapi-kerberos-authentication
> Are you saying AD already "speaks" Kerberos/GSSAPI, and instead of
> configuring LDAP in hba.conf,
> one should configure GSSAPI instead? As "simple" as that?
(just fyi- while they're not exactly the same, where I say 'Kerberos'
below, you can think of it as GSSAPI, Kerberos, or Kerberos/GSSAPI)
More-or-less. Windows AD uses Kerberos/GSSAPI already for tons of
authentication- when you log into a AD connected system, that's
Kerberos, when you connect to an IIS site in an AD environment and
automatically get authenticated, that's Kerberos (and Negotiate to wrap
it, but still), when you connect to SQL Server, again, Kerberos.
The "pass-the-password" LDAP-based auth method is just about exclusively
used for 3rd-party non-Kerberos-speaking services. When you have the
option to use Kerberos, you absolutely should.
> What about SSO? Can the local creds / token from the already-AD-connected
> local OS user be extracted,
> so the user doesn't need to supply any password, not even the AD-one?
Kerberos *is* the true SSO that you're looking for- when you sign into
any AD connected system (eg: your laptop), you get Kerberos credentials
(run 'klist' at a cmd prompt sometime..) and you don't have to provide
your password again for any Kerberos authentication until/unless your
Kerberos tickets (acquired when you logged into the laptop) expire.
With the LDAP auth method, the user has to provide their AD password on
every connection to authenticate, or worse, save their AD password for
connection in some local file so they don't have to type it in every
time. That password is then also sent to the PG server on every
connection, meaning that if the PG server is compromised, the account of
every user who logs into that PG server is then also compromised- their
full AD account.
> Regarding your second point about availability of the LDAP server, isn't
> that normal to fail connecting
> when Auth cannot be ascertained / verified? Kerberos/GSSAPI somehow main
> some cache to avoid that?
Kerberos tickets are acquired from the AD when you log into your laptop.
Those tickets will have some lifetime (which you can configure, but
tends to be 8-10 hours or so). When you connect to a Kerberos service,
the system will automatically reach out to the AD to obtain a ticket for
that service (eg, a PostgreSQL ticket, for your account) which will also
have a specific lifetime. When you connect to PostgreSQL, the PG server
is able to verify your identity based on the ticket you present- the PG
server never has to reach out to the AD system for user authentication.
For as long as the PostgreSQL ticket that you acquired when you first
connected to the PG server is valid (again, typically 8-10 hours, but
you can configure it), the AD server is no longer involved and doesn't
need to be contacted, no matter how many subsequent connections you make
to the PG server.
Note that Kerberos is all about authentication- not about authorization.
There's a few different tools out there for sync'ing users from AD into
PostgreSQL and those can be used to manage who is authorized for a given
PG server, including removing their authorization in a relatively short
period of time if needed (more-or-less how often you feel like running
the sync'ing cronjob or such). I do think it'd be pretty cool to
improve on that with a way for PG to reach out to an AD system and run a
query and then track the changes to that query (LDAP has support for
this kind of thing) which would make changes to, eg, group membership in
AD propagate to the PG server in pretty close to real-time. Sadly, I'm
not aware of anyone actively working on that though.
> Given that caching is often more trouble than it's worth, how is that
> better? Naïve question, really. --DD
This one I find pretty curious given that cacheing is a very large part
of what PostgreSQL does and is certainly quite worth it. ;)
Thanks,
Stephen
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 30+ messages in thread
* Re: LDAP Authentication
2023-08-21 08:42 LDAP Authentication Roger Tannous <roger.tannous@gmail.com>
2023-08-21 09:05 ` Re: LDAP Authentication Emile Amewoto <emileam@yahoo.com>
2023-08-24 19:06 ` Re: LDAP Authentication Stephen Frost <sfrost@snowman.net>
2023-08-25 08:33 ` Re: LDAP Authentication Dominique Devienne <ddevienne@gmail.com>
2023-08-25 13:09 ` Re: LDAP Authentication Stephen Frost <sfrost@snowman.net>
@ 2023-08-25 15:19 ` Dominique Devienne <ddevienne@gmail.com>
0 siblings, 0 replies; 30+ messages in thread
From: Dominique Devienne @ 2023-08-25 15:19 UTC (permalink / raw)
To: Stephen Frost <sfrost@snowman.net>; +Cc: Emile Amewoto <emileam@yahoo.com>; Roger Tannous <roger.tannous@gmail.com>; pgsql-general@lists.postgresql.org
On Fri, Aug 25, 2023 at 3:09 PM Stephen Frost <sfrost@snowman.net> wrote:
Hi Stephen. Thanks for taking the time to make such a detailed response.
* Dominique Devienne (ddevienne@gmail.com) wrote:
> > could you please provide more info on [...]
>
>
> https://www.crunchydata.com/blog/windows-active-directory-postgresql-gssapi-kerberos-authentication
Thanks. We'll study that.
The "pass-the-password" LDAP-based auth method is just about exclusively
> used for 3rd-party non-Kerberos-speaking services. When you have the
> option to use Kerberos, you absolutely should.
>
OK.
> > What about SSO? Can the local creds / token from the already-AD-connected
> > local OS user be extracted,
> > so the user doesn't need to supply any password, not even the AD-one?
>
> Kerberos *is* the true SSO that you're looking for- when you sign into
> any AD connected system (eg: your laptop), you get Kerberos credentials
> (run 'klist' at a cmd prompt sometime..) and you don't have to provide
> your password again for any Kerberos authentication until/unless your
> Kerberos tickets (acquired when you logged into the laptop) expire.
>
Oh, `klist` even works on my Win10 and Win11 boxes, and also on RH 7.5.
Interesting. Didn't about that one.
With the LDAP auth method, the user has to provide their AD password on
> every connection to authenticate, or worse, save their AD password for
> connection in some local file so they don't have to type it in every
> time. That password is then also sent to the PG server on every
> connection, meaning that if the PG server is compromised, the account of
> every user who logs into that PG server is then also compromised- their
> full AD account.
>
Ouch. Indeed.
> > Regarding your second point about availability of the LDAP server, isn't
> > that normal to fail connecting
> > when Auth cannot be ascertained / verified? Kerberos/GSSAPI somehow main
> > some cache to avoid that?
>
> Kerberos tickets are acquired from the AD when you log into your laptop.
> Those tickets will have some lifetime (which you can configure, but
> tends to be 8-10 hours or so). When you connect to a Kerberos service,
> the system will automatically reach out to the AD to obtain a ticket for
> that service (eg, a PostgreSQL ticket, for your account) which will also
> have a specific lifetime. When you connect to PostgreSQL, the PG server
> is able to verify your identity based on the ticket you present- the PG
> server never has to reach out to the AD system for user authentication.
> For as long as the PostgreSQL ticket that you acquired when you first
> connected to the PG server is valid (again, typically 8-10 hours, but
> you can configure it), the AD server is no longer involved and doesn't
> need to be contacted, no matter how many subsequent connections you make
> to the PG server.
>
I get it. Very insightful, again, thanks.
I'm familiar with JWT tokens, and the concepts seem similar.
> Note that Kerberos is all about authentication- not about authorization.
> There's a few different tools out there for sync'ing users from AD into
> PostgreSQL and those can be used to manage who is authorized for a given
> PG server, including removing their authorization in a relatively short
> period of time if needed (more-or-less how often you feel like running
> the sync'ing cronjob or such). I do think it'd be pretty cool to
> improve on that with a way for PG to reach out to an AD system and run a
> query and then track the changes to that query (LDAP has support for
> this kind of thing) which would make changes to, eg, group membership in
> AD propagate to the PG server in pretty close to real-time. Sadly, I'm
> not aware of anyone actively working on that though.
>
Yes, having worked with Oracle in the past, I've read about such
"enterprise" tools.
Having the manually add AD users to the cluster is indeed a bit of a PITA,
and also something I had wondered about.
> Given that caching is often more trouble than it's worth, how is that
> > better? Naïve question, really. --DD
>
> This one I find pretty curious given that cacheing is a very large part
> of what PostgreSQL does and is certainly quite worth it. ;)
>
Sure :). Caching is the easy part. But proper cache invalidation is tough!
I've seen too many faulty caching, to avoid talking to the DB for example,
often from using "naive" DB access/SQL/etc... that I tend to be weary of
such caching :)
Not all organizations have the high degree of code quality of the
PostgreSQL project...
For the N'th time, thanks a bunch Stephen. Cheers, --DD
^ permalink raw reply [nested|flat] 30+ messages in thread
end of thread, other threads:[~2023-08-25 15:19 UTC | newest]
Thread overview: 30+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-10-23 19:38 LDAP authentication Richard Ray <rray1@netdoor.com>
2002-10-23 20:29 ` Tommi Mäkitalo <t.maekitalo@epgmbh.de>
1970-01-01 00:00 ` Fathi Ben Nasr <fathi.engineer@gnet.tn>
2002-10-23 21:26 ` Richard Ray <rray1@netdoor.com>
2002-10-24 10:06 ` Tommi Maekitalo <t.maekitalo@epgmbh.de>
2002-10-23 20:55 ` Ray Hunter <shunter@venticon.com>
2002-10-28 23:53 ` Evert Carton <evertcarton@netscape.net>
2002-10-23 20:56 ` Ray Hunter <rhunter@venticon.com>
2006-05-26 01:06 LDAP authentication carlos.reimer@opendb.com.br
2006-05-26 13:16 LDAP authentication carlosreimer@terra.com.br
2006-05-26 13:44 ` Florian G. Pflug <fgp@phlo.org>
2006-05-26 15:55 ` codeWarrior <gpatnude@hotmail.com>
2006-05-26 16:00 ` Scott Marlowe <smarlowe@g2switchworks.com>
2006-05-26 16:16 ` Jorge Godoy <jgodoy@gmail.com>
2008-06-29 13:44 LDAP Authentication Taha Ozket <tahaozket@gmail.com>
2008-06-29 15:58 ` Re: LDAP Authentication Magnus Hagander <magnus@hagander.net>
2008-07-03 02:50 ` Re: LDAP Authentication Brian A. Seklecki (Mobile) <bseklecki@collaborativefusion.com>
2008-07-04 01:17 ` Re: LDAP Authentication Ron Peterson <rpeterso@mtholyoke.edu>
2008-07-04 01:31 ` Re: LDAP Authentication Ron Peterson <rpeterso@mtholyoke.edu>
2015-04-22 18:37 LDAP Authentication Joseph Kregloh <jkregloh@sproutloud.com>
2015-04-22 21:30 ` Re: LDAP Authentication John R Pierce <pierce@hogranch.com>
2015-04-22 21:57 ` Re: LDAP Authentication Joseph Kregloh <jkregloh@sproutloud.com>
2015-04-22 22:06 ` Re: LDAP Authentication John R Pierce <pierce@hogranch.com>
2015-04-23 07:08 ` Re: LDAP Authentication Rafal Pietrak <rafal@ztk-rp.eu>
2023-08-21 08:42 LDAP Authentication Roger Tannous <roger.tannous@gmail.com>
2023-08-21 09:05 ` Re: LDAP Authentication Emile Amewoto <emileam@yahoo.com>
2023-08-24 19:06 ` Re: LDAP Authentication Stephen Frost <sfrost@snowman.net>
2023-08-25 08:33 ` Re: LDAP Authentication Dominique Devienne <ddevienne@gmail.com>
2023-08-25 13:09 ` Re: LDAP Authentication Stephen Frost <sfrost@snowman.net>
2023-08-25 15:19 ` Re: LDAP Authentication Dominique Devienne <ddevienne@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox