【问题标题】:How to enable TLS on bolt protocol on Noe4j?如何在 Noe4j 上的 Bolt 协议上启用 TLS?
【发布时间】:2020-05-01 11:49:33
【问题描述】:

我已将 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 社区版。

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

【问题讨论】:

    标签: neo4j cryptography tls1.2 bolt


    【解决方案1】:

    使用任一

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

    或者

    cypher-shell -u user -p password --debug -a bolt+s://host
    

    【讨论】:

    • 虽然此代码可能会解决问题,including an explanation 关于如何以及为什么解决问题将真正有助于提高您的帖子质量,并可能导致更多的赞成票。请记住,您正在为将来的读者回答问题,而不仅仅是现在提问的人。请edit您的回答添加解释并说明适用的限制和假设。
    猜你喜欢
    • 2016-08-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多