You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/authentication-authorization/limitations.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -390,7 +390,7 @@ So due to the additional data access required by the security checks, this opera
390
390
391
391
[[property-based-access-control-limitations]]
392
392
=== Property-based access control limitations
393
-
Extra node-level security checks are necessary when adding security rules based on property rules, and these can have a significant performance impact.
393
+
Extra element-level security checks are necessary when adding security rules based on property rules, and these can have a significant performance impact.
394
394
The following example shows how the database behaves when adding security rules to roles `restricted` and `unrestricted`:
Copy file name to clipboardExpand all lines: modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc
+10-5Lines changed: 10 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,20 +119,22 @@ GRANT TRAVERSE ON GRAPH * FOR (n:Email) WHERE n.classification IS NULL TO regula
119
119
120
120
=== Deny a property-based privilege using a comparison operator
121
121
122
-
The following example shows how to deny permission to `READ` and `TRAVERSE` nodes where the property `classification` is different from `UNCLASSIFIED` to role `regularUsers`:
122
+
The following example shows how to deny permission to `READ` and `TRAVERSE` nodes and relationships where the property `classification` is different from `UNCLASSIFIED` to role `regularUsers`:
123
123
124
124
[source, syntax, role="noheader"]
125
125
----
126
126
DENY MATCH {*} ON GRAPH * FOR (n) WHERE n.classification <> 'UNCLASSIFIED' TO regularUsers
127
+
DENY MATCH {*} ON GRAPH * FOR ()-[r]-() WHERE r.classification <> 'UNCLASSIFIED' TO regularUsers
127
128
----
128
129
129
130
=== Grant a property-based privilege on all properties using a property value
130
131
131
-
The following example shows how to grant permission to `READ` all properties on nodes where the property `securityLevel` is higher than `3` to role `regularUsers`:
132
+
The following example shows how to grant permission to `READ` all properties on nodes and relationships where the property `securityLevel` is higher than `3` to role `regularUsers`:
132
133
133
134
[source, syntax, role="noheader"]
134
135
----
135
136
GRANT READ {*} ON GRAPH * FOR (n) WHERE n.securityLevel > 3 TO regularUsers
137
+
GRANT READ {*} ON GRAPH * FOR ()-[r]-() WHERE r.securityLevel > 3 TO regularUsers
136
138
----
137
139
138
140
[NOTE]
@@ -142,22 +144,24 @@ The role `regularUsers` does not need to have `READ` privilege for the property
142
144
143
145
=== Deny a property-based privilege using a list of values
144
146
145
-
The following example shows how to deny permission to `READ` all properties on nodes where the property `classification` is not included in the list of `[UNCLASSIFIED, PUBLIC]`:
147
+
The following example shows how to deny permission to `READ` all properties on nodes and relationships where the property `classification` is not included in the list of `[UNCLASSIFIED, PUBLIC]`:
146
148
147
149
[source, syntax, role="noheader"]
148
150
----
149
151
DENY READ {*} ON GRAPH * FOR (n) WHERE NOT n.classification IN ['UNCLASSIFIED', 'PUBLIC'] TO regularUsers
152
+
DENY READ {*} ON GRAPH * FOR ()-[r]-() WHERE NOT r.classification IN ['UNCLASSIFIED', 'PUBLIC'] TO regularUsers
150
153
----
151
154
152
155
// The last two examples were added in 5.26.
153
156
154
157
=== Grant a property-based privilege using temporal value
155
158
156
-
The following example shows how to grant permission to `READ` all properties on nodes where the property `createdAt` is later than the current date:
159
+
The following example shows how to grant permission to `READ` all properties on nodes and relationships where the property `createdAt` is later than the current date:
157
160
158
161
[source, syntax, role="noheader"]
159
162
----
160
163
GRANT READ {*} ON GRAPH * FOR (n) WHERE n.createdAt > date() TO regularUsers
164
+
GRANT READ {*} ON GRAPH * FOR ()-[r]-() WHERE r.createdAt > date() TO regularUsers
161
165
----
162
166
163
167
[NOTE]
@@ -184,6 +188,7 @@ SHOW ROLE regularUsers PRIVILEGES AS REVOKE COMMANDS
184
188
|===
185
189
|command
186
190
|"REVOKE GRANT READ {*} ON GRAPH * FOR (n) WHERE n.createdAt > date('2024-10-25') FROM `regularUsers`"
187
-
a|Rows: 1
191
+
|"REVOKE GRANT READ {*} ON GRAPH * FOR ()-[r]-() WHERE r.createdAt > date('2024-10-25') FROM `regularUsers`"
0 commit comments