[SERVER-12049] Redact password data from profiler/slowms output for user management commands Created: 11/Dec/13  Updated: 11/Jul/16  Resolved: 15/Jan/14

Status: Closed
Project: Core Server
Component/s: Logging
Affects Version/s: 2.5.4
Fix Version/s: 2.5.5

Type: Bug Priority: Major - P3
Reporter: Andreas Nilsson Assignee: Andreas Nilsson
Resolution: Done Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-10869 Redact password data from logs for us... Closed
related to SERVER-16324 Command execution log line displays "... Closed
is related to SERVER-12252 Fix mongod log output for write commands Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Reproduce:
./mongo
> use foo
> db.setProfilingLevel(0,1) // any command running for longer than 1 ms will be written to the log
> for (var i=0;i<10000;i++) { db.foo.insert(

{a:i}

) }

server log output:
[conn1} command admin.$cmd command: { insert: "foo", documents: [

{ _id: ObjectId('52a8c1099cb6ca0e83ee194e'), a: 249.0 }

], ordered: true } keyUpdates:0 reslen:40 12ms
[conn1] command admin.$cmd command: { insert: "foo", documents: [

{ _id: ObjectId('52a8c10a9cb6ca0e83ee2f1a'), a: 5829.0 }

], ordered: true } keyUpdates:0 reslen:40 2ms

Participants:

 Description   

Any command running for longer than the profiling limit slowms will be outputted in its entirety to the log. More specifically If I create the admin DB through a createUser command the user's username and password will be outputted in clear with default profiling since the command runs for longer than 100 ms doing index creation.

Lowering the slowms variable will give more frequent command output.



 Comments   
Comment by Githook User [ 15/Jan/14 ]

Author:

{u'username': u'agralius', u'name': u'Andreas Nilsson', u'email': u'andreas.nilsson@10gen.com'}

Message: SERVER-12049 Redact sensitive data from slowms output
Branch: master
https://github.com/mongodb/mongo/commit/bc25799bbeaee8e6133804ffa6fece31e8a62236

Generated at Thu Feb 08 03:27:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.