Neo4j-PHP-OGM icon indicating copy to clipboard operation
Neo4j-PHP-OGM copied to clipboard

New Neo4j REST Auth Rules

Open lrezek opened this issue 9 years ago • 4 comments

I was doing some work on an OGM of my own, and I noticed that Neo4J changed their REST authentication rules relatively recently. You must not only supply a password now, but you have to change it after using it too. You can read more about that here.

This means your tests will not pass on Travis CI next time you push. I've gotten around this in my own OGM by setting the password after install via REST client (HTTPie). You can see the Travis configuration for that here.

Unfortunately, that also means you'll have to change your default credentials in your tests...

lrezek avatar Apr 10 '15 04:04 lrezek

Test failure happened: https://travis-ci.org/lphuberdeau/Neo4j-PHP-OGM/builds/58797847

improved-broccoli avatar Apr 16 '15 19:04 improved-broccoli

Any possibility to change the password twice sequentially and bring it back to the original one?

lphuberdeau avatar Apr 16 '15 19:04 lphuberdeau

I'm not sure if you can change it back to the default after changing it, but I noticed that your default credentials are null/null in your configuration class.

That means you'll need to supply a value in there anyways, regardless of if you can change it back to default or not (which also means you'd have to take another look at your configuration tests).

If you prefer to do some file writing, you can edit the config file for Neo4J in travis.yml and disable the authentication before starting it. There's some information on that here, but I haven't tried it.

lrezek avatar Apr 17 '15 00:04 lrezek

You can use sed to change the configuration setting in the file :

sed -i.bak 's/^\(dbms\.security\.auth_enabled=\).*/\1false/' ./conf/neo4j-server.properties

ikwattro avatar May 16 '15 23:05 ikwattro