From: | Alex Hunsaker <badalex(at)gmail(dot)com> |
---|---|
To: | "Wappler, Robert" <rwappler(at)ophardt(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Restricting the CREATEROLE privilege |
Date: | 2010-02-25 14:49:13 |
Message-ID: | 34d269d41002250649j3de6c485s477ec8ada1646ed3@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Feb 25, 2010 at 01:26, Wappler, Robert <rwappler(at)ophardt(dot)com> wrote:
> Good Morning,
> is there a way to limit the CREATEROLE privilege to a specific database?
> I currently set up an automated integration test environment. This includes a
> database owned by a specific user which should have all degrees of freedom
> for installing whatever database schemas are in the current revision as well as
> creating roles used by the test cases to access the database.
You could create a base role that does not have connect privileges on
the other databases. Then just inherit from that role. Something
like:
CREATE ROLE base_user;
REVOKE CONNECT ON database from base_user;
...
CREATE ROLE my_user inherit base_user;
You could also go the other route and default deny connect databases
and explicitly allow connect.
From | Date | Subject | |
---|---|---|---|
Next Message | akp geek | 2010-02-25 15:15:55 | postgres password change |
Previous Message | Mark Vantzelfde | 2010-02-25 14:46:03 | pgsql input variables |