[SERVER-39820] Add the client IP address to the successful authentication log message Created: 25/Feb/19  Updated: 29/Oct/23  Resolved: 26/Mar/19

Status: Closed
Project: Core Server
Component/s: Logging, Security
Affects Version/s: None
Fix Version/s: 3.4.21, 3.6.13, 4.1.10, 4.0.10

Type: Improvement Priority: Major - P3
Reporter: Cailin Nelson Assignee: Jonathan Reams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Minor Change
Backport Requested:
v4.0, v3.6, v3.4
Sprint: Security 2019-03-25, Security 2019-04-08
Participants:

 Description   

It would be much easier for customers to produce a report of authentication successes and failures with the IP address if the authentication success message in the log file included the IP address.

At the moment, a successful authentication log message does not include the IP address:

2019-02-25T16:27:23.805+0000 I ACCESS   [conn63538] Successfully authenticated as principal admin on admin

While the failure authentication log message does include the IP address

2019-02-25T16:23:12.863+0000 I ACCESS   [conn63518] SCRAM-SHA-1 authentication failed for admin on admin from client 206.252.195.126:54790 ; AuthenticationFailed: SCRAM-SHA-1 authentication failed, storedKey mismatch

Adding the IP address to the success message would allow customer to easily monitor for situations such as "Were there any successful authentication requests from IPs outside of those I believe I have whitelisted in my firewall?".



 Comments   
Comment by Githook User [ 17/Jun/19 ]

Author:

{'name': 'Ben Caimano', 'email': 'ben.caimano@10gen.com'}

Message: SERVER-39819 SERVER-39820 Add HostGroup Controller impl to tie together replSets
Branch: master
https://github.com/mongodb/mongo/commit/666e5276aa6b22e59bf91a5d0e5883648b9a0865

Comment by Githook User [ 17/Jun/19 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com'}

Message: SERVER-39819 SERVER-39820 Fix lint
Branch: master
https://github.com/mongodb/mongo/commit/387e1ba58a76e67df4e3a0f423e8f6870de5241d

Comment by Luke Chen [ 11/Apr/19 ]

Fixing up fixversion as this ticket was not included as part of 4.0.9 release.

Comment by Githook User [ 08/Apr/19 ]

Author:

{'name': 'Jonathan Reams', 'username': 'jbreams', 'email': 'jbreams@mongodb.com'}

Message: SERVER-39820 Include client IP in log message for successful authentication

(cherry picked from commit 0a847ef8453015e8b622595692b2fde0488486a6)
(cherry picked from commit 4a515ef5692d48efffb74c4fe9e1a297bd063aa3)
Branch: v3.4
https://github.com/mongodb/mongo/commit/51add9e4cdaf3ded4c0d0ff3666cb7927367c9c3

Comment by Githook User [ 08/Apr/19 ]

Author:

{'name': 'Jonathan Reams', 'username': 'jbreams', 'email': 'jbreams@mongodb.com'}

Message: SERVER-39820 Include client IP in log message for successful authentication

(cherry picked from commit 0a847ef8453015e8b622595692b2fde0488486a6)
Branch: v3.6
https://github.com/mongodb/mongo/commit/e60683d159175672c983ceb73b1a5002cbd38b38

Comment by Githook User [ 08/Apr/19 ]

Author:

{'name': 'Jonathan Reams', 'username': 'jbreams', 'email': 'jbreams@mongodb.com'}

Message: SERVER-39820 Include client IP in log message for successful authentication

(cherry picked from commit 0a847ef8453015e8b622595692b2fde0488486a6)
Branch: v4.0
https://github.com/mongodb/mongo/commit/3a5b4a17f2a3e148ab1e76cb205a8da636cd64f5

Comment by Githook User [ 26/Mar/19 ]

Author:

{'email': 'jbreams@mongodb.com', 'name': 'Jonathan Reams', 'username': 'jbreams'}

Message: SERVER-39820 Include client IP in log message for successful authentication
Branch: master
https://github.com/mongodb/mongo/commit/0a847ef8453015e8b622595692b2fde0488486a6

Comment by Craig Homa [ 25/Feb/19 ]

Hey cailin.nelson, the team is planning to work on this next quarter and backport it where needed. Please let us know if you need it sooner.

Generated at Thu Feb 08 04:53:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.