Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
10-21-2020 01:48 AM
Hi all,
We are using the NODEJS neo4j driver to connect to a neo4j community instance neo4j:4.1.2.
That instance is configured to use BOLT with SSL:
dbms.default_listen_address=0.0.0.0
# BOLT Connector
dbms.connector.bolt.tls_level=REQUIRED
dbms.ssl.policy.bolt.enabled=true
dbms.ssl.policy.bolt.private_key=/var/lib/neo4j/certificates/bolt/private.key
dbms.ssl.policy.bolt.public_certificate=/var/lib/neo4j/certificates/bolt/public.crt
dbms.ssl.policy.bolt.client_auth=NONE
dbms.connector.bolt.listen_address=0.0.0.0:7687
# HTTPS connector
dbms.connector.http.enabled=false
dbms.connector.https.enabled=true
dbms.ssl.policy.https.enabled=true
dbms.ssl.policy.https.client_auth=NONE
dbms.ssl.policy.https.private_key=/var/lib/neo4j/certificates/https/private.key
dbms.ssl.policy.https.public_certificate=/var/lib/neo4j/certificates/https/public.crt
dbms.connector.http.listen_address=0.0.0.0:7473
# Directories
dbms.ssl.policy.bolt.base_directory=/var/lib/neo4j/certificates/bolt
dbms.ssl.policy.https.base_directory=/var/lib/neo4j/certificates/https
When the Neo4j javascript driver is configured in this way:
driver = neo4j.driver(
`bolt://${NEO4J_HOST}:${NEO4J_BOLT_PORT}`,
neo4j.auth.basic(NEO4J_BOLT_USERNAME, NEO4J_BOLT_PASSWORD),
{
encrypted: 'ENCRYPTION_ON',
},
);
It works perfectly when NEO4J_HOST is equals to MY.DOMAIN.COM (for which the certificates where issued).
BUT when I want to connect to it using an internal domain INTERNAL.DOMAIN.COM I receive ERR_TLS_CERT_ALTNAME_INVALID even though I added the same "public.crt" to the trustedCertificates as shown below:
driver = neo4j.driver(
`bolt://${NEO4J_HOST}:${NEO4J_BOLT_PORT}`,
neo4j.auth.basic(NEO4J_BOLT_USERNAME, NEO4J_BOLT_PASSWORD),
{
encrypted: 'ENCRYPTION_ON',
trust: 'TRUST_CUSTOM_CA_SIGNED_CERTIFICATES',
trustedCertificates: [path.resolve(__dirname, './public_cert.pem')],
},
);
Any kind of help is more than welcome due to we use this in production,
Regards.
12-15-2020 12:37 AM
Hi all,
Might somebody give me a hand there?
Thanks in advance,
Regards.
07-08-2021 01:07 AM
I'm not sure what you want to achieve and how your SSL certificates are set up. So here's a general explanation of your two options, that both do encryption + authentication (checking the signature and thus making sure you're talking to the right server):
I hope this is of some help.
07-08-2021 03:18 AM
More comments from the team:
bolt+ssc
(but remove encrypted: 'ENCRYPTION_ON' that would conflict)All the sessions of the conference are now available online