summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jstests/ssl/initial_sync1_x509.js4
-rw-r--r--src/mongo/db/auth/security_key.cpp4
-rw-r--r--src/mongo/db/commands/authentication_commands.cpp2
-rw-r--r--src/mongo/db/initialize_server_global_state.cpp2
-rw-r--r--src/mongo/db/server_options.cpp8
-rw-r--r--src/mongo/util/net/ssl_options.cpp4
6 files changed, 12 insertions, 12 deletions
diff --git a/jstests/ssl/initial_sync1_x509.js b/jstests/ssl/initial_sync1_x509.js
index 255a676fea8..410fc2ba827 100644
--- a/jstests/ssl/initial_sync1_x509.js
+++ b/jstests/ssl/initial_sync1_x509.js
@@ -11,12 +11,12 @@ x509_options1 = Object.merge(common_options,
var x509_options2 = x509_options1;
load("jstests/replsets/initial_sync1.js");
-// Mixed clusterAuthMode: sendX509 and sendKeyfile and try adding --auth
+// Mixed clusterAuthMode: sendX509 and sendKeyFile and try adding --auth
x509_options1 = Object.merge(common_options,
{sslClusterFile: "jstests/libs/cluster-cert.pem",
clusterAuthMode: "sendX509",
auth: ""});
-x509_options2 = Object.merge(common_options, {clusterAuthMode: "sendKeyfile"});
+x509_options2 = Object.merge(common_options, {clusterAuthMode: "sendKeyFile"});
load("jstests/replsets/initial_sync1.js");
// Mixed clusterAuthMode: x509 and sendX509, use the PEMKeyFile for outgoing connections
diff --git a/src/mongo/db/auth/security_key.cpp b/src/mongo/db/auth/security_key.cpp
index e69696d6a6b..7227c025511 100644
--- a/src/mongo/db/auth/security_key.cpp
+++ b/src/mongo/db/auth/security_key.cpp
@@ -141,8 +141,8 @@ namespace mongo {
internalSecurity.user->getName().getUser().toString(), str);
internalSecurity.user->setCredentials(credentials);
- if (serverGlobalParams.clusterAuthMode == "keyfile" ||
- serverGlobalParams.clusterAuthMode == "sendKeyfile") {
+ if (serverGlobalParams.clusterAuthMode == "keyFile" ||
+ serverGlobalParams.clusterAuthMode == "sendKeyFile") {
setInternalUserAuthParams(
BSON(saslCommandMechanismFieldName << "MONGODB-CR" <<
saslCommandUserSourceFieldName <<
diff --git a/src/mongo/db/commands/authentication_commands.cpp b/src/mongo/db/commands/authentication_commands.cpp
index 0fba00753c3..bfb15aff3a5 100644
--- a/src/mongo/db/commands/authentication_commands.cpp
+++ b/src/mongo/db/commands/authentication_commands.cpp
@@ -275,7 +275,7 @@ namespace mongo {
// Handle internal cluster member auth, only applies to server-server connections
if (srvClusterId == peerClusterId) {
if (serverGlobalParams.clusterAuthMode.empty() ||
- serverGlobalParams.clusterAuthMode == "keyfile") {
+ serverGlobalParams.clusterAuthMode == "keyFile") {
return Status(ErrorCodes::AuthenticationFailed, "The provided certificate "
"can only be used for cluster authentication, not client "
"authentication. The current configuration does not allow "
diff --git a/src/mongo/db/initialize_server_global_state.cpp b/src/mongo/db/initialize_server_global_state.cpp
index d2360281896..d9324cd3ae5 100644
--- a/src/mongo/db/initialize_server_global_state.cpp
+++ b/src/mongo/db/initialize_server_global_state.cpp
@@ -328,7 +328,7 @@ namespace mongo {
}
// Auto-enable auth except if clusterAuthMode is not set.
- // clusterAuthMode is automatically set if a --keyfile parameter is provided.
+ // clusterAuthMode is automatically set if a --keyFile parameter is provided.
if (!serverGlobalParams.clusterAuthMode.empty()) {
getGlobalAuthorizationManager()->setAuthEnabled(true);
}
diff --git a/src/mongo/db/server_options.cpp b/src/mongo/db/server_options.cpp
index 75def3d8ce8..8321d8acc17 100644
--- a/src/mongo/db/server_options.cpp
+++ b/src/mongo/db/server_options.cpp
@@ -189,7 +189,7 @@ namespace {
options->addOptionChaining("clusterAuthMode", "clusterAuthMode", moe::String,
"Authentication mode used for cluster authentication. Alternatives are "
- "(keyfile|sendKeyfile|sendX509|x509)");
+ "(keyFile|sendKeyFile|sendX509|x509)");
#ifndef _WIN32
options->addOptionChaining("nounixsocket", "nounixsocket", moe::Switch,
@@ -548,7 +548,7 @@ namespace {
}
}
if (!params.count("clusterAuthMode") && params.count("keyFile")){
- serverGlobalParams.clusterAuthMode = "keyfile";
+ serverGlobalParams.clusterAuthMode = "keyFile";
}
#ifdef MONGO_SSL
@@ -557,8 +557,8 @@ namespace {
return ret;
}
#else // ifdef MONGO_SSL
- // Keyfile is currently the only supported value if not using SSL
- if (params.count("clusterAuthMode") && serverGlobalParams.clusterAuthMode != "keyfile") {
+ // keyFile is currently the only supported value if not using SSL
+ if (params.count("clusterAuthMode") && serverGlobalParams.clusterAuthMode != "keyFile") {
StringBuilder sb;
sb << "unsupported value for clusterAuthMode " << serverGlobalParams.clusterAuthMode;
return Status(ErrorCodes::BadValue, sb.str());
diff --git a/src/mongo/util/net/ssl_options.cpp b/src/mongo/util/net/ssl_options.cpp
index 882244c8754..47994dc6511 100644
--- a/src/mongo/util/net/ssl_options.cpp
+++ b/src/mongo/util/net/ssl_options.cpp
@@ -175,7 +175,7 @@ namespace mongo {
"need to enable SSL via the sslMode flag when "
"using SSL configuration parameters");
}
- if (serverGlobalParams.clusterAuthMode == "sendKeyfile" ||
+ if (serverGlobalParams.clusterAuthMode == "sendKeyFile" ||
serverGlobalParams.clusterAuthMode == "sendX509" ||
serverGlobalParams.clusterAuthMode == "x509") {
if (sslGlobalParams.sslMode.load() == SSLGlobalParams::SSLMode_noSSL){
@@ -183,7 +183,7 @@ namespace mongo {
}
}
else if (params.count("clusterAuthMode") &&
- serverGlobalParams.clusterAuthMode != "keyfile") {
+ serverGlobalParams.clusterAuthMode != "keyFile") {
StringBuilder sb;
sb << "unsupported value for clusterAuthMode " << serverGlobalParams.clusterAuthMode;
return Status(ErrorCodes::BadValue, sb.str());