Skip to content

Commit

Permalink
Adding clarification that sub-admin roles should not be able to chang…
Browse files Browse the repository at this point in the history
…e their own privileges (#1451)

Cherry-picked from #1440 

This was noticed in a recent internal pentest of RBAC.

We need to clarify that it is necessary to explicitly deny the ability
to change your own privileges if you copy the admin role (otherwise the
new role is essentially unconstrained).

Co-authored-by: Phil Wright <[email protected]>
  • Loading branch information
renetapopova and phil198 authored Feb 28, 2024
1 parent b2c3f60 commit cf59ce3
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,14 @@ Then you need to *deny* the two specific actions this role is not supposed to pe
* Read any patients' social security number (`SSN`).
* Submit medical diagnoses.

As well as the ability for the `itadmin` to amend their own privileges.

[source, cypher, role=systemcmd]
----
DENY READ {ssn} ON GRAPH healthcare NODES Patient TO itadmin;
DENY CREATE ON GRAPH healthcare RELATIONSHIPS DIAGNOSIS TO itadmin;
DENY ROLE MANAGEMENT ON DBMS TO itadmin;
DENY PRIVILEGE MANAGEMENT ON DBMS TO itadmin;
----

The complete set of privileges available to users assigned the `itadmin` role can be viewed using the following command:
Expand All @@ -253,6 +257,8 @@ SHOW ROLE itadmin PRIVILEGES AS COMMANDS;
| "GRANT ALL DBMS PRIVILEGES ON DBMS TO `itadmin`" |
| "DENY READ {ssn} ON GRAPH `healthcare` NODE Patient TO `itadmin`" |
| "DENY CREATE ON GRAPH `healthcare` RELATIONSHIP DIAGNOSIS TO `itadmin`" |
| "DENY ROLE MANAGEMENT ON DBMS TO `itadmin`" |
| "DENY PRIVILEGE MANAGEMENT ON DBMS TO `itadmin`" |
+-------------------------------------------------------------------------+
----

Expand Down

0 comments on commit cf59ce3

Please sign in to comment.