1

我已将 Neo4j 配置为在浏览器和螺栓协议中使用带有 https 的加密连接。我有一个用 CA 签名的有效证书,浏览器可以正常访问和运行查询。然后问题通过螺栓协议出现在密码外壳上。我收到此错误:

 cypher-shell --encryption true -d database -a bolt://ip_address:7687 -u user -p password--debug

Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
        at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
        at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
        at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
        ... 42 more

https 和 bolt 都使用相同的证书和私钥。TLS 配置为:

# Bolt SSL configuration
dbms.ssl.policy.bolt.enabled=true
dbms.ssl.policy.bolt.base_directory=certificates/bolt
dbms.ssl.policy.bolt.private_key=neo4j.key
dbms.ssl.policy.bolt.public_certificate=neo4j.crt

# Https SSL configuration                                                                                               dbms.ssl.policy.https.enabled=true
dbms.ssl.policy.https.base_directory=certificates/https
dbms.ssl.policy.https.private_key=neo4j.key
dbms.ssl.policy.https.public_certificate=neo4j.crt

# Bolt connector
dbms.connector.bolt.enabled=true
dbms.connector.bolt.tls_level=REQUIRED
#dbms.connector.bolt.listen_address=0.0.0.0:7687

# HTTP Connector. There can be zero or one HTTP connectors.                                                             dbms.connector.http.enabled=false
#dbms.connector.http.listen_address=:7474

# HTTPS Connector. There can be zero or one HTTPS connectors.
dbms.connector.https.enabled=true
#dbms.connector.https.listen_address=0.0.0.0:7473

我正在使用 Neo4j 4.0.3 社区版。

如何解决这个问题以使用螺栓协议?

4

1 回答 1

0

使用任一

cypher-shell -u user -p password --debug -a host --encryption true

或者

cypher-shell -u user -p password --debug -a bolt+s://host
于 2021-07-28T08:28:15.707 回答