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 1l0Rq2-00018a-Tj for pgsql-general@arkaria.postgresql.org; Fri, 15 Jan 2021 16:20:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l0Rq1-00087A-SB for pgsql-general@arkaria.postgresql.org; Fri, 15 Jan 2021 16:20:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l0Rq1-000873-L2 for pgsql-general@lists.postgresql.org; Fri, 15 Jan 2021 16:20:37 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l0Rpz-0000nR-66 for pgsql-general@postgresql.org; Fri, 15 Jan 2021 16:20:36 +0000 Received: by mail-ej1-x62f.google.com with SMTP id f4so14095753ejx.7 for ; Fri, 15 Jan 2021 08:20:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=GYSsypgCmub2omutIvNckeWZod+SrIy8uN3XqvJipoA=; b=PvCj+gm5tcV72RUNco/rlcINj724fxPlREVMZafVNZDT1dLshtm2jC6hfSFuxPvY/e iDKxZnxU4iARhe8WVF9cdRufJphDb6q1Dpket2GRGQ60LCpAtC4w+ThNGxWIC+BnT9ch M89ETthjP5SWwLgwsB1onO9yRkadmr8a4I5/Y1M6OwbmkBRoOfrmuCqqajQt8Iiu8ttU aoRF2wT+MnZk1HqjQGIRu7wHLpIHW8DkskIfF7k6btrm4uvT12CT5+mrfY+1KD+dP7Sx IC2RrmYjkZvYCBD3ssyYWW+msx8UVLWduyari74/wsky2qqh93dV1Ct3Z18tYOzNb23L dsTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=GYSsypgCmub2omutIvNckeWZod+SrIy8uN3XqvJipoA=; b=aQNcNDlpt6BCeVmwCfJnz3iNjnqQWe2D6+2YheRmd/8R5V+eA6YIzJfoUo22IZ8+pU Z0mk34BkAIixgxp/SwQl43vkgaslIs6vVArXk5z4O5C+bl3KAYwctfoMnZs6CycgdnvC 1TZsAuno2Ls9hEg7miIgqVkvzAjTNsO7eWL+xQWSeDd149ViF/rgKtTsAJXk2ERzksG1 8WyPVoT3KZWgMPKYKtpPnIHC9HuBXf0E2ZaIaVelaCX7aDAZnpWPg+gsydxc9LC847Ai 6C6wIbe6G38ZOaPQGo7L0N9nAF9QaTWnGSO9QCPwR+0msga5K2FE+dT0YRy+bwjGoAUe jFFg== X-Gm-Message-State: AOAM533vSYH0Hn75lv2lWa0CnN9JX+d19OiQ24/YYf0mz6JHKL0v+V4T +Kp5uclJgOeFY6+LKdBSriohtA== X-Google-Smtp-Source: ABdhPJzEoQoBR1TdARU+d7fKCmdjQEqCj38XaElf8KP55hnHxAcMjhgklabzXHzkJ0Lmm+xQEu2Yvw== X-Received: by 2002:a17:906:1194:: with SMTP id n20mr9205614eja.269.1610727633575; Fri, 15 Jan 2021 08:20:33 -0800 (PST) Received: from localhost.localdomain (217-149-170-31.nat.highway.telekom.at. [217.149.170.31]) by smtp.gmail.com with ESMTPSA id z26sm4245245edl.71.2021.01.15.08.20.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 08:20:33 -0800 (PST) Message-ID: Subject: Re: ldap connection parameter lookup From: Laurenz Albe To: "Zwettler Markus (OIZ)" , "pgsql-general@postgresql.org" Date: Fri, 15 Jan 2021 17:20:32 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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