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
@@ -666,16 +666,21 @@ The default access mode.
666
666
667
667
A session can be given a default access mode on construction.
668
668
669
-
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.
669
+
This applies only in clustered environments and determines whether transactions
670
+
carried out within that session should be routed to a ``read`` or ``write``
671
+
server by default.
670
672
671
-
Transactions (see :ref:`managed-transactions-ref`) within a session can override the access mode passed to that session on construction.
673
+
Transactions (see :ref:`managed-transactions-ref`) within a session override the
674
+
access mode passed to that session on construction.
672
675
673
676
.. note::
674
-
The driver does not parse Cypher queries and cannot determine whether the access mode should be ``neo4j.ACCESS_WRITE`` or ``neo4j.ACCESS_READ``.
675
-
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.
676
-
Clustered environments are not susceptible to this loophole as cluster roles prevent it.
677
-
This behaviour should not be relied upon as the loophole may be closed in a future release.
678
-
677
+
The driver does not parse Cypher queries and cannot determine whether the
678
+
access mode should be ``neo4j.ACCESS_WRITE`` or ``neo4j.ACCESS_READ``.
679
+
This setting is only meant to enable the driver to perform correct routing,
680
+
*not* for enforcing access control. This means that, depending on the server
681
+
version and settings, the server or cluster might allow a write-statement to
682
+
be executed even when ``neo4j.ACCESS_READ`` is chosen. This behaviour should
683
+
not be relied upon as it can change with the server.
0 commit comments