pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Hilbert, Karin <ioh1@psu.edu>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Manage PostgreSQL Database for GITLAB Application?
Date: Mon, 21 Jan 2019 13:53:00 -0500
Message-ID: <20190121185300.GZ2528@tamriel.snowman.net> (raw)
In-Reply-To: <DM6PR02MB4876CBD53ECBC0D2A12A6DF9899F0@DM6PR02MB4876.namprd02.prod.outlook.com>
References: <DM6PR02MB4876CBD53ECBC0D2A12A6DF9899F0@DM6PR02MB4876.namprd02.prod.outlook.com>

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.
> 
> The developer says that we need to use the public schema instead of the schema 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 privileges 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 appreciated.

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

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (9+ messages)  latest in thread

Message-ID: <20190121185300.GZ2528@tamriel.snowman.net>
Permalink:  ../20190121185300.GZ2528@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20190121185300.GZ2528@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: sfrost@snowman.net, ioh1@psu.edu
  Subject: Re: Manage PostgreSQL Database for GITLAB Application?
  In-Reply-To: <20190121185300.GZ2528@tamriel.snowman.net>
  References: <DM6PR02MB4876CBD53ECBC0D2A12A6DF9899F0@DM6PR02MB4876.namprd02.prod.outlook.com> <20190121185300.GZ2528@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox