Homework 1.3 - Validation

My replica set is configured correctly (Primary, Secondary, Secondary):

I created the user in the ‘admin’ database, and I’m able to authenticate with that user:

The validate script output looks good to me. However, when I paste it to the answer field, it says it’s incorrect.

What am I missing?

Here is my output of the validate script:

{ unauthorizedStatus: {“set”:“database.m310.mongodb.university”,“date”:“2019-10-28T19:26:00.938Z”,“myState”:1,“term”:{“floatApprox”:1},“heartbeatIntervalMillis”:{“floatApprox”:2000},“members”:[{"_id":0,“name”:“database.m310.mongodb.university:31130”,“health”:1,“state”:1,“stateStr”:“PRIMARY”,“uptime”:1759,“optime”:{“ts”:{“t”:1572289447,“i”:1},“t”:{“floatApprox”:1}},“optimeDate”:“2019-10-28T19:04:07.000Z”,“electionTime”:{“t”:1572289043,“i”:2},“electionDate”:“2019-10-28T18:57:23.000Z”,“configVersion”:3,“self”:true},{"_id":1,“name”:“database.m310.mongodb.university:31131”,“health”:1,“state”:2,“stateStr”:“SECONDARY”,“uptime”:1317,“optime”:{“ts”:{“t”:1572289447,“i”:1},“t”:{“floatApprox”:1}},“optimeDate”:“2019-10-28T19:04:07.000Z”,“lastHeartbeat”:“2019-10-28T19:26:00.362Z”,“lastHeartbeatRecv”:“2019-10-28T19:25:59.457Z”,“pingMs”:{“floatApprox”:0},“syncingTo”:“database.m310.mongodb.university:31130”,“configVersion”:3},{"_id":2,“name”:“database.m310.mongodb.university:31132”,“health”:1,“state”:2,“stateStr”:“SECONDARY”,“uptime”:1313,“optime”:{“ts”:{“t”:1572289447,“i”:1},“t”:{“floatApprox”:1}},“optimeDate”:“2019-10-28T19:04:07.000Z”,“lastHeartbeat”:“2019-10-28T19:26:00.383Z”,“lastHeartbeatRecv”:“2019-10-28T19:25:59.941Z”,“pingMs”:{“floatApprox”:0},“configVersion”:3}],“ok”:1}, memberStatuses: [“PRIMARY”,“SECONDARY”,“SECONDARY”] }

Something to do with authentication. Have a think.

Thanks! I figured it out. I forgot to use “–clusterAuthMode x509” when starting mongod

Good! You might want to redact some of the earlier text because you’ve given away quite a lot.

Okay. How about now?

That was just a suggestion :wink: I’m a student like yourself.

but it was a good suggestion! :grinning:

Indeed… everyone must earn it :sweat_smile: