Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
10-28-2020 03:37 AM
Dear all,
I am building a plugin that creates a trigger to processes transaction data (created/updated/deleted nodes and relationships) and forwards events into an AMQ.
I am using the latest neo4j version (4.1.3), and I have encountered the following problem:
When the beforeCommit method is called, if I retrieve the username from the TransactionData object passed to the method on my local machine, I am able to get the username under which authorization state this transaction is running. The problem happens when the exact same code is executed on the out-of-the-box docker image. On this scenario, the username returned is always empty.
@Override
public Object beforeCommit( TransactionData data, Transaction transaction, GraphDatabaseService databaseService ) throws Exception
{ logger.info(data.getUsername() }
Any ideas about why this is happening?
Many thanks!
Regards
Solved! Go to Solution.
10-28-2020 04:22 PM
10-28-2020 04:22 PM
Do you have authentication enabled on the docker instance?
10-30-2020 12:10 AM
Hi! Thanks for the suggestion.
You were right, it seems I missinterpreted the NEO4J_AUTH parameter. I assumed it was used to stablish a password for the default neo4j user, but it seems that when it's set to none, it also sets
dbms.security.auth.enabled=false
as you can see in the following code line 237:
Many thanks for the support.
Regards.
All the sessions of the conference are now available online