pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ldap connection parameter lookup
2+ messages / 2 participants
[nested] [flat]

* ldap connection parameter lookup
@ 2021-01-15 14:09  Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
  0 siblings, 1 reply; 2+ messages in thread

From: Zwettler Markus (OIZ) @ 2021-01-15 14:09 UTC (permalink / raw)
  To: pgsql-general

Hi,


I want to use ldap to lookup the connection parameters:
https://www.postgresql.org/docs/12/libpq-ldap.html


Do I have to create one static entry per database within pg_service.conf like:

[mydatabase]
ldap://ldap.mycompany.com/dc=mycompany,dc=com?description?one?(cn=mydatabase)


or is there also some kind of generic variant like this (meaning lookup connection parameters for the database name I tell you somehow):

[${PGDATABASE}]
ldap://ldap.mycompany.com/dc=mycompany,dc=com?description?one?(cn=${PGDATABASE})


Thanks, Markus

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: ldap connection parameter lookup
@ 2021-01-15 16:20  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
  0 siblings, 0 replies; 2+ messages in thread

From: Laurenz Albe @ 2021-01-15 16:20 UTC (permalink / raw)
  To: Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>; pgsql-general

On Fri, 2021-01-15 at 14:09 +0000, Zwettler Markus (OIZ) wrote: 
> I want to use ldap to lookup the connection parameters:
> https://www.postgresql.org/docs/12/libpq-ldap.html
>  
>  
> Do I have to create one static entry per database within pg_service.conf like:
>  
> [mydatabase]
> ldap://ldap.mycompany.com/dc=mycompany,dc=com?description?one?(cn=mydatabase)
>  
>  
> or is there also some kind of generic variant like this (meaning lookup connection parameters for the database name I tell you somehow):
>  
> [${PGDATABASE}]
> ldap://ldap.mycompany.com/dc=mycompany,dc=com?description?one?(cn=${PGDATABASE})

I proposed something like that a while ago:
https://postgr.es/m/D960CB61B694CF459DCFB4B0128514C2F3442B%40exadv11.host.magwien.gv.at
but it was rejected.

Perhaps you could come up with a better version.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-01-15 16:20 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15 14:09 ldap connection parameter lookup Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
2021-01-15 16:20 ` Laurenz Albe <laurenz.albe@cybertec.at>

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