{"id":18485275,"url":"https://github.com/softinstigate/java-mongodb-driver-ferretdb-auth-issue","last_synced_at":"2025-06-30T21:38:51.993Z","repository":{"id":87382227,"uuid":"595710888","full_name":"SoftInstigate/java-mongodb-driver-ferretdb-auth-issue","owner":"SoftInstigate","description":"This is a reproducer of an issue with the MongoDb Java Driver authentication with FerretDb 0.9.0.","archived":false,"fork":false,"pushed_at":"2023-02-10T18:03:48.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-13T21:49:15.962Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SoftInstigate.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-31T16:50:34.000Z","updated_at":"2023-01-31T16:54:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6ead44c-80c6-48f4-b2a2-65d90091d3e1","html_url":"https://github.com/SoftInstigate/java-mongodb-driver-ferretdb-auth-issue","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SoftInstigate/java-mongodb-driver-ferretdb-auth-issue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftInstigate%2Fjava-mongodb-driver-ferretdb-auth-issue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftInstigate%2Fjava-mongodb-driver-ferretdb-auth-issue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftInstigate%2Fjava-mongodb-driver-ferretdb-auth-issue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftInstigate%2Fjava-mongodb-driver-ferretdb-auth-issue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SoftInstigate","download_url":"https://codeload.github.com/SoftInstigate/java-mongodb-driver-ferretdb-auth-issue/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftInstigate%2Fjava-mongodb-driver-ferretdb-auth-issue/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262855289,"owners_count":23375309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T12:44:42.616Z","updated_at":"2025-06-30T21:38:51.969Z","avatar_url":"https://github.com/SoftInstigate.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java MongoDbDriver FerretDb Auth Issue\n\nThis is a reproducer of an issue with the MongoDb Java Driver authentication with FerretDb 0.9.0.\n\n## 1 - install sdkman\n\nThis helps installing java!\n\n```bash\n$ curl -s \"https://get.sdkman.io\" | bash\n```\n\n## 2 - install java 17\n\n```bash\n$ java install java 17.0.6-tem\n```\n\n## 3 - start FerretDb\n\n```bash\n$ docker compose up\n```\n\n## 4 - Run the test\n\n```bash\n$ ./mvnw clean test\n```\n\n## Error with MongoDatabase.createCollection()\n\n`MongoDatabase.createCollection()` fails with following message (even if not creating a _capped_ collection)\n\n```\nCommand failed with error 238 (NotImplemented): 'create: support for field \"capped\" is not implemented yet' on server localhost:27017. The full response is {\"ok\": 0.0, \"errmsg\": \"create: support for field \\\"capped\\\" is not implemented yet\", \"code\": 238, \"codeName\": \"NotImplemented\"}\n```\n\n## Error with authentication (FIXED)\n\nThe error comes from `SaslAuthenticator` class of the java driver that tries to get the `conversationId` (a BsonInt32) from the Sasl response but does not find it!:\n\n```\ncom.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=PLAIN, userName='username', source='$external', password=\u003chidden\u003e, mechanismProperties=\u003chidden\u003e}\n....\nCaused by: org.bson.BsonInvalidOperationException: Document does not contain key conversationId\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftinstigate%2Fjava-mongodb-driver-ferretdb-auth-issue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftinstigate%2Fjava-mongodb-driver-ferretdb-auth-issue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftinstigate%2Fjava-mongodb-driver-ferretdb-auth-issue/lists"}