Skip to content

Commit 0eeafe7

Browse files
authored
Reconcile API server permissions list
Of note is the "Restart" permission which was not added to the validation list, and removing some permissions for calls that are no longer available. Issue: #2203 Issue: #2201
1 parent aa3e169 commit 0eeafe7

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

docs/content/Security/configure-postgres-operator-rbac.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ The following list shows the current complete list of possible pgo permissions t
7272
|DfCluster | allow *pgo df*|
7373
|Label | allow *pgo label*|
7474
|Reload | allow *pgo reload*|
75+
|Restart | allow *pgo restart*|
7576
|Restore | allow *pgo restore*|
7677
|RestoreDump | allow *pgo restore* for pgdumps|
7778
|ShowBackup | allow *pgo show backup*|

internal/apiserver/perms.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ const (
4040
CREATE_CLUSTER_PERM = "CreateCluster"
4141
CREATE_DUMP_PERM = "CreateDump"
4242
CREATE_FAILOVER_PERM = "CreateFailover"
43-
CREATE_INGEST_PERM = "CreateIngest"
4443
CREATE_NAMESPACE_PERM = "CreateNamespace"
4544
CREATE_PGADMIN_PERM = "CreatePgAdmin"
4645
CREATE_PGBOUNCER_PERM = "CreatePgbouncer"
@@ -57,7 +56,6 @@ const (
5756
// DELETE
5857
DELETE_BACKUP_PERM = "DeleteBackup"
5958
DELETE_CLUSTER_PERM = "DeleteCluster"
60-
DELETE_INGEST_PERM = "DeleteIngest"
6159
DELETE_NAMESPACE_PERM = "DeleteNamespace"
6260
DELETE_PGADMIN_PERM = "DeletePgAdmin"
6361
DELETE_PGBOUNCER_PERM = "DeletePgbouncer"
@@ -71,7 +69,6 @@ const (
7169
SHOW_BACKUP_PERM = "ShowBackup"
7270
SHOW_CLUSTER_PERM = "ShowCluster"
7371
SHOW_CONFIG_PERM = "ShowConfig"
74-
SHOW_INGEST_PERM = "ShowIngest"
7572
SHOW_NAMESPACE_PERM = "ShowNamespace"
7673
SHOW_PGADMIN_PERM = "ShowPgAdmin"
7774
SHOW_PGBOUNCER_PERM = "ShowPgBouncer"
@@ -114,6 +111,7 @@ func initializePerms() {
114111
DF_CLUSTER_PERM: "yes",
115112
LABEL_PERM: "yes",
116113
RELOAD_PERM: "yes",
114+
RESTART_PERM: "yes",
117115
RESTORE_PERM: "yes",
118116
STATUS_PERM: "yes",
119117
TEST_CLUSTER_PERM: "yes",
@@ -124,7 +122,6 @@ func initializePerms() {
124122
CREATE_DUMP_PERM: "yes",
125123
CREATE_CLUSTER_PERM: "yes",
126124
CREATE_FAILOVER_PERM: "yes",
127-
CREATE_INGEST_PERM: "yes",
128125
CREATE_NAMESPACE_PERM: "yes",
129126
CREATE_PGADMIN_PERM: "yes",
130127
CREATE_PGBOUNCER_PERM: "yes",
@@ -141,7 +138,6 @@ func initializePerms() {
141138
// DELETE
142139
DELETE_BACKUP_PERM: "yes",
143140
DELETE_CLUSTER_PERM: "yes",
144-
DELETE_INGEST_PERM: "yes",
145141
DELETE_NAMESPACE_PERM: "yes",
146142
DELETE_PGADMIN_PERM: "yes",
147143
DELETE_PGBOUNCER_PERM: "yes",
@@ -155,7 +151,6 @@ func initializePerms() {
155151
SHOW_BACKUP_PERM: "yes",
156152
SHOW_CLUSTER_PERM: "yes",
157153
SHOW_CONFIG_PERM: "yes",
158-
SHOW_INGEST_PERM: "yes",
159154
SHOW_NAMESPACE_PERM: "yes",
160155
SHOW_PGADMIN_PERM: "yes",
161156
SHOW_PGBOUNCER_PERM: "yes",

0 commit comments

Comments
 (0)