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
38
39
40
41
|
/*
* This file tests an encrypted shell started using command line parameters.
*
*/
load('jstests/ssl/libs/ssl_helpers.js');
(function() {
const x509_options = {sslMode: "requireSSL", sslPEMKeyFile: SERVER_CERT, sslCAFile: CA_CERT};
const conn = MongoRunner.runMongod(x509_options);
const shellOpts = [
"mongo",
"--host",
conn.host,
"--port",
conn.port,
"--tls",
"--sslPEMKeyFile",
CLIENT_CERT,
"--sslCAFile",
CA_CERT,
"--tlsAllowInvalidHostnames",
"--awsAccessKeyId",
"access",
"--awsSecretAccessKey",
"secret",
"--keyVaultNamespace",
"test.coll",
"--kmsURL",
"https://localhost:8000",
];
const testFiles = [
"jstests/client_encrypt/lib/fle_command_line_explicit_encryption.js",
];
for (const file of testFiles) {
runMongoProgram(...shellOpts, file);
}
}());
|