Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVLJq-0002Uy-0Z for pgsql-general@arkaria.postgresql.org; Tue, 19 Jun 2018 18:25:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fVLJo-0004SV-IR for pgsql-general@arkaria.postgresql.org; Tue, 19 Jun 2018 18:25:28 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVLJo-0004SF-A6 for pgsql-general@lists.postgresql.org; Tue, 19 Jun 2018 18:25:28 +0000 Received: from p3plsmtpa11-03.prod.phx3.secureserver.net ([68.178.252.104]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVLJk-0001MX-Rt for pgsql-general@lists.postgresql.org; Tue, 19 Jun 2018 18:25:27 +0000 Received: from [10.242.3.100] ([50.206.81.97]) by :SMTPAUTH: with ESMTPSA id VLJefltsruwyAVLJff8eyO; Tue, 19 Jun 2018 11:25:20 -0700 Content-Transfer-Encoding: 7bit Content-Type: multipart/alternative; boundary=Apple-Mail-290677C2-AE12-4183-81A7-8D815AB1B39E From: Louis Battuello Mime-Version: 1.0 (1.0) Date: Tue, 19 Jun 2018 14:25:16 -0400 Message-Id: <5EA85DC0-289B-43AD-BAC5-DF656A0D710B@etasseo.com> Subject: Re: Drop Default Privileges? In-Reply-To: <8dd0353c-2044-fe7d-13c6-df43563ede1b@portavita.eu> References: <2CA9A069-45DD-4F47-88C4-0B2685721934@etasseo.com> <8dd0353c-2044-fe7d-13c6-df43563ede1b@portavita.eu> To: pgsql-general@lists.postgresql.org X-Mailer: iPhone Mail (15F79) X-CMAE-Envelope: MS4wfIBdRIXwxzpgdtAug0UHvEQWjTJJxPMtDrMBJ29oWPXNB69PmahaTqGZO5xH9BS4IgyzKnIZFQWYX9l6sYd9EXENNH9a8DQpa19fkoB16Qv6Xz1YXMch TgxgDI/oMFkIsCX9Unx4Kl/mOVyTlrHaJivOHjL7v5iNLWOEolnv7hQky484LZ6xLyY9Wb2j2byFXk1Z7fcvHjabsATpeoW3nH4= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail-290677C2-AE12-4183-81A7-8D815AB1B39E Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > On Jun 19, 2018, at 11:38 AM, Fabio Pardi wrote: >=20 > Hi Louis, >=20 > I think 'alter user' can do the job for you. >=20 > https://www.postgresql.org/docs/current/static/sql-alteruser.html >=20 > Else, as alternative: before running pg_restore, you could edit the dump a= nd replace the string 'ROLE postgres' with the correct user on the RDS insta= nce. >=20 > regards, >=20 > fabio pardi >=20 Thanks for your replies, David and Fabio. I thought about editing the dump file or attempting some sort of reassignmen= t of the default privileges, but that still leaves the larger question: can d= efault privileges ever be removed specific to a single schema? If I set a default of GRANT SELECT, is my only option to change it to REVOKE= SELECT? Is there a way to =E2=80=9Cget rid of the default privileges entry f= or the role,=E2=80=9D as referenced in the Notes section of the of the ALTER= DEFAULT PRIVILEGES documentation? Reversing the change from GRANT to REVOKE= still leaves a catalog reference to the postgres user oid in pg_default_acl= . I don=E2=80=99t want to reverse the default behavior. I=E2=80=99d like to re= move it entirely. Thanks, Louis= --Apple-Mail-290677C2-AE12-4183-81A7-8D815AB1B39E Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
<= br>

On Jun 19, 2018, at 11:38 AM, Fabio Pardi <f.pardi@portavita.eu> wrote:

=20 =20 =20

Hi Louis,

I think 'alter user' can do the job for you.

htt= ps://www.postgresql.org/docs/current/static/sql-alteruser.html

Else, as alternative: before running pg_restore, you could edit the dump and replace the string 'ROLE postgres' with the correct user on= the RDS instance.

regards,<= /font>=

fabio pardi

=20

Thanks for your replies, David and Fabio.
I thought about editing the dump file or attempting some sort o= f reassignment of the default privileges, but that still leaves the larger q= uestion: can default privileges ever be removed specific to a single schema?=

If I set a default of GRANT SELECT, is my only opt= ion to change it to REVOKE SELECT? Is there a way to =E2=80=9Cget rid of the= default privileges entry for the role,=E2=80=9D as referenced in the Notes s= ection of the of the ALTER DEFAULT PRIVILEGES documentation? Reversing the c= hange from GRANT to REVOKE still leaves a catalog reference to the postgres u= ser oid in pg_default_acl.

I don=E2=80=99t want to r= everse the default behavior. I=E2=80=99d like to remove it entirely.

Thanks,
Louis
= --Apple-Mail-290677C2-AE12-4183-81A7-8D815AB1B39E--