@@ -79,19 +79,25 @@ Each supported scheme maps to a particular :class:`neo4j.Driver` subclass that i
79
79
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
80
80
| URI Scheme | Driver Object and Setting |
81
81
+========================+=======================================================================================================================================+
82
- | bolt | :ref: `bolt-driver-ref ` with no encryption. |
82
+ | bolt | :ref: `bolt-driver-ref ` with no encryption or with custom encryption configuration, see :ref: ` driver-configuration-ref `. |
83
83
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
84
84
| bolt+ssc | :ref: `bolt-driver-ref ` with encryption (accepts self signed certificates). |
85
85
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
86
86
| bolt+s | :ref: `bolt-driver-ref ` with encryption (accepts only certificates signed by a certificate authority), full certificate checks. |
87
87
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
88
- | neo4j | :ref: `neo4j-driver-ref ` with no encryption. |
88
+ | neo4j | :ref: `neo4j-driver-ref ` with no encryption or with custom encryption configuration, see :ref: ` driver-configuration-ref `. |
89
89
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
90
90
| neo4j+ssc | :ref: `neo4j-driver-ref ` with encryption (accepts self signed certificates). |
91
91
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
92
92
| neo4j+s | :ref: `neo4j-driver-ref ` with encryption (accepts only certificates signed by a certificate authority), full certificate checks. |
93
93
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
94
94
95
+
96
+ .. note ::
97
+
98
+ See also :ref: `encryption-config-note-ref ` to understand how the URI scheme relates to other encryption configuration options.
99
+
100
+
95
101
.. note ::
96
102
97
103
See https://neo4j.com/docs/operations-manual/current/configuration/ports/ for Neo4j ports.
@@ -173,6 +179,8 @@ Additional configuration can be provided via the :class:`neo4j.Driver` construct
173
179
+ :ref: `trust-ref `
174
180
+ :ref: `user-agent-ref `
175
181
182
+ :ref: `encryption-config-note-ref `
183
+
176
184
177
185
.. _session-connection-timeout-ref :
178
186
@@ -367,6 +375,9 @@ This setting does not have any effect if ``encrypted`` is set to ``False``.
367
375
certificate authority. This option is primarily intended for use with
368
376
full certificates.
369
377
378
+ The driver loads the trusted system CAs using Python's
379
+ :meth: `ssl.SSLContext.load_default_certs `.
380
+
370
381
:Default: ``neo4j.TRUST_SYSTEM_CA_SIGNED_CERTIFICATES ``.
371
382
372
383
@@ -381,6 +392,22 @@ Specify the client agent name.
381
392
382
393
383
394
395
+ .. _encryption-config-note-ref :
396
+
397
+ Note on Encryption Configuration
398
+ --------------------------------
399
+ There are different *mutually exclusive * ways of configuring TLS/SSL encryption behavior of the driver:
400
+
401
+ * Use a URI scheme ending in ``+s ``. This auto-configures the driver to use TLS and only trust system CAs.
402
+ * Use a URI scheme ending in ``+ssc ``. This auto-configures the driver to use TLS and trust any certificate.
403
+ * Use a URI scheme without suffix (i.e. ``neo4j:// `` or ``bolt:// ``) and one of the following mutually exclusive options:
404
+
405
+ * set :ref: `encrypted-ref ` to ``True `` and optionally configure :ref: `trust-ref ` to enable TLS with custom security
406
+ settings.
407
+ * or set ``encrypted=False `` (default) to disable TLS.
408
+
409
+
410
+
384
411
Driver Object Lifetime
385
412
======================
386
413
0 commit comments