Skip to content

Commit b95dae2

Browse files
committed
sql: restrict admin inheritance for specific role options
Certain role options SUBJECT and NOVIEWACTIVITY (and others) should be excluded from inheritance by the admin roles in line with the comment here. https://reviewable.io/reviews/cockroachdb/cockroach/149463#-OUenA-O4wYwadhkcBdW We have already excluded the PROVISIONSRC option in the PR #149463 and would be extending that list. fixes #150300 Epic None Release note: None
1 parent 847321d commit b95dae2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pkg/sql/roleoption/role_option.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,20 @@ const (
8181
PROVISIONSRC
8282
)
8383

84+
// NonAdminInheritedOptions contains the role options that are not implicitly
85+
// applied to all admin roles.
8486
var NonAdminInheritedOptions = []Option{
87+
NOCREATEROLE,
88+
NOCONTROLJOB,
89+
NOCREATEDB,
90+
NOVIEWACTIVITY,
91+
NOCANCELQUERY,
92+
NOMODIFYCLUSTERSETTING,
93+
NOVIEWACTIVITYREDACTED,
94+
NOREPLICATION,
95+
NOVIEWCLUSTERSETTING,
96+
SUBJECT,
97+
NOBYPASSRLS,
8598
PROVISIONSRC,
8699
}
87100

0 commit comments

Comments
 (0)