summaryrefslogtreecommitdiff
path: root/src/mongo/s/commands
diff options
context:
space:
mode:
authorSara Golemon <sara.golemon@mongodb.com>2020-05-04 14:47:29 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-05-04 22:58:44 +0000
commit845b52ae1c13f10d79993950888819347fac3aa3 (patch)
tree85cd651ccaf3f44ed9a200b85959f7d1e1f9899e /src/mongo/s/commands
parentf49817283643d6ba10be35e6dc48a8f513e8f058 (diff)
downloadmongo-845b52ae1c13f10d79993950888819347fac3aa3.tar.gz
SERVER-47908 Wire speculativeAuthenticate into mongos
Diffstat (limited to 'src/mongo/s/commands')
-rw-r--r--src/mongo/s/commands/SConscript1
-rw-r--r--src/mongo/s/commands/cluster_command_test_fixture.cpp6
-rw-r--r--src/mongo/s/commands/cluster_is_master_cmd.cpp3
3 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/s/commands/SConscript b/src/mongo/s/commands/SConscript
index 0a3a215c07c..579bacdc54d 100644
--- a/src/mongo/s/commands/SConscript
+++ b/src/mongo/s/commands/SConscript
@@ -124,6 +124,7 @@ env.Library(
'$BUILD_DIR/mongo/db/shared_request_handling',
'$BUILD_DIR/mongo/db/logical_session_cache_impl',
'$BUILD_DIR/mongo/db/read_write_concern_defaults',
+ '$BUILD_DIR/mongo/db/repl/speculative_authenticate',
'$BUILD_DIR/mongo/db/pipeline/aggregation',
'$BUILD_DIR/mongo/db/query/command_request_response',
'$BUILD_DIR/mongo/db/query/map_reduce_output_format',
diff --git a/src/mongo/s/commands/cluster_command_test_fixture.cpp b/src/mongo/s/commands/cluster_command_test_fixture.cpp
index 243888c115a..f3fe69feda8 100644
--- a/src/mongo/s/commands/cluster_command_test_fixture.cpp
+++ b/src/mongo/s/commands/cluster_command_test_fixture.cpp
@@ -43,6 +43,7 @@
#include "mongo/db/logical_time_validator.h"
#include "mongo/s/cluster_last_error_info.h"
#include "mongo/util/fail_point.h"
+#include "mongo/util/options_parser/startup_option_init.h"
#include "mongo/util/tick_source_mock.h"
namespace mongo {
@@ -304,4 +305,9 @@ void ClusterCommandTestFixture::appendTxnResponseMetadata(BSONObjBuilder& bob) {
txnResponseMetadata.serialize(&bob);
}
+// Satisfies dependency from StoreSASLOPtions.
+MONGO_STARTUP_OPTIONS_STORE(CoreOptions)(InitializerContext*) {
+ return Status::OK();
+}
+
} // namespace mongo
diff --git a/src/mongo/s/commands/cluster_is_master_cmd.cpp b/src/mongo/s/commands/cluster_is_master_cmd.cpp
index 4c9412365ab..4cc586185d4 100644
--- a/src/mongo/s/commands/cluster_is_master_cmd.cpp
+++ b/src/mongo/s/commands/cluster_is_master_cmd.cpp
@@ -37,6 +37,7 @@
#include "mongo/db/logical_session_id.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/ops/write_ops.h"
+#include "mongo/db/repl/speculative_auth.h"
#include "mongo/db/wire_version.h"
#include "mongo/logv2/log.h"
#include "mongo/rpc/metadata/client_metadata.h"
@@ -214,6 +215,8 @@ public:
}
}
+ handleIsMasterSpeculativeAuth(opCtx, cmdObj, &result);
+
return true;
}