summaryrefslogtreecommitdiff
path: root/jstests/ssl/mixed_mode_sharded.js
blob: 523393bff0722a14ba7c15122f22e55d042dd02c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
 * This test checks if different mixtures of ssl modes
 * in a sharded cluster can or cannot function
 *
 * TODO (SERVER-48261): Fix test to allow it to work with the resumable range deleter enabled.
 * @tags: [__TEMPORARILY_DISABLED__]
 */
load("jstests/ssl/libs/ssl_helpers.js");

// Due to mixed SSL mode settings, a shard will be unable to establish an outgoing
// connection to the config server in order to load relevant collection UUIDs into
// its config.cache.collections collection. The consistency check verifies the
// shard's config.cache.collections UUIDs, so it may fail.
TestData.skipCheckingUUIDsConsistentAcrossCluster = true;

print("=== Testing requireSSL/requireSSL cluster ===");
mixedShardTest(requireSSL, requireSSL, true);

print("=== Testing preferSSL/requireSSL cluster ===");
mixedShardTest(preferSSL, requireSSL, true);
mixedShardTest(requireSSL, preferSSL, true);

print("=== Testing allowSSL/preferSSL cluster ===");
mixedShardTest(preferSSL, allowSSL, true);
mixedShardTest(allowSSL, preferSSL, true);

print("=== Testing allowSSL/requireSSL cluster - SHOULD FAIL ===");
mixedShardTest(requireSSL, allowSSL, false);