When using authentication and log redaction, issuing a find command the query is displayed in the log file if the user is not authorized to run the command:
Using OP_QUERY legacy find
2018-02-13T14:19:54.531-0500 I QUERY [conn1] assertion Unauthorized: not authorized for query on test.foo ns:test.foo query:{ _id: 123.0 }
Using find command
2018-02-13T14:20:14.811-0500 I ACCESS [conn2] Unauthorized: not authorized on test to execute command { find: "foo", filter: { _id: 123.0 }, $db: "test" }
- is related to
-
SERVER-34003 passwords are not redacted from unrecognized commands
- Closed
- related to
-
SERVER-33857 Missing log redaction due to confusion with Command::redactForLogging()
- Closed