-
Type: Task
-
Resolution: Done
-
Priority: Critical - P2
-
Affects Version/s: None
Audit Filter examples on the following page, if they are copy pasted into a MongoDB configuration, will not produce the desired results for `findAndModify()` operations. If a customer copy pastes these examples into their environment and tests, they will not be successful.
- For all examples, where it is currently "findandmodify", needs to be changed to "findAndModify" for it to work. I found 6 examples on that page that need to be changed.
Please see updated examples with the correct case sensitivity:
{ atype: "authCheck", "param.command": \{ $in: [ "find", "insert", "delete", "update", "findAndModify" ] }}
mongod --dbpath data/db --auth --setParameter auditAuthorizationSuccess=true --auditDestination file --auditFilter '{ atype: "authCheck", "param.command":
{ $in: [ "find", "insert", "delete", "update", "findAndModify" ] }}' --auditFormat BSON --auditPath data/db/auditLog.bson
storage:
dbPath: data/db
security:
authorization: enabled
auditLog:
destination: file
format: BSON
path: data/db/auditLog.bson
filter: '{ atype: "authCheck", "param.command":
}'
setParameter: { auditAuthorizationSuccess: true }
}
mongod --dbpath data/db --auth --setParameter auditAuthorizationSuccess=true --auditDestination file --auditFilter '{ atype: "authCheck", "param.ns": "test.orders", "param.command":
}' --auditFormat BSON --auditPath data/db/auditLog.bson
storage:
dbPath: data/db
security:
authorization: enabled
auditLog:
destination: file
format: BSON
path: data/db/auditLog.bson
filter: '{ atype: "authCheck", "param.ns": "test.orders", "param.command":
}'
setParameter: { auditAuthorizationSuccess: true }