Skip to content
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

Set also server.config.strict_validation.enabled to false if password.length < 8 #13

Open
meistermeier opened this issue Jun 20, 2023 · 1 comment

Comments

@meistermeier
Copy link
Contributor

meistermeier commented Jun 20, 2023

Adding this "feature" to Testcontainers (Java) Neo4j right now and noticed that the property is only valid in 5.3+.
This means that every other 5.x before needs to get the server.config.strict_validation.enabled flag set to false.
(NEO4J_server_config_strict__validation_enabled in Neo4j Docker env).
Also including some kind of warning that
a) the password is shorter than the default and
b) server config does not get validated
might be good.
Referring to this line:

Some((
"NEO4J_dbms_security_auth__minimum__password__length".to_owned(),
pass.len().to_string(),

Obviously I have no idea how to move this Item into a list of items, otherwise I would have taken the chance to publish a new PR :D

Edit: Reflecting my idea: It might be better to add another configuration method to set the server config into the "non-strict" mode. Cleaner API. This way the user does this intentionally.
Older images will not start and the new method points out exactly this in the docs.

@knutwalker
Copy link
Owner

In #11 the with_version method validates the version and the call might fail.
I can see adding similar validation to with_password to return an Err when the size is less than 8. Maybe we only need to do that on 5.3, but always can be a good start. We would no longer need to mess around with the config.
I wanted to add with_config in the future, because I saw it on the Java module, and then users can do their config crimes if they need to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants