Modifier and Type | Class and Description |
---|---|
static class |
Config.TrustStrategy.Strategy
The trust strategy that the driver supports
|
Modifier and Type | Method and Description |
---|---|
File |
certFile() |
Config.TrustStrategy.Strategy |
strategy()
Return the strategy type desired.
|
static Config.TrustStrategy |
trustAllCertificates()
Trust strategy for certificates that can be verified through the local system store.
|
static Config.TrustStrategy |
trustCustomCertificateSignedBy(File certFile)
Only encrypted connections to Neo4j instances with certificates signed by a trusted certificate will be accepted.
|
static Config.TrustStrategy |
trustOnFirstUse(File knownHostsFile)
Deprecated.
in 1.1 in favour of
trustAllCertificates() |
static Config.TrustStrategy |
trustSignedBy(File certFile)
Deprecated.
|
static Config.TrustStrategy |
trustSystemCertificates()
Trust strategy for certificates that can be verified through the local system store.
|
public Config.TrustStrategy.Strategy strategy()
public File certFile()
@Deprecated public static Config.TrustStrategy trustSignedBy(File certFile)
trustCustomCertificateSignedBy(File)
instead.certFile
- the trusted certificate filepublic static Config.TrustStrategy trustCustomCertificateSignedBy(File certFile)
The certificate(s) in the file must be encoded using PEM encoding, meaning the certificates in the file should be encoded using Base64, and each certificate is bounded at the beginning by "-----BEGIN CERTIFICATE-----", and bounded at the end by "-----END CERTIFICATE-----".
certFile
- the trusted certificate filepublic static Config.TrustStrategy trustSystemCertificates()
public static Config.TrustStrategy trustAllCertificates()
@Deprecated public static Config.TrustStrategy trustOnFirstUse(File knownHostsFile)
trustAllCertificates()
Known Neo4j hosts are recorded in a file, certFile
.
Each time we reconnect to a known host, we verify that its certificate remains the same, guarding against attackers intercepting our communication.
Note that this approach is vulnerable to man-in-the-middle attacks the very first time you connect to a new Neo4j instance.
If you do not trust the network you are connecting over, consider using trustCustomCertificateSignedBy(File)
signed certificates} instead, or manually adding the
trusted host line into the specified file.
knownHostsFile
- a file where known certificates are stored.Copyright © 2018. All rights reserved.