Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l0Pmw-0005gI-PA for pgsql-general@arkaria.postgresql.org; Fri, 15 Jan 2021 14:09:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l0Pmv-0007lW-LJ for pgsql-general@arkaria.postgresql.org; Fri, 15 Jan 2021 14:09:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l0Pmv-0007lO-Am for pgsql-general@lists.postgresql.org; Fri, 15 Jan 2021 14:09:17 +0000 Received: from mx3.stadt-zuerich.ch ([194.56.33.12]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l0Pms-0001eD-MH for pgsql-general@postgresql.org; Fri, 15 Jan 2021 14:09:16 +0000 IronPort-SDR: jvEEDHDB58xiRtvArnnCazZqXRz7Z+ufGgz+3CnT4Knq6POXiSwhhINE5KiBbQRZzlx3KQD+C1 LtWrZ+DjghYC8bxgKzfKH2Hc4o1WZd9CRM4n37QOBQmkYrET3mAKh/7iV8J3shpFPXo4gloKm0 LsLIjsBnyJrCI0tq9MANrWN9e3m/RAr6x67P5eGhx94xKe44TC4MkPQ9VaRkcs0kD2rk119HR6 4Kt04H3NE24S4ohm1p88ORTcnbrrAjkPQ4vH4JS+eiy53a9fDKNg2lq7kvtRtMbFgak3UUYvb5 R7Q= X-IronPort-AV: E=Sophos;i="5.79,349,1602540000"; d="scan'208,217";a="37829784" Received: from unknown (HELO SZHM27376.global.szh.loc) ([10.7.50.80]) by mx3.prm.szh.zone with ESMTP/TLS/AES256-GCM-SHA384; 15 Jan 2021 15:09:14 +0100 Received: from SZHM27370.global.szh.loc (10.7.50.50) by SZHM27376.global.szh.loc (10.7.50.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Fri, 15 Jan 2021 15:09:13 +0100 Received: from SZHM27370.global.szh.loc ([fe80::2839:247b:c8d4:9198]) by SZHM27370.global.szh.loc ([fe80::2839:247b:c8d4:9198%10]) with mapi id 15.01.2044.004; Fri, 15 Jan 2021 15:09:13 +0100 From: "Zwettler Markus (OIZ)" To: "pgsql-general@postgresql.org" Subject: ldap connection parameter lookup Thread-Topic: ldap connection parameter lookup Thread-Index: AdbrR9w7qnV5D4AHQLeCfaudU/w/8g== Date: Fri, 15 Jan 2021 14:09:13 +0000 Message-ID: Accept-Language: de-CH, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.7.48.250] Content-Type: multipart/alternative; boundary="_000_fec12c17f0f34823a4c580649083625ezuerichch_" MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_fec12c17f0f34823a4c580649083625ezuerichch_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 li= ke: [mydatabase] ldap://ldap.mycompany.com/dc=3Dmycompany,dc=3Dcom?description?one?(cn=3Dmyd= atabase) or is there also some kind of generic variant like this (meaning lookup con= nection parameters for the database name I tell you somehow): [${PGDATABASE}] ldap://ldap.mycompany.com/dc=3Dmycompany,dc=3Dcom?description?one?(cn=3D${P= GDATABASE}) Thanks, Markus --_000_fec12c17f0f34823a4c580649083625ezuerichch_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

 

I wa= nt to use ldap to lookup the connection parameters:

https://www.postgresql.org/docs/12/libpq-ld= ap.html

 

 

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

 

[mydatabase]<= /p>

ldap://ldap.mycompany.com/dc=3Dmyc= ompany,dc=3Dcom?description?one?(cn=3Dmydatabase)

 

 

or is there also some kind of gene= ric variant like this (meaning lookup connection parameters for the databas= e name I tell you somehow):

 

[${PGDATABASE}]<= /p>

ldap://ldap.mycompany.com/dc=3Dmyc= ompany,dc=3Dcom?description?one?(cn=3D${PGDATABASE})

 

 

Thanks, Markus

 

--_000_fec12c17f0f34823a4c580649083625ezuerichch_--