Commit 4632965
committed
fix: address PostgREST PR review feedback (PLAT-499/500/501/502/503)
Move credential handling out of container env vars into postgrest.conf
via db-uri. Environment variables are visible to all users on the host
via docker inspect and /proc; the config file is restricted to the
service user (mode 0600).
Move config file generation to PostgRESTServiceConfig.GenerateConf in
the database package, where it belongs alongside the type it serializes.
PostgRESTConnParams carries the runtime connection details (host, port,
credentials) separately from the user-supplied PostgRESTServiceConfig.
Fix merge conflict resolution in service_user_role.go: remove the
duplicate MCP code block that was left in and drop DBOwner: false to
align with the upstream change in main.
Implement Update() for PostgREST ServiceUserRole to reconcile DBAnonRole
changes at runtime. Queries pg_auth_members for stale role memberships,
revokes them, and re-applies the desired grants idempotently. Without
this, a DBAnonRole change would leave the authenticator role unable to
SET ROLE to the new anon role.
Add REVOKE CONNECT ON DATABASE before DROP ROLE in Delete() for PostgREST
service users. PostgreSQL refuses to drop a role that holds database
privileges, causing the DROP to fail silently. Revoking first ensures
clean deletion.1 parent 069f53b commit 4632965
208 files changed
Lines changed: 13772 additions & 2569 deletions
File tree
- .circleci
- api/apiv1
- design
- gen/http
- client
- docker
- control-plane-ci
- control-plane-dev
- control-plane
- docs
- development
- installation
- scripts
- e2e/fixtures/roles/build_image/vars
- server
- cmd
- internal
- api
- apiv1
- app
- certificates
- database
- operations
- golden_test
- TestRestoreDatabase
- TestUpdateDatabase
- ds
- election
- etcd
- host
- logging
- migrate
- migrations
- monitor
- orchestrator
- common
- golden_test/TestPatroniConfigGenerator
- swarm
- patroni
- pgbackrest
- ports
- postgres
- resource
- migrations
- golden_test/TestVersion_1_0_0
- schemas
- v0_0_0
- v1_0_0
- schematool
- scheduler
- storage
- storagetest
- testutils
- workflows
- activities
- backend/etcd
- activity_queue_item
- workflow_queue_item
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
26 | 28 | | |
27 | | - | |
28 | | - | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
56 | | - | |
| 61 | + | |
57 | 62 | | |
58 | 63 | | |
59 | | - | |
| 64 | + | |
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
| |||
69 | 74 | | |
70 | 75 | | |
71 | 76 | | |
72 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
73 | 80 | | |
74 | 81 | | |
75 | 82 | | |
| |||
78 | 85 | | |
79 | 86 | | |
80 | 87 | | |
| 88 | + | |
81 | 89 | | |
82 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
83 | 97 | | |
84 | 98 | | |
85 | 99 | | |
86 | 100 | | |
87 | 101 | | |
88 | 102 | | |
89 | 103 | | |
90 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
91 | 107 | | |
92 | 108 | | |
93 | 109 | | |
| |||
97 | 113 | | |
98 | 114 | | |
99 | 115 | | |
100 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
101 | 119 | | |
102 | 120 | | |
103 | 121 | | |
| |||
257 | 275 | | |
258 | 276 | | |
259 | 277 | | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
266 | 284 | | |
267 | 285 | | |
268 | 286 | | |
| |||
331 | 349 | | |
332 | 350 | | |
333 | 351 | | |
334 | | - | |
| 352 | + | |
335 | 353 | | |
336 | 354 | | |
337 | 355 | | |
| |||
396 | 414 | | |
397 | 415 | | |
398 | 416 | | |
399 | | - | |
| 417 | + | |
400 | 418 | | |
401 | 419 | | |
402 | 420 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | | - | |
440 | | - | |
| 439 | + | |
| 440 | + | |
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
| |||
12557 | 12557 | | |
12558 | 12558 | | |
12559 | 12559 | | |
12560 | | - | |
12561 | | - | |
| 12560 | + | |
| 12561 | + | |
12562 | 12562 | | |
12563 | 12563 | | |
12564 | 12564 | | |
| |||
12797 | 12797 | | |
12798 | 12798 | | |
12799 | 12799 | | |
12800 | | - | |
12801 | | - | |
| 12800 | + | |
| 12801 | + | |
12802 | 12802 | | |
12803 | 12803 | | |
12804 | 12804 | | |
| |||
13459 | 13459 | | |
13460 | 13460 | | |
13461 | 13461 | | |
13462 | | - | |
13463 | | - | |
| 13462 | + | |
| 13463 | + | |
13464 | 13464 | | |
13465 | 13465 | | |
13466 | 13466 | | |
| |||
13699 | 13699 | | |
13700 | 13700 | | |
13701 | 13701 | | |
13702 | | - | |
13703 | | - | |
| 13702 | + | |
| 13703 | + | |
13704 | 13704 | | |
13705 | 13705 | | |
13706 | 13706 | | |
| |||
13939 | 13939 | | |
13940 | 13940 | | |
13941 | 13941 | | |
13942 | | - | |
13943 | | - | |
| 13942 | + | |
| 13943 | + | |
13944 | 13944 | | |
13945 | 13945 | | |
13946 | 13946 | | |
| |||
14179 | 14179 | | |
14180 | 14180 | | |
14181 | 14181 | | |
14182 | | - | |
14183 | | - | |
| 14182 | + | |
| 14183 | + | |
14184 | 14184 | | |
14185 | 14185 | | |
14186 | 14186 | | |
| |||
14419 | 14419 | | |
14420 | 14420 | | |
14421 | 14421 | | |
14422 | | - | |
14423 | | - | |
| 14422 | + | |
| 14423 | + | |
14424 | 14424 | | |
14425 | 14425 | | |
14426 | 14426 | | |
| |||
14659 | 14659 | | |
14660 | 14660 | | |
14661 | 14661 | | |
14662 | | - | |
14663 | | - | |
| 14662 | + | |
| 14663 | + | |
14664 | 14664 | | |
14665 | 14665 | | |
14666 | 14666 | | |
| |||
15376 | 15376 | | |
15377 | 15377 | | |
15378 | 15378 | | |
15379 | | - | |
15380 | | - | |
| 15379 | + | |
| 15380 | + | |
15381 | 15381 | | |
15382 | 15382 | | |
15383 | 15383 | | |
| |||
15450 | 15450 | | |
15451 | 15451 | | |
15452 | 15452 | | |
15453 | | - | |
15454 | | - | |
| 15453 | + | |
| 15454 | + | |
15455 | 15455 | | |
15456 | 15456 | | |
15457 | 15457 | | |
| |||
15556 | 15556 | | |
15557 | 15557 | | |
15558 | 15558 | | |
15559 | | - | |
15560 | | - | |
| 15559 | + | |
| 15560 | + | |
15561 | 15561 | | |
15562 | 15562 | | |
15563 | 15563 | | |
| |||
15980 | 15980 | | |
15981 | 15981 | | |
15982 | 15982 | | |
15983 | | - | |
15984 | | - | |
| 15983 | + | |
| 15984 | + | |
15985 | 15985 | | |
15986 | 15986 | | |
15987 | 15987 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
673 | | - | |
674 | 673 | | |
675 | 674 | | |
676 | 675 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments