-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
148 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -186,4 +186,9 @@ $RECYCLE.BIN/ | |
|
||
node_modules | ||
|
||
lib | ||
lib | ||
|
||
**/*.d.ts | ||
**/*.js | ||
**/*.js.map | ||
!**/initdb/*.js |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const path = require("path"); | ||
|
||
export default { | ||
dockerCompose: { | ||
projectName: path.basename(__dirname), | ||
yamlPath: path.resolve(__dirname, "docker-compose.yaml"), | ||
}, | ||
waitOn: ["tcp:28004"], | ||
connections: { | ||
default: { | ||
connectionString: | ||
"mongodb://root:password123@localhost:28004/db1?authSource=admin", | ||
}, | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
const path = require("path"); | ||
|
||
export default { | ||
dockerCompose: { | ||
projectName: path.basename(__dirname), | ||
yamlPath: path.resolve(__dirname, "docker-compose.yaml"), | ||
}, | ||
waitOn: ["tcp:28006"], | ||
connections: { | ||
password: { | ||
connectionString: "mongodb://mongo:27017", | ||
sshTunnel: { | ||
host: "localhost", | ||
port: 22222, | ||
username: "root", | ||
password: "password", | ||
}, | ||
}, | ||
identityKey: { | ||
connectionString: "mongodb://mongo:27017", | ||
sshTunnel: { | ||
host: "localhost", | ||
port: 22222, | ||
username: "root", | ||
identityKeyFile: path.resolve( | ||
__dirname, | ||
"keys", | ||
"key-without-passphrase" | ||
), | ||
}, | ||
}, | ||
identityKeyWithPassphrase: { | ||
connectionString: "mongodb://mongo:27017", | ||
sshTunnel: { | ||
host: "localhost", | ||
port: 22222, | ||
username: "root", | ||
identityKeyFile: path.resolve(__dirname, "keys", "key-with-passphrase"), | ||
identityKeyPassphrase: "passphrase", | ||
}, | ||
}, | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
const path = require("path"); | ||
|
||
const { default: ConnectionString } = require("mongodb-connection-string-url"); | ||
|
||
const unvalidated = new ConnectionString("mongodb://localhost:27029"); | ||
unvalidated.searchParams.set("tls", "true"); | ||
unvalidated.searchParams.set("tlsInsecure", "true"); | ||
|
||
const serverValidation = new ConnectionString("mongodb://localhost:27029"); | ||
serverValidation.searchParams.set("tls", "true"); | ||
serverValidation.searchParams.set( | ||
"tlsCAFile", | ||
path.resolve(__dirname, "tls", "ca.pem") | ||
); | ||
|
||
const serverAndClientValidation = new ConnectionString( | ||
"mongodb://localhost:27030" | ||
); | ||
serverAndClientValidation.searchParams.set("tls", "true"); | ||
serverAndClientValidation.searchParams.set( | ||
"tlsCAFile", | ||
path.resolve(__dirname, "tls", "ca.pem") | ||
); | ||
serverAndClientValidation.searchParams.set( | ||
"tlsCertificateKeyFile", | ||
path.resolve(__dirname, "tls", "client.pem") | ||
); | ||
|
||
const x509 = new ConnectionString("mongodb://localhost:27031"); | ||
x509.searchParams.set("tls", "true"); | ||
x509.searchParams.set("tlsCAFile", path.resolve(__dirname, "tls", "ca.pem")); | ||
x509.searchParams.set( | ||
"tlsCertificateKeyFile", | ||
path.resolve(__dirname, "tls", "client.pem") | ||
); | ||
x509.searchParams.set("authMechanism", "MONGODB-X509"); | ||
|
||
const x509WithSsh = new ConnectionString("mongodb://mongodb-tls-x509:27017"); | ||
x509WithSsh.searchParams.set("tls", "true"); | ||
x509WithSsh.searchParams.set("tlsAllowInvalidHostnames", "true"); | ||
x509WithSsh.searchParams.set( | ||
"tlsCAFile", | ||
path.resolve(__dirname, "tls", "ca.pem") | ||
); | ||
x509WithSsh.searchParams.set( | ||
"tlsCertificateKeyFile", | ||
path.resolve(__dirname, "tls", "client.pem") | ||
); | ||
x509WithSsh.searchParams.set("authMechanism", "MONGODB-X509"); | ||
|
||
export default { | ||
dockerCompose: { | ||
projectName: path.basename(__dirname), | ||
yamlPath: path.resolve(__dirname, "docker-compose.yaml"), | ||
}, | ||
waitOn: ["tcp:27029", "tcp:27030", "tcp:27031", "tcp:22223"], | ||
connections: { | ||
unvalidated: { | ||
connectionString: unvalidated.href, | ||
}, | ||
serverValidation: { | ||
connectionString: serverValidation.href, | ||
}, | ||
serverAndClientValidation: { | ||
connectionString: serverAndClientValidation.href, | ||
}, | ||
x509: { | ||
connectionString: x509.href, | ||
}, | ||
x509WithSsh: { | ||
connectionString: x509WithSsh.href, | ||
sshTunnel: { | ||
host: "localhost", | ||
port: 22223, | ||
username: "root", | ||
password: "password", | ||
}, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters