Schema security
От | Paul Lambert |
---|---|
Тема | Schema security |
Дата | |
Msg-id | 4760905F.2020406@reynolds.com.au обсуждение исходный текст |
Ответы |
Re: Schema security
Re: Schema security |
Список | pgsql-admin |
I have a schema for example called f65, and the public schema of course, in a database. I've created a user f65 to access only the f65 schema using the following: CREATE ROLE f65 LOGIN ENCRYPTED PASSWORD 'md52a630d68054defeed4b4c27cb6413ece' NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE; REVOKE ALL ON SCHEMA public FROM public; REVOKE ALL ON SCHEMA f65 FROM public; GRANT ALL ON SCHEMA f65 TO f65; Which gives the f65 user access to the schema, but they cannot access any of the objects within it (i.e. permission denied when trying a select from a table) testdb=> select * from f65.billing; ERROR: permission denied for relation billing I would have thought giving the user all privileges on a schema would by default add them to all objects within it, but clearly not. Do I need to explicitly go through every object within the schema and grant that user access to them or is there an easier way of doing it? Something like a "GRANT CASCADE" option? Cheers, P. -- Paul Lambert Database Administrator AutoLedgers
В списке pgsql-admin по дате отправления: