Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug][mongodb] Attempt to switch database target during SASL authentication error when using a non admin auth source and duplicated usernames. #1934

Closed
2 tasks done
Jiabao-Sun opened this issue Feb 23, 2023 · 0 comments · Fixed by #1935
Assignees
Labels
bug Something isn't working

Comments

@Jiabao-Sun
Copy link
Contributor

Jiabao-Sun commented Feb 23, 2023

Search before asking

  • I searched in the issues and found nothing similar.

Flink version

Flink 1.13.6

Flink CDC version

2.3.0

Database and its version

MongoDB 4.4.1

Minimal reproduce step

  1. Have multiple similar accounts (with same credentials), one in "admin" and the other in another database.
  2. Intend to log in with the other account not in the "admin" database.
  3. Have SASL enabled.

What did you expect to see?

Correctly connected mongodb.

What did you see instead?

Command failed with error 17 (ProtocolError): 'Attempt to switch database target during SASL authentication.

Anything else?

https://jira.mongodb.org/browse/JAVA-4290

Speculative authentication always uses "admin" as the source.

In certain circumstances this can lead to a Attempt to switch database target during SASL authentication error when using > a non admin auth source and duplicated usernames.

We may upgrade the mongo driver version greater or equals than 4.3.2 to solve this problem.

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@Jiabao-Sun Jiabao-Sun added the bug Something isn't working label Feb 23, 2023
@Jiabao-Sun Jiabao-Sun self-assigned this Feb 23, 2023
Jiabao-Sun added a commit to Jiabao-Sun/flink-cdc-connectors that referenced this issue Feb 23, 2023
GOODBOY008 pushed a commit that referenced this issue Feb 23, 2023
vanliu-tx pushed a commit to BKBASE-Plugin/flink-cdc-connectors that referenced this issue Mar 22, 2023
wking1986 pushed a commit to BKBASE-Plugin/flink-cdc-connectors that referenced this issue Mar 22, 2023
* [mongodb][hotfix] Fix authentication failed when using a non admin auth source and duplicated usernames apache#1934 (apache#1935)

* [hotfix][mongodb] Fix resume token not found apache#1879 (apache#1938)

---------

Co-authored-by: Jiabao Sun <jiabao.sun@xtransfer.cn>
rawlinxx pushed a commit to rawlinxx/flink-cdc-connectors that referenced this issue May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant