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

SCRAM-SHA-256 support #643

Merged
merged 4 commits into from
Jul 8, 2022

Conversation

poloz-lab
Copy link
Contributor

Pull Request (PR) description

Add limited support for SCRAM-SHA-256 authentication mechanism.

Limited because we loose the ability to check if the password is insync when SCRAM-SHA-256 is used.
The password is no longer digested on the client.

The second commit add the possibility to force the update of the password manually with a boolean.

This Pull Request (PR) fixes the following issues

Fixes #597

@poloz-lab poloz-lab marked this pull request as draft July 6, 2022 07:57
@poloz-lab poloz-lab force-pushed the scram_sha_256_limited_support branch 2 times, most recently from cdf8b8f to 20b627a Compare July 6, 2022 15:24
- auth_mechanism parameter for mongodb_user
- use password instead of password_hash if SCRAM-SHA-256, because password digestion is on the server
- insync is not verified for the password
@poloz-lab poloz-lab force-pushed the scram_sha_256_limited_support branch from 20b627a to e6d8a53 Compare July 6, 2022 15:26
@poloz-lab poloz-lab marked this pull request as ready for review July 6, 2022 15:34
@poloz-lab poloz-lab force-pushed the scram_sha_256_limited_support branch from e6d8a53 to b042af0 Compare July 6, 2022 15:36
GitHub drop support for git:// url a while ago.
@smortex smortex added the enhancement New feature or request label Jul 6, 2022
The way we construct the hash changed and the order matter when
comparing the JSON serialized data.
@smortex
Copy link
Member

smortex commented Jul 6, 2022

Thanks, I added 2 commits to your branch to fix CI. I'll let MongoDB users review the PR and test that the feature works as expected.

@poloz-lab
Copy link
Contributor Author

Thanks @smortex , I'm working on adding some spec to test if the authentication mechanism selection work as expected.

@poloz-lab poloz-lab force-pushed the scram_sha_256_limited_support branch 9 times, most recently from c251895 to 18e6c8a Compare July 7, 2022 13:48
@poloz-lab
Copy link
Contributor Author

Thanks @smortex , I'm working on adding some spec to test if the authentication mechanism selection work as expected.

The version of MongoDB used in CI tests doesn't support SCRAM-SHA-256 (except for debian10 machines)

@ghost ghost mentioned this pull request Jul 8, 2022
@smortex
Copy link
Member

smortex commented Jul 8, 2022

The version of MongoDB used in CI tests doesn't support SCRAM-SHA-256 (except for debian10 machines)

The module seems to need some love : CI test against rather old OSes, at least Debian 9 should not be here and Debian 11 should :-) If you think some old stuff prevents you from working efficiently with this codebase, maybe it is okay to slash the legacy support?

Copy link
Member

@smortex smortex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

People reported they where happily using this is the sister issue. If you are OK with this as it is, I am OK with it too.

@poloz-lab poloz-lab deleted the scram_sha_256_limited_support branch September 8, 2022 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

All users are created with SCRAM-SHA-1 only
3 participants