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: docs/source/api.rst
+12-7Lines changed: 12 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -607,16 +607,21 @@ The default access mode.
607
607
608
608
A session can be given a default access mode on construction.
609
609
610
-
This applies only in clustered environments and determines whether transactions carried out within that session should be routed to a `read` or `write` server by default.
610
+
This applies only in clustered environments and determines whether transactions
611
+
carried out within that session should be routed to a ``read`` or ``write``
612
+
server by default.
611
613
612
-
Transactions (see :ref:`managed-transactions-ref`) within a session can override the access mode passed to that session on construction.
614
+
Transactions (see :ref:`managed-transactions-ref`) within a session override the
615
+
access mode passed to that session on construction.
613
616
614
617
.. note::
615
-
The driver does not parse Cypher queries and cannot determine whether the access mode should be ``neo4j.ACCESS_WRITE`` or ``neo4j.ACCESS_READ``.
616
-
Since the access mode is not passed to the server, this can allow a ``neo4j.ACCESS_WRITE`` statement to be executed for a ``neo4j.ACCESS_READ`` call on a single instance.
617
-
Clustered environments are not susceptible to this loophole as cluster roles prevent it.
618
-
This behaviour should not be relied upon as the loophole may be closed in a future release.
619
-
618
+
The driver does not parse Cypher queries and cannot determine whether the
619
+
access mode should be ``neo4j.ACCESS_WRITE`` or ``neo4j.ACCESS_READ``.
620
+
This setting is only meant to enable the driver to perform correct routing,
621
+
*not* for enforcing access control. This means that, depending on the server
622
+
version and settings, the server or cluster might allow a write-statement to
623
+
be executed even when ``neo4j.ACCESS_READ`` is chosen. This behaviour should
624
+
not be relied upon as it can change with the server.
0 commit comments