From marcos@f10.com.br Mon Nov 11 13:26:49 2019 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iU9ic-0005KS-Te for pgsql-general@arkaria.postgresql.org; Mon, 11 Nov 2019 13:26:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iU9ib-0002Ne-96 for pgsql-general@arkaria.postgresql.org; Mon, 11 Nov 2019 13:26:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iU9ia-0002NX-VE for pgsql-general@lists.postgresql.org; Mon, 11 Nov 2019 13:26:57 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iU9iV-0004pY-V8 for pgsql-general@postgresql.org; Mon, 11 Nov 2019 13:26:55 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 9BE6C189C121D for ; Mon, 11 Nov 2019 06:26:49 -0700 (MST) Date: Mon, 11 Nov 2019 06:26:49 -0700 (MST) From: PegoraroF10 To: pgsql-general@postgresql.org Message-ID: <1573478809636-0.post@n3.nabble.com> Subject: security on user for replication MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_147095_792094158.1573478809636" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_147095_792094158.1573478809636 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable We use replication with publication/subsctription. It=C2=B4s ok, works fine= . But if I go to my replica server and do select * from pg_subscription=20 on field subconninfo I have all properties to connect. host, port, user, password and dbname, all these info are available. Documentation says user for replication is equivalent to a superuser and must have the login attribute. If this user has all this power and using that select on replica all that info is available ... How can I hide that info from users which are connected to my replica serve= r or=20 If it=C2=B4s possible to have a replication user with not superuser rights = or with NoLogin -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.h= tml ------=_Part_147095_792094158.1573478809636 Content-Type: text/html; charset=UTF8 Content-Transfer-Encoding: quoted-printable We use replication with publication/subsctription. It=C2=B4s ok, works fine= .

But if I go to my replica server and do select * from pg_subscription=

on field subconninfo I have all properties to connect. host, p= ort, user, password and dbname, all these info are= available.

Documentation says user for replication is equivalent to a superuser and= must have the login attribute. If this user has all this power and using t= hat select on replica all that info is available ...

How can I hide that info from users which are connected to my replica= server or

If it=C2=B4s possible to have a replication user with not sup= eruser rights or with NoLogin =09 =09 =09


Sent from the PostgreSQL - general mailing list archive at Nabble.= com.
------=_Part_147095_792094158.1573478809636-- From andreas@a-kretschmer.de Mon Nov 11 15:43:30 2019 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iUBtS-0002Cd-UX for pgsql-general@arkaria.postgresql.org; Mon, 11 Nov 2019 15:46:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iUBtR-0006QO-NA for pgsql-general@arkaria.postgresql.org; Mon, 11 Nov 2019 15:46:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iUBqs-0002G3-FK for pgsql-general@lists.postgresql.org; Mon, 11 Nov 2019 15:43:38 +0000 Received: from mail.i-mark.de ([188.138.104.222]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iUBqp-0002WP-Gj for pgsql-general@lists.postgresql.org; Mon, 11 Nov 2019 15:43:37 +0000 Received: from [192.168.178.20] (unknown [185.38.49.17]) by mail.i-mark.de (Postfix) with ESMTPSA id F1B0915802C6 for ; Mon, 11 Nov 2019 16:43:27 +0100 (CET) Authentication-Results: loft7616.startdedicated.de; spf=pass (sender IP is 185.38.49.17) smtp.mailfrom=andreas@a-kretschmer.de smtp.helo=[192.168.178.20] Received-SPF: pass (loft7616.startdedicated.de: connection is authenticated) Subject: Re: security on user for replication To: pgsql-general@lists.postgresql.org References: <1573478809636-0.post@n3.nabble.com> From: Andreas Kretschmer Message-ID: <9a42a8ee-7476-cc64-b7da-e864599affc0@a-kretschmer.de> Date: Mon, 11 Nov 2019 16:43:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <1573478809636-0.post@n3.nabble.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Am 11.11.19 um 14:26 schrieb PegoraroF10: > How can I hide that info from users which are connected to my replica > server you can use a .pgpass - file, see the documentation. Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company. www.2ndQuadrant.com From cmt@burggraben.net Mon Nov 11 19:00:07 2019 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iUEvC-00015I-6C for pgsql-general@arkaria.postgresql.org; Mon, 11 Nov 2019 19:00:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iUEvA-0007mu-RL for pgsql-general@arkaria.postgresql.org; Mon, 11 Nov 2019 19:00:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iUEvA-0007mn-GZ for pgsql-general@lists.postgresql.org; Mon, 11 Nov 2019 19:00:16 +0000 Received: from smtp.burggraben.net ([2a01:4f8:140:510a::3]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iUEv3-0008Lq-E4 for pgsql-general@postgresql.org; Mon, 11 Nov 2019 19:00:16 +0000 Received: from squirrel.exwg.net (pD9E1CBAF.dip0.t-ipconnect.de [217.225.203.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "squirrel.exwg.net", Issuer "Christoph Moench-Tegeder" (verified OK)) by smtp.burggraben.net (Postfix) with ESMTPS id 5AC30C00312; Mon, 11 Nov 2019 20:00:08 +0100 (CET) Received: by squirrel.exwg.net (Postfix, from userid 1000) id D128C2E1E49; Mon, 11 Nov 2019 20:00:07 +0100 (CET) Date: Mon, 11 Nov 2019 20:00:07 +0100 From: Christoph Moench-Tegeder To: PegoraroF10 Cc: pgsql-general@postgresql.org Subject: Re: security on user for replication Message-ID: <20191111190007.akaitdibm22x7xzm@squirrel.exwg.net> References: <1573478809636-0.post@n3.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1573478809636-0.post@n3.nabble.com> User-Agent: NeoMutt/20170113 (1.7.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ## PegoraroF10 (marcos@f10.com.br): > How can I hide that info from users which are connected to my replica server https://www.postgresql.org/docs/current/catalog-pg-subscription.html Access to the column subconninfo is revoked from normal users, because it could contain plain-text passwords. Else: SSL certificates, pgpass file, or rig up some kerberos (that's not that elegant in this case). Regards, Christoph -- Spare Space.