W/ mongodb 2.8, they have introduced a new authentication protocol called SCRAM-SHA-1. This will be the default authentication protocol for mongodb 2.8. This protocol is not supported in the mongo java 2.12.x series. Only in 2.13. 2.13 is currently not GA yet but we should upgrade to it so we can make the necessary code changes to support SCRAM-SHA-1.
Links:
https://github.com/mongodb/mongo-java-driver/releases
http://www.kennygorman.com/mongodb-2.8-authentication-changes/
I did a diff between mongodb-src-r2.6.5 and mongodb-src-r2.8.0-rc2. There is a new V8Method named copyDatabaseWithSCRAM in src/mongo/scripting/V8_db.cpp. We will probably need to update our MongoShell Adaptor to add a corresponding JSFunction.
2.13 is currently not GA yet but we should upgrade to it so we can make the necessary code changes to support SCRAM-SHA-1.
Meanwhile mongo-java-driver version 2.13 went GA. There is also a mongo-java-driver 3.0.0 beta version, but I think we should not use a beta version inside ADS v16. Hence, I will update the java driver to the 2.13 version.
2.13 is currently not GA yet but we should upgrade to it so we can make the necessary code changes to support SCRAM-SHA-1.
Meanwhile mongo-java-driver version 2.13 went GA. There is also a mongo-java-driver 3.0.0 beta version, but I think we should not use a beta version inside ADS v16. Hence, I will update the java driver to the 2.13 version.
There is also a mongo-java-driver 3.0.0 beta version, but I think we should not use a beta version inside ADS v16.
Agreed. 3.0.0 is a very large change and we certainly don't want to include it in v16.
There is also a mongo-java-driver 3.0.0 beta version, but I think we should not use a beta version inside ADS v16.
Agreed. 3.0.0 is a very large change and we certainly don't want to include it in v16.
I have upgraded our forked version of mongo-java-driver to version 2.13.0 and I have successfully authenticated against a MongoDB Server 3.0-rc-9 using the new SCRAM-SHA-1 mechanism (which is automatically selected by the mongo-java-driver if MongoDB server version is 3.0 or higher).
I did a diff between mongodb-src-r2.6.5 and mongodb-src-r2.8.0-rc2. There is a new V8Method named copyDatabaseWithSCRAM in src/mongo/scripting/V8_db.cpp. We will probably need to update our MongoShell Adaptor to add a corresponding JSFunction.
The mongoCopyDatabaseWithSCRAM C++ implementation from the original MongoShell implementation looks quite complex. I am not sure if I can obtain a java adaptation for it in order to use with our embedded MongoShell client. Also, note that MongoDB 2.8 and 3.0 are not GA yet, thus we would use JS stubs extracted from non-GA source-code snapshots.
Let's open a separate issue for this task.
I have upgraded our forked version of mongo-java-driver to version 2.13.0 and I have successfully authenticated against a MongoDB Server 3.0-rc-9 using the new SCRAM-SHA-1 mechanism (which is automatically selected by the mongo-java-driver if MongoDB server version is 3.0 or higher).
I did a diff between mongodb-src-r2.6.5 and mongodb-src-r2.8.0-rc2. There is a new V8Method named copyDatabaseWithSCRAM in src/mongo/scripting/V8_db.cpp. We will probably need to update our MongoShell Adaptor to add a corresponding JSFunction.
The mongoCopyDatabaseWithSCRAM C++ implementation from the original MongoShell implementation looks quite complex. I am not sure if I can obtain a java adaptation for it in order to use with our embedded MongoShell client. Also, note that MongoDB 2.8 and 3.0 are not GA yet, thus we would use JS stubs extracted from non-GA source-code snapshots.
Let's open a separate issue for this task.
copyDatabaseWithSCRAM
Is this method as specific as it sounds? Meaning, that if we did not have a java implementation, the only loss of functionality would be the lack of ability to copy a DB using our MongoShell?
copyDatabaseWithSCRAM
Is this method as specific as it sounds? Meaning, that if we did not have a java implementation, the only loss of functionality would be the lack of ability to copy a DB using our MongoShell?
That's right. This copy method is involved only when the "SCRAM-SHA-1" mechanism is explicitly specified as argument to the copyDatabase() method (currently not possible to provide using existing JS stubs, as the "mechanism" argument is not expected).
In order to support it, we would have to upgrade both the JS stubs (used for MongoDB Server 2.8+ ) and add a java implementation for the copyDatabaseWithSCRAM JS method.
That's right. This copy method is involved only when the "SCRAM-SHA-1" mechanism is explicitly specified as argument to the copyDatabase() method (currently not possible to provide using existing JS stubs, as the "mechanism" argument is not expected).
In order to support it, we would have to upgrade both the JS stubs (used for MongoDB Server 2.8+ ) and add a java implementation for the copyDatabaseWithSCRAM JS method.
Issue #12956 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build ADS 16.0.0-beta-28 (mongo-jdbc 1.4.4) |
No time estimate |
1 issue link |
relates to #13098
Issue #13098Support for copyDatabaseWithSCRAM |
I did a diff between mongodb-src-r2.6.5 and mongodb-src-r2.8.0-rc2. There is a new V8Method named copyDatabaseWithSCRAM in src/mongo/scripting/V8_db.cpp. We will probably need to update our MongoShell Adaptor to add a corresponding JSFunction.