-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
v5.0, v4.4
-
Security 2022-01-10, Security 2022-01-24, Security 2022-02-07, Security 2022-02-21
Based on some server-side logging, I see that using the legacy mongo shell v5.0.2 to connect with X.509 auth sends an "authenticate" command with the $db value set to "admin". This is how I'm connecting:
> mongo --tlsAllowInvalidHostnames --tls --tlsCAFile ./testdata/certs/ca.pem --tlsCertificateKeyFile ./testdata/certs/client_combined.pem --authenticationMechanism MONGODB-X509
Using this against a locally running mongod succeeds, but interestingly, if I try to manually run such a command once authenticated, it fails as expected:
> {"authenticate": {"$numberInt":"1"},"mechanism": "MONGODB-X509","user": "CN=x509TestClient","$db": "admin"}