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
29
30
31
32
33
34
35
36
37
|
// Tests access control upgrade on a sharded cluster
// The purpose is to verify the connectivity between mongos, config server, and the shards
load('jstests/ssl/libs/ssl_helpers.js');
(function() {
'use strict';
// Disable auth explicitly
var noAuthOptions = {
noauth: ''
};
var transitionToAuthOptions = {
clusterAuthMode: 'keyFile',
keyFile: KEYFILE,
transitionToAuth: ''
};
var keyFileOptions = {
clusterAuthMode: 'keyFile',
keyFile: KEYFILE
};
print('=== Testing no-auth/transitionToAuth cluster ===');
mixedShardTest(noAuthOptions, transitionToAuthOptions, true);
mixedShardTest(transitionToAuthOptions, noAuthOptions, true);
print('=== Testing transitionToAuth/transitionToAuth cluster ===');
mixedShardTest(transitionToAuthOptions, transitionToAuthOptions, true);
print('=== Testing transitionToAuth/keyFile cluster ===');
mixedShardTest(keyFileOptions, transitionToAuthOptions, true);
mixedShardTest(transitionToAuthOptions, keyFileOptions, true);
print('=== Testing no-auth/keyFile cluster fails ===');
mixedShardTest(noAuthOptions, keyFileOptions, false);
mixedShardTest(keyFileOptions, noAuthOptions, false);
}());
|