summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2020-02-14 16:52:00 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-18 16:53:37 +0000
commit19f7a856c0b1c80c378191d5ae3451cdd09e5c61 (patch)
tree4dfdc1862d69b72168fcb4e3e1d363e1ac9bc944 /src
parent14240d538a74be094badf4936a56cb3232d89f1d (diff)
downloadmongo-19f7a856c0b1c80c378191d5ae3451cdd09e5c61.tar.gz
SERVER-46026 Fix ssl suite when using JSON logs
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/commands/authentication_commands.cpp14
-rw-r--r--src/mongo/util/net/ssl_manager.cpp16
2 files changed, 15 insertions, 15 deletions
diff --git a/src/mongo/db/commands/authentication_commands.cpp b/src/mongo/db/commands/authentication_commands.cpp
index 9ce82d61531..3891bc6e330 100644
--- a/src/mongo/db/commands/authentication_commands.cpp
+++ b/src/mongo/db/commands/authentication_commands.cpp
@@ -291,10 +291,10 @@ bool CmdAuthenticate::run(OperationContext* opCtx,
if (!serverGlobalParams.quiet.load()) {
auto const client = opCtx->getClient();
LOGV2(20428,
- "Failed to authenticate {user} from client {client_getRemote} with mechanism "
+ "Failed to authenticate {user} from client {client} with mechanism "
"{mechanism}: {status}",
"user"_attr = user,
- "client_getRemote"_attr = client->getRemote(),
+ "client"_attr = client->getRemote(),
"mechanism"_attr = mechanism,
"status"_attr = status);
}
@@ -311,11 +311,11 @@ bool CmdAuthenticate::run(OperationContext* opCtx,
if (!serverGlobalParams.quiet.load()) {
LOGV2(20429,
- "Successfully authenticated as principal {user_getUser} on {user_getDB} from client "
- "{opCtx_getClient_session_remote}",
- "user_getUser"_attr = user.getUser(),
- "user_getDB"_attr = user.getDB(),
- "opCtx_getClient_session_remote"_attr = opCtx->getClient()->session()->remote());
+ "Successfully authenticated as principal {principalName} on {DB} from client "
+ "{client}",
+ "principalName"_attr = user.getUser(),
+ "DB"_attr = user.getDB(),
+ "client"_attr = opCtx->getClient()->session()->remote());
}
result.append("dbname", user.getDB());
diff --git a/src/mongo/util/net/ssl_manager.cpp b/src/mongo/util/net/ssl_manager.cpp
index 1fcc08f0205..fd888831e5c 100644
--- a/src/mongo/util/net/ssl_manager.cpp
+++ b/src/mongo/util/net/ssl_manager.cpp
@@ -1128,11 +1128,10 @@ void recordTLSVersion(TLSVersion version, const HostAndPort& hostForLogging) {
}
if (!versionString.empty()) {
- LOGV2(
- 23218,
- "Accepted connection with TLS Version {versionString} from connection {hostForLogging}",
- "versionString"_attr = versionString,
- "hostForLogging"_attr = hostForLogging);
+ LOGV2(23218,
+ "Accepted connection with TLS Version {version} from connection {connection}",
+ "version"_attr = versionString,
+ "connection"_attr = hostForLogging);
}
}
@@ -1160,13 +1159,14 @@ bool hostNameMatchForX509Certificates(std::string nameToMatch, std::string certH
}
void tlsEmitWarningExpiringClientCertificate(const SSLX509Name& peer) {
- LOGV2_WARNING(23221, "Peer certificate '{peer}' expires soon", "peer"_attr = peer);
+ LOGV2_WARNING(
+ 23221, "Peer certificate '{peerSubjectName}' expires soon", "peerSubjectName"_attr = peer);
}
void tlsEmitWarningExpiringClientCertificate(const SSLX509Name& peer, Days days) {
LOGV2_WARNING(23222,
- "Peer certificate '{peer}' expires in {days}",
- "peer"_attr = peer,
+ "Peer certificate '{peerSubjectName}' expires in {days}",
+ "peerSubjectName"_attr = peer,
"days"_attr = days);
}