Custom trigger: beforeCommit not containing basic transaction info like username on docker

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.

public Object beforeCommit( TransactionData data, Transaction transaction, GraphDatabaseService databaseService ) throws Exception
{ }

Any ideas about why this is happening?
Many thanks!

Do you have authentication enabled on the docker instance?

1 Like

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
as you can see in the following code line 237:

Many thanks for the support.