[CXX-594] Auth against MongoDB 3 not working Created: 08/May/15  Updated: 21/May/15  Resolved: 21/May/15

Status: Closed
Project: C++ Driver
Component/s: None
Affects Version/s: legacy-0.0-26compat-2.6.9
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Christian Wyss Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-18412 Possibility to override default authe... Closed
is related to DOCS-5414 Please update the compat entry for 26... Closed

 Description   

According to the compatibility matrix at http://docs.mongodb.org/ecosystem/drivers/cpp/ the compat driver should be fully compatible to mongodb 3, but we haven't been able to authenticate using
bool auth(const string &dbname, const string &username, const string &pwd, string& errmsg, bool digestPassword = true);
against a newly created mongo 4 replicaset

This might be caused by tha default authentication change - but I have not been able to find a way to define MONGODB-CR users ?



 Comments   
Comment by Christian Wyss [ 21/May/15 ]

No, thank you - go ahead and close

Comment by Andrew Morrow (Inactive) [ 20/May/15 ]

christian.wyss@gfk.com - Is there anything else we can help you with in this ticket? If not, I'd like to close it.

Comment by Christian Wyss [ 11/May/15 ]

Ok - done. Thank you

Comment by Andrew Morrow (Inactive) [ 11/May/15 ]

Hi christian.wyss@gfk.com -

Apologies, you are correct. Still, I recommend you file a SERVER project enhancement ticket if you wish to request the ability to explicitly create MONGODB-CR users in 3.0.

Comment by Christian Wyss [ 11/May/15 ]

Hi acm

I wasn't thinking about a downgrade-machanism but rather about a way to NOT have to downgrade the full server but only create the CR-Credentials for specific users and leave the default as it is.

Comment by Andrew Morrow (Inactive) [ 11/May/15 ]

Hi christian.wyss@gfk.com -

The decision to de-support MONGODB-CR in MongoDB 3.0 by default was deliberate. If you are interested, you can always file a SERVER enhancement ticket requesting a supported mechanism for downgrading, but I wouldn't be optimistic.

Comment by Christian Wyss [ 11/May/15 ]

Hi Andrew Morrow

Thanks for the quick response.

As said: some means to create MONGODB-CR users in Mongo3 without having to change the default behaviour would be nice - i.e. createUser( ...

{method : "MONGODB-CR"}

) or something alike.

Beside this there's not much, I guess.

Comment by Andrew Morrow (Inactive) [ 11/May/15 ]

Hi christian.wyss@gfk.com -

Thanks for filing this. I agree that the compatibility matrix doesn't capture this aspect of using the 26compat series driver with the 3.0 server, and it probably should. As you have noted, the underlying issue is that the default auth schema for a new installation of MongoDB 3.0 only does SCRAM, which the 26compat driver series will never support (the legacy driver 1.0.0+ does). If you must use the 26compat driver with the 3.0 server, you will need to use MONGODB-CR. I believe that downgrading the auth schema is the only means to achieve that in a non-upgrade scenario.

I will get compatibility matrix updated to reflect this.

In the meantime, is there anything more you would like us to do on this ticket?

Comment by Christian Wyss [ 11/May/15 ]

After some more research found this Jira entry:

https://jira.mongodb.org/browse/SERVER-17459

> var schema = db.system.version.findOne(

{"_id" : "authSchema"}

)
> schema.currentVersion = 3
> db.system.version.save(schema)

Worked

It would still be interesting to have a possibility to add a "MONGODB-CR-user" without having to change this default!

Generated at Wed Feb 07 21:59:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.