summaryrefslogtreecommitdiff
path: root/doc/src/sgml/user-manag.sgml
diff options
context:
space:
mode:
authorStephen Frost2021-04-05 17:42:52 +0000
committerStephen Frost2021-04-05 17:42:52 +0000
commit6c3ffd697e2242f5497ea4b40fffc8f6f922ff60 (patch)
tree7045f2fb4cbeb7fcbc9492ed8e21a99bf25b37cd /doc/src/sgml/user-manag.sgml
parentad8b674922eb70dc5cd02951dd82fe2c4c37c80a (diff)
Add pg_read_all_data and pg_write_all_data roles
A commonly requested use-case is to have a role who can run an unfettered pg_dump without having to explicitly GRANT that user access to all tables, schemas, et al, without that role being a superuser. This address that by adding a "pg_read_all_data" role which implicitly gives any member of this role SELECT rights on all tables, views and sequences, and USAGE rights on all schemas. As there may be cases where it's also useful to have a role who has write access to all objects, pg_write_all_data is also introduced and gives users implicit INSERT, UPDATE and DELETE rights on all tables, views and sequences. These roles can not be logged into directly but instead should be GRANT'd to a role which is able to log in. As noted in the documentation, if RLS is being used then an administrator may (or may not) wish to set BYPASSRLS on the login role which these predefined roles are GRANT'd to. Reviewed-by: Georgios Kokolatos Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'doc/src/sgml/user-manag.sgml')
-rw-r--r--doc/src/sgml/user-manag.sgml18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/src/sgml/user-manag.sgml b/doc/src/sgml/user-manag.sgml
index d171b13236b..fe0bdb75999 100644
--- a/doc/src/sgml/user-manag.sgml
+++ b/doc/src/sgml/user-manag.sgml
@@ -519,6 +519,24 @@ DROP ROLE doomed_role;
</thead>
<tbody>
<row>
+ <entry>pg_read_all_data</entry>
+ <entry>Read all data (tables, views, sequences), as if having SELECT
+ rights on those objects, and USAGE rights on all schemas, even without
+ having it explicitly. This role does not have the role attribute
+ <literal>BYPASSRLS</literal> set. If RLS is being used, an administrator
+ may wish to set <literal>BYPASSRLS</literal> on roles which this role is
+ GRANTed to.</entry>
+ </row>
+ <row>
+ <entry>pg_write_all_data</entry>
+ <entry>Write all data (tables, views, sequences), as if having INSERT,
+ UPDATE, and DELETE rights on those objects, and USAGE rights on all
+ schemas, even without having it explicitly. This role does not have the
+ role attribute <literal>BYPASSRLS</literal> set. If RLS is being used,
+ an administrator may wish to set <literal>BYPASSRLS</literal> on roles
+ which this role is GRANTed to.</entry>
+ </row>
+ <row>
<entry>pg_read_all_settings</entry>
<entry>Read all configuration variables, even those normally visible only to
superusers.</entry>