-
Notifications
You must be signed in to change notification settings - Fork 15.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
community[patch]: change default Neo4j username/password #25226
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
Hmm when auth is disabled, wouldn't it rather leave off the auth parameter in the driver? Missing credentials is actually more helpful than "wrong credentials" here ... I can imagine searching for the bug e.g. a wrong path or a misspelled env variable for ages when it says wrong credentials instead of missing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"" credentials can be specified manually by the user, handled here with an if-else
cc @tomasonjo |
LGTM
V čet., 29. avg. 2024, 11:27 je oseba Bagatur ***@***.***>
napisala:
… cc @tomasonjo <https://github.com/tomasonjo>
—
Reply to this email directly, view it on GitHub
<#25226 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEYGGTMUEQRW7WQG4EYEOY3ZT2BJ7AVCNFSM6AAAAABMIHDA36VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJWGU4TGNBTGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
needs to be formatted, otherwise lgtm |
Thanks @hwchase17 -- sorry to have missed the linting issue, it should be green-lit now |
Description:
Change the default Neo4j username/password (when not supplied as environment variable or in code) from
None
to""
.Neo4j has an option to disable auth which is helpful when developing. When auth is disabled, the username / password through the
neo4j
module should be""
(ie an empty string).Empty strings get marked as false in
langchain_core.utils.env.get_from_dict_or_env
-- changing this code / behaviour would have a wide impact and is undesirable.In order to both allow access to Neo4j with auth disabled and not impact
langchain_core
this patch is presented. The downside would be that if a user forgets to set NEO4J_USERNAME or NEO4J_PASSWORD they would see an invalid credentials error rather than missing credentials error. This could be mitigated but would result in a less elegant patch!Issue:
Fix issue where langchain cannot communicate with Neo4j if Neo4j auth is disabled.
Twitter handle: @danodonovan