From: ugurlu2001@hotmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #13607: Creating "Readonly" User for public Shema.
Date: Wed, 02 Sep 2015 14:45:58 +0000
Message-ID: <20150902144558.1367.52135@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 13607
Logged by: Ugur YILMAZ
Email address: ugurlu2001@hotmail.com
PostgreSQL version: 9.4.0
Operating system: Widows 10 Pro x64
Description:
I was create a readonly user on a testdb for my new project. There are two
user types at the project: postgres and readonly. The postgres user is
working in my program with admin rights and handling all concepts
(Transactions, Create, Drop, Maintenance etc...) . And I added readonly user
to my project; protect my tables against sql injections. readonly user only
runs SELECT STATEMENTS for reports. But when I test some tables; There is no
protect of my tables against "ALTER TABLE" commands. I think; that is an
importand bug on PostgreSQL. I hope you can add "ALTER" keyword for
"GRANT/REVOKE" command to PostgreSQL The script at the abouve that I used :
With my best regards.
http://stackoverflow.com/questions/32352508/create-a-user-for-select-only-on-postgresql-restrict-alt...
CREATE ROLE readonly LOGIN PASSWORD 'thePwd';
-- Existing objects
GRANT CONNECT ON DATABASE the_db TO readonly;
GRANT USAGE ON SCHEMA public TO readonly;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readonly;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO readonly;
GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO readonly;
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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-bugs@postgresql.org
Cc: ugurlu2001@hotmail.com
Subject: Re: BUG #13607: Creating "Readonly" User for public Shema.
In-Reply-To: <20150902144558.1367.52135@wrigleys.postgresql.org>
References: <20150902144558.1367.52135@wrigleys.postgresql.org>
* 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