- Notifications
You must be signed in to change notification settings - Fork5k
Commit6c3ffd6
committed
Add pg_read_all_data and pg_write_all_data roles
A commonly requested use-case is to have a role who can run anunfettered pg_dump without having to explicitly GRANT that user accessto all tables, schemas, et al, without that role being a superuser.This address that by adding a "pg_read_all_data" role which implicitlygives any member of this role SELECT rights on all tables, views andsequences, and USAGE rights on all schemas.As there may be cases where it's also useful to have a role who haswrite access to all objects, pg_write_all_data is also introduced andgives users implicit INSERT, UPDATE and DELETE rights on all tables,views and sequences.These roles can not be logged into directly but instead should beGRANT'd to a role which is able to log in. As noted in thedocumentation, if RLS is being used then an administrator may (or maynot) wish to set BYPASSRLS on the login role which these predefinedroles are GRANT'd to.Reviewed-by: Georgios KokolatosDiscussion:https://postgr.es/m/20200828003023.GU29590@tamriel.snowman.net1 parentad8b674 commit6c3ffd6
File tree
6 files changed
+129
-2
lines changed- doc/src/sgml
- src
- backend/catalog
- include/catalog
- test/regress
- expected
- sql
6 files changed
+129
-2
lines changedLines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
518 | 518 |
| |
519 | 519 |
| |
520 | 520 |
| |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
521 | 539 |
| |
522 | 540 |
| |
523 | 541 |
| |
|
Lines changed: 31 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3925 | 3925 |
| |
3926 | 3926 |
| |
3927 | 3927 |
| |
| 3928 | + | |
| 3929 | + | |
| 3930 | + | |
| 3931 | + | |
| 3932 | + | |
| 3933 | + | |
| 3934 | + | |
| 3935 | + | |
| 3936 | + | |
| 3937 | + | |
| 3938 | + | |
| 3939 | + | |
| 3940 | + | |
| 3941 | + | |
| 3942 | + | |
| 3943 | + | |
| 3944 | + | |
| 3945 | + | |
| 3946 | + | |
| 3947 | + | |
| 3948 | + | |
3928 | 3949 |
| |
3929 | 3950 |
| |
3930 | 3951 |
| |
| |||
4251 | 4272 |
| |
4252 | 4273 |
| |
4253 | 4274 |
| |
| 4275 | + | |
| 4276 | + | |
| 4277 | + | |
| 4278 | + | |
| 4279 | + | |
| 4280 | + | |
| 4281 | + | |
| 4282 | + | |
| 4283 | + | |
| 4284 | + | |
4254 | 4285 |
| |
4255 | 4286 |
| |
4256 | 4287 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
56 |
| - | |
| 56 | + | |
57 | 57 |
| |
58 | 58 |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
32 | 42 |
| |
33 | 43 |
| |
34 | 44 |
| |
|
Lines changed: 44 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| 15 | + | |
15 | 16 |
| |
16 | 17 |
| |
17 | 18 |
| |
| |||
26 | 27 |
| |
27 | 28 |
| |
28 | 29 |
| |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 |
| |
30 | 35 |
| |
31 | 36 |
| |
| |||
131 | 136 |
| |
132 | 137 |
| |
133 | 138 |
| |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
134 | 169 |
| |
135 | 170 |
| |
136 | 171 |
| |
| |||
1884 | 1919 |
| |
1885 | 1920 |
| |
1886 | 1921 |
| |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
1887 | 1928 |
| |
1888 | 1929 |
| |
1889 | 1930 |
| |
| |||
2284 | 2325 |
| |
2285 | 2326 |
| |
2286 | 2327 |
| |
2287 |
| - | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
2288 | 2331 |
| |
2289 | 2332 |
| |
2290 | 2333 |
| |
|
Lines changed: 25 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| 19 | + | |
19 | 20 |
| |
20 | 21 |
| |
21 | 22 |
| |
| |||
29 | 30 |
| |
30 | 31 |
| |
31 | 32 |
| |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
32 | 38 |
| |
33 | 39 |
| |
34 | 40 |
| |
| |||
96 | 102 |
| |
97 | 103 |
| |
98 | 104 |
| |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
99 | 121 |
| |
100 | 122 |
| |
101 | 123 |
| |
| |||
1121 | 1143 |
| |
1122 | 1144 |
| |
1123 | 1145 |
| |
| 1146 | + | |
1124 | 1147 |
| |
1125 | 1148 |
| |
1126 | 1149 |
| |
| |||
1364 | 1387 |
| |
1365 | 1388 |
| |
1366 | 1389 |
| |
| 1390 | + | |
| 1391 | + | |
1367 | 1392 |
| |
1368 | 1393 |
| |
1369 | 1394 |
| |
|
0 commit comments
Comments
(0)