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 1glegz-0002t0-If for pgsql-general@arkaria.postgresql.org; Mon, 21 Jan 2019 18:53:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1glegy-0005Lh-B1 for pgsql-general@arkaria.postgresql.org; Mon, 21 Jan 2019 18:53:04 +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 1glegx-0005LZ-W1 for pgsql-general@lists.postgresql.org; Mon, 21 Jan 2019 18:53:04 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1glegv-0006Fy-CA for pgsql-general@lists.postgresql.org; Mon, 21 Jan 2019 18:53:02 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 9993D5F79E; Mon, 21 Jan 2019 13:53:00 -0500 (EST) Date: Mon, 21 Jan 2019 13:53:00 -0500 From: Stephen Frost To: "Hilbert, Karin" Cc: "pgsql-general@lists.postgresql.org" Subject: Re: Manage PostgreSQL Database for GITLAB Application? Message-ID: <20190121185300.GZ2528@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Qg3iAeapg3Gcebaf" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Qg3iAeapg3Gcebaf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Hilbert, Karin (ioh1@psu.edu) wrote: > Does anyone manage a PostgreSQL database for a GITLAB application? Yes. > I have PostgreSQL v9.6 installed on my server & we are trying to migrate = a GITLAB database there. >=20 > The developer says that we need to use the public schema instead of the s= chema of the same name as the application user. Not sure this is really required but it also shouldn't hurt anything really- I'd definitely have the database be dedicated to gitlab. > The schema that he provided me to restore also is revoking all privileges= from the database owner & instead granting all privileges to PUBLIC. That's terrible. > Has anyone else run across this? I always thought that granting privileg= es to PUBLIC is a bad security thing to do? Yes, that's bad from a security perspective and shouldn't be necessary. GRANT rights to the user(s) the application logs into, don't just grant them to PUBLIC- that would allow anyone on the system to have access. > If anyone can offer any thoughts regarding this, it would be greatly appr= eciated. Is this developer the only one who is going to be using this gitlab instance..? Sounds like maybe they want direct database access which would only make sense if they're the one running it and should have full access- but even then, I'd create a role and grant access to that role and then grant them that role, if that's the requirement. GRANT'ing things to public isn't a good idea if you're at all concerned about security. Thanks! Stephen --Qg3iAeapg3Gcebaf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJcRhUMAAoJEO1sijiDR2RVsOgQAIvOJNWTWz1WO7UKhdjm7aBs Gv/kSxOgoEvxFAUW151I82NhDrx/0Qtp8pB3oZjro5mLj++T5Owi49zdGV8AqH5l ss1gmvO0Pip0vb0Z0M7sE1/Xddi3uLlgthCkMyOzTzmSKdp1HAvwWA9vyoJq9UTu jaqrbv98tq/bY1nyqlcU3S+ds95cWAJ/J+Ozq/hnwo6nmYdxi7qY3GS4OoZKUXGn xXhTezX+645UhQzlhRKrLiV+owp3LA6VWlodnBcR056lVrxKuiBGG8uiQYAOkBBz 2rUYVkyvxMBsCmUE8xEAl+jAGVvHbBlxa25zGEzhso5OUrPdjIjAfmqnBolyIhM+ +1iI9P+tTM1ixp5uDo0R646sJaHdjuWWqBtt0znfMl8QJSnBt2/ttLMe5MdXSg60 p61VQAe5BLl26NryMyFy56CC9Pr9r5A6kJ/Fjr2NzeHEfhkZ0+JdDX+TkA3l4TDh hF6PIXa/pFiR1/eMaUTFuEek/W1lNvfj8XYyRHoMWQhxps2yWQsROuTdpNiYdI5i jEyyidTfOZ1OBfHuLxerJNiaAI1+J0Snu9ThI2Ad8xsX3o3EKaZFW8PysFVR8P02 tqDzWQqyY76uoUDybFrll7lxjP/jqEMT9EeHrCLtaGqoJIM5QM+JgTV822gOJd7p RnEDXo3ynCIGi9l1j56G =8GLL -----END PGP SIGNATURE----- --Qg3iAeapg3Gcebaf--