-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A non-admin user is incorrectly able to see Cluster Settings from DB Console #74692
Comments
cc @abhinavg6 for awareness based on our discussion @vy-ton looping you in as well - since this is related to Cluster Settings, it looks like this should be triaged through SQL Experience. I'll go ahead and update the team label accordingly - but let us know if you think differently about ownership |
this is more of an issue with the The endpoint needs to be updated to check the permissions for the user, probably here: Lines 1668 to 1685 in f68a5a7
|
Ack, thanks Rafi. cc @knz @mwang1026 to put on DB Server's radar |
@thtruo , as it's documented
(https://www.cockroachlabs.com/docs/v21.2/alter-user.html#parameters). Should we rely on parameter that intended to allow/disallow writing permission for read-only view in Db Console? In addition, Db Console displays all cluster settings but some sensitive values are hidden (redacted) for non admin users (ie. cluster secrets, organization name, and any new settings by default are considered to be redacted). Related PR #42520 Would it be appropriate to display cluster settings from SQL shell ( @solongordon , can you probably clarify the intended behavior for cockroach/pkg/sql/set_cluster_setting.go Lines 62 to 76 in e1d95fe
|
@koorosh Solon is not the person who's going to work on this. @thtruo @rafiss , Andrii is raising a valid point. The very name of the role option MODIFYCLUSTERSETTING suggest that a user without this permission can VIEW the cluster settings, even if they cannot MODIFY them. The fact that the internal function To support my view further, I'd like to point out that we already had extensive conversations about the confidentiality of data in sensitive cluster settings, and the code in the UI is already taking this into account: non- As to the course of action, I'd suggest the following:
Finally, while I agree that some of the mechanism here falls under the DB server team, most of the decisions around the semantics of the role option and the desired end result should be taken by the SQL Experience team, with its PM. |
@thtruo can you coordinate the decision-making here? We need to do the product decision before we ask Andreii (or anyone else in the DB team) to make code changes. |
Thanks for the callout everyone. Agreed that at the very least we should make a docs change describing Cluster settings are generally seen as an admin/operator operation, it would make sense to present a new role option like To summarize and put forward a proposal following @knz's suggestion:
One question for the SQL Experience folks: @vy-ton @rafiss do we have a precedent for parent/child roles, e.g. making |
Some of the recent settings are like this. It basically comes down to the order that the settings are checked. For example, @dhartunian added |
Describe the problem
SHOW CLUSTER SETTINGS;
will be hit with an error that they need theMODIFYCLUSTERSETTING
privilege to access cluster settings./reports/settings
link, and see all cluster settingsExpected behavior
Access to Cluster Settings should be gated by the same
MODIFYCLUSTERSETTING
privilege. So that a non-admin user who:reports/settings
link from DB Console's Advanced Debug page will not see Cluster Settings. They should see the same error text that you needMODIFYCLUSTERSETTING
to load that pageAdditional data / screenshots
If the problem is SQL-related, include a copy of the SQL query and the schema
of the supporting tables.
Environment:
The text was updated successfully, but these errors were encountered: