Re: Restricted access on DataBases

From: amul sul <sulamul(at)gmail(dot)com>
To: Durumdara <durumdara(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Restricted access on DataBases
Date: 2016-09-05 13:02:10
Message-ID: CAAJ_b97hHJP_UDrdBgfzG4uPZKFsB_9pmhCG8yPaW63g-TpB4A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I think, it worth to try pg_hba.conf configuration[1].

[1]. https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html

Regards,
Amul Sul

On Mon, Sep 5, 2016 at 6:15 PM, Durumdara <durumdara(at)gmail(dot)com> wrote:
> Dear PG-masters!
>
> We want to put more databases to one server, to "public" schema:
> DB_A, DB_B, DB_C.
> And users:
> US_A, US_B, US_C, and Main_Admin.
> We want to setup the environment.
> Every simple user can access his database:
> DB_A - US_A
> DB_B - US_B
> DB_C - US_C
>
> They can't access other databases only theirs.
>
> Main_Admin can access all databases.
>
> I'm not sure how to do it perfectly.
> We tried to remove "public" role, and add US_A to DB_A.
> But the subobjects (table named "teszt") aren't accessable.
>
> I can reown DB_A to US_A, but this revoke all rights from Main_Admin.
>
> What is the simple way to we can avoid the access from another users, but
> give needed rights to DB_[n] and Main_Admin? (Tables, Sequences, etc).
>
> And how we keep this state later? For example: DB_A creates a new table.
> Main_Admin must access this automatically...
>
> I don't understand this area properly. For me the "public" means "access for
> all users", which isn't good (DB_A vs. US_C).
>
> As I think we can't mix the rights (Main_Admin = US_A + US_B + US_C...).
>
> Thank you for the help. information, or an example!
>
> DD
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-09-05 14:19:55 Re: Restricted access on DataBases
Previous Message Durumdara 2016-09-05 12:45:40 Restricted access on DataBases