mongo/jstests/ssl/mixed_mode_sharded.js
wolfee 19bac3d8eb SERVER-102527 Check for connection from replicaset to config server (#35024)
GitOrigin-RevId: 5359405fb4cf03659bc20dfa930bfe128f7f8479
2025-04-17 19:03:49 +00:00

27 lines
1.1 KiB
JavaScript

/**
* This test checks if different mixtures of ssl modes
* in a sharded cluster can or cannot function
*/
import {allowTLS, mixedShardTest, preferTLS, requireTLS} from "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 requireTLS/requireTLS cluster ===");
mixedShardTest(requireTLS, requireTLS, true);
print("=== Testing preferTLS/requireTLS cluster ===");
mixedShardTest(preferTLS, requireTLS, true);
mixedShardTest(requireTLS, preferTLS, true);
print("=== Testing allowTLS/preferTLS cluster ===");
mixedShardTest(preferTLS, allowTLS, true);
mixedShardTest(allowTLS, preferTLS, true);
print("=== Testing allowTLS/requireTLS cluster - SHOULD FAIL ===");
mixedShardTest(allowTLS, requireTLS, false);
mixedShardTest(requireTLS, allowTLS, false);