blob: 51a5e75f2f5f931662e0d91461883a82d0542b82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// Helper script used to validate login as x509 auth with a certificate with roles works.
(function() {
"use strict";
// Auth as user in certificate with an email address
const ret = db.getSiblingDB("$external").auth({
mechanism: "MONGODB-X509",
user:
"emailAddress=example@mongodb.com,CN=client,OU=KernelUser,O=MongoDB,L=New York City,ST=New York,C=US"
});
assert.eq(ret, 1, "Auth failed");
}());
|