neo4j-contrib / neovis.js

Neo4j + vis.js = neovis.js. Graph visualizations in the browser with data from Neo4j.
Apache License 2.0
1.61k stars 324 forks source link

Encryption/trust can only be configured either through URL or config, not both #291

Closed 4sm-ops closed 2 years ago

4sm-ops commented 2 years ago

Hi!

New BaseNeovisConfig does not have encrypted parameter. But error message somehow presume it is available.

https://neo4j-contrib.github.io/neovis.js/interfaces/BaseNeovisConfig.html

Encrypted is in OldNeoVisConfig.

https://neo4j-contrib.github.io/neovis.js/interfaces/OldNeoVisConfig.html

What will be the correct setup? Why connection to cloud Aura instance cause this error? Can I get a link to old driver for OldNeoVisConfig, so I can use https://github.com/neo4j-contrib/neovis.js/issues/227 solution? Because with 2.0.2 you cannot use old configuration file.

function draw() { var config = { containerId: "viz", neo4j: { serverUrl: "neo4j+s://ADDRESS:7687", serverUser: "neo4j", serverPassword: "PASS" },

I was able to find 1.5.0 driver, and successfully connect to my database. But I believe I should not use 2 years old driver.

thebestnom commented 2 years ago

I don't understand what is your error that you get 😅 it should work regardless

thebestnom commented 2 years ago

Ha... The docs are wrong,  https://neo4j.com/docs/api/javascript-driver/current/function/index.html#configuration Is the correct configuration for driverConfig You can absolutely use encrypted

4sm-ops commented 2 years ago

Hey @thebestnom

thank you for the prompt response. For the record, working config with 2 years old driver.

Screenshot 2022-09-16 at 15 16 13
thebestnom commented 2 years ago

Why? 😅

thebestnom commented 2 years ago

You can use old config, there is auto migrator function 😅

4sm-ops commented 2 years ago

When I use latest driver and recommended config I get Encryption/trust can only be configured either through URL or config, not both error.

Screenshot 2022-09-16 at 15 25 19 Screenshot 2022-09-16 at 15 30 02
4sm-ops commented 2 years ago

@thebestnom see above

thebestnom commented 2 years ago

This is neo4j driver problem https://github.com/grand-stack/grand-stack-starter/issues/129 This is their reasoning

4sm-ops commented 2 years ago
Screenshot 2022-09-16 at 15 34 12

neo4j:// - does not work, as encrypted: "ENCRYPTION_ON", is no longer supported, as far I understand.

could you please confirm that neovis is no longer compatible with cloud Aura?

thebestnom commented 2 years ago

Again, that's not neovis, that's neo4j driver 😅 you can even pass neo4j driver instance to the config in 2.x if you need somthing that missing from the config (there shouldn't be

I thin you need neo4j+s:// to make encryption on

4sm-ops commented 2 years ago

@thebestnom ok, neo4j+s:// does not work, I think I need to find neo4j driver developers

screenshot:

https://github.com/neo4j-contrib/neovis.js/issues/291#issuecomment-1249305300

thebestnom commented 2 years ago

I see why, the default config sends secure off and it gets sent 😅 put ENCRIPTION_ON in the driverConfig, it should work (without neo4j+s

4sm-ops commented 2 years ago

thanks a lot, @thebestnom

Working config for Cloud Aura:

{
neo4j: {
serverUrl: "neo4j://DBNAME.databases.neo4j.io",
serverUser: "neo4j",
serverPassword: "PASS",
   driverConfig: { 
   encrypted: "ENCRYPTION_ON",
   trust: "TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"
   }                
},
}