Database plugin MongoDB Write concern not applied?

Hi Team,

We would like the vault to create/delete users in our mongodb replica set with a specific write concern (w=1).

We added the “write_concern” parameter in the vault connection config as:
write_concern=“{ "w": 1, "wtimeout": 5000 }” but with no effects (we made multiple tests), users are still being created without the writeConcern specified, and deleted with “writeConcern”:{“w”:“majority”,“wtimeout”:0 } (from mongodb logs)

We also tried to put it directly in the connection string of mongo.

We tried with vault version 1.9.0 and 1.12.0 and we are using mongo 5.0

Do you have any advice on this?
Thanks!

Dear _marco and Dear Community

I had a look at the source code of Vault and it seems that you’re right.

have a look to this function:

dropUserCmd := &dropUserCommand{
		Username:     req.Username,
		WriteConcern: writeconcern.New(writeconcern.WMajority()),
	}

it is inside \plugins\database\mongodb\mongodb.go the writeconcern is set to majority by deafult!!

How can we raise the bug to the development team?