[SERVER-34821] Log target connection database separately from username Created: 03/May/18  Updated: 29/Oct/23  Resolved: 14/Sep/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.1.4

Type: Improvement Priority: Minor - P4
Reporter: Benjamin Caimano (Inactive) Assignee: Jonathan Reams
Resolution: Fixed Votes: 0
Labels: neweng, platforms_security
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Security 2018-09-24
Participants:

 Description   

As of now, log statements for auth failure come in the form `my_user_name@db`. For better or worse, `my_user_name` and `db` are allowed to have at-signs. The log can get a bit confusing to parse in light of this:

2018-05-03T12:00:48.332-0400 I NETWORK  [listener] connection accepted from 127.0.0.1:44834 #8 (2 connections now open)
2018-05-03T12:00:48.332-0400 I NETWORK  [conn8] received client metadata from 127.0.0.1:44834 conn8: { driver: { name: "mongoc", version: "1.10.0-dev" }, os: { type: "Linux", name: "Fedora", version: "27", architecture: "x86_64" }, platform: "cfg=0x215680e9 posix=200809 stdc=201112 CC=GCC 5.4.0 CFLAGS="" LDFLAGS=""" }
2018-05-03T12:00:48.333-0400 I ACCESS   [conn8] SASL SCRAM-SHA-1 authentication failed for test\@@PIZZABAGEL.LOC on external from client 127.0.0.1:44834 ; UserNotFound: Could not find user test\@@PIZZABAGEL.LOC@external
2018-05-03T12:00:48.333-0400 I NETWORK  [conn8] end connection 127.0.0.1:44834 (1 connection now open) 

Ideally, the statement would read something like:

2018-05-03T12:00:48.333-0400 I ACCESS [conn8] SASL SCRAM-SHA-1 authentication failed for test\@@PIZZABAGEL.LOC on external from client 127.0.0.1:44834 ; UserNotFound: Could not find user 'test\@@PIZZABAGEL.LOC' for db 'external'.



 Comments   
Comment by Githook User [ 14/Sep/18 ]

Author:

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

Message: SERVER-34821 Log target connection database separately from username
Branch: master
https://github.com/mongodb/mongo/commit/85ba029f0857c21be48bf0b787e1f4c6e070766b

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