-
Notifications
You must be signed in to change notification settings - Fork 96
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
Issue 6269 - RFE - Add nsslapd-pwdPBKDF2Rounds configuration to PBKDF2-* plugins #6447
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good, nice to see you looking at the rust side :)
src/plugins/pwdchan/src/lib.rs
Outdated
const MAX_PBKDF2_ROUNDS: usize = 1_000_000; | ||
|
||
const PBKDF2_ROUNDS_ATTR: &str = "nsslapd-pwdPBKDF2Rounds"; | ||
static PBKDF2_ROUNDS: Lazy<RwLock<usize>> = Lazy::new(|| RwLock::new(DEFAULT_PBKDF2_ROUNDS)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using https://doc.rust-lang.org/std/sync/atomic/struct.AtomicUsize.html with Ordering::Relaxed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized we need to make the PBKDF2_ROUNDS
a HashMap, as we might use different values in different schemes.
Do you know what the best option for our case is?
I found dashmap
option Lazy<DashMap<MessageDigest, usize>>
or we can make a RwLock HashMap like this RwLock<HashMap<MessageDigest, usize>>
...
And I think there can be more...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I tried a few approaches (even Rust's generics...), and I think the one in the last commit will work the best.
It's the simple AtomicUsize
variables - one for each digest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C/template part of the patch LGTM. A minor question
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oppss forgot to add my questions ;)
d1025bd
to
2f0db06
Compare
…2-* plugins Description: Add nsslapd-pwdPBKDF2Rounds attribute that can be configured in PBKDF2-* password storage plugin entries. This was password hashing round value can be adjusted. Certain compliance requirements (like from BSI) require specific hashing round values greater than what we currently provide. Add CLI, Web UI option, and CI tests. Fixes: 389ds#6269 Reviewed by: ?
2f0db06
to
3603e54
Compare
Okay, it's ready for the final review! Design doc: 389ds/389ds.github.io#17 Please check! Thank you! |
dirsrvtests/tests/suites/password/pbkdf2_upgrade_plugin_test.py
Outdated
Show resolved
Hide resolved
Changes are made, please, review |
6496b99
to
802fb91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
d4ec94a
to
9156f11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, the changes to the rust code look good to me :)
…2-* plugins (#6447) Description: Add nsslapd-pwdPBKDF2Rounds attribute that can be configured in PBKDF2-* password storage plugin entries. This is a password hashing round value that can be adjusted. Certain compliance requirements (like from BSI) require specific hashing round values greater than what we currently provide. Add CLI, Web UI option, and CI tests. Increase DEFAULT_PBKDF2_ROUNDS to 100_000. Fixes: #6269 Reviewed by: @Firstyear, @progier389, @tbordaz (Thanks!!!)
…2-* plugins (#6447) Description: Add nsslapd-pwdPBKDF2Rounds attribute that can be configured in PBKDF2-* password storage plugin entries. This is a password hashing round value that can be adjusted. Certain compliance requirements (like from BSI) require specific hashing round values greater than what we currently provide. Add CLI, Web UI option, and CI tests. Increase DEFAULT_PBKDF2_ROUNDS to 100_000. Fixes: #6269 Reviewed by: @Firstyear, @progier389, @tbordaz (Thanks!!!)
…2-* plugins (#6447) Description: Add nsslapd-pwdPBKDF2Rounds attribute that can be configured in PBKDF2-* password storage plugin entries. This is a password hashing round value that can be adjusted. Certain compliance requirements (like from BSI) require specific hashing round values greater than what we currently provide. Add CLI, Web UI option, and CI tests. Increase DEFAULT_PBKDF2_ROUNDS to 100_000. Fixes: #6269 Reviewed by: @Firstyear, @progier389, @tbordaz (Thanks!!!)
…2-* plugins (#6447) Description: Add nsslapd-pwdPBKDF2Rounds attribute that can be configured in PBKDF2-* password storage plugin entries. This is a password hashing round value that can be adjusted. Certain compliance requirements (like from BSI) require specific hashing round values greater than what we currently provide. Add CLI, Web UI option, and CI tests. Increase DEFAULT_PBKDF2_ROUNDS to 100_000. Fixes: #6269 Reviewed by: @Firstyear, @progier389, @tbordaz (Thanks!!!)
…2-* plugins (#6447) Description: Add nsslapd-pwdPBKDF2Rounds attribute that can be configured in PBKDF2-* password storage plugin entries. This is a password hashing round value that can be adjusted. Certain compliance requirements (like from BSI) require specific hashing round values greater than what we currently provide. Add CLI, Web UI option, and CI tests. Increase DEFAULT_PBKDF2_ROUNDS to 100_000. Fixes: #6269 Reviewed by: @Firstyear, @progier389, @tbordaz (Thanks!!!)
…2-* plugins (#6447) Description: Add nsslapd-pwdPBKDF2Rounds attribute that can be configured in PBKDF2-* password storage plugin entries. This is a password hashing round value that can be adjusted. Certain compliance requirements (like from BSI) require specific hashing round values greater than what we currently provide. Add CLI, Web UI option, and CI tests. Increase DEFAULT_PBKDF2_ROUNDS to 100_000. Fixes: #6269 Reviewed by: @Firstyear, @progier389, @tbordaz (Thanks!!!)
…2-* plugins (#6447) Description: Add nsslapd-pwdPBKDF2Rounds attribute that can be configured in PBKDF2-* password storage plugin entries. This is a password hashing round value that can be adjusted. Certain compliance requirements (like from BSI) require specific hashing round values greater than what we currently provide. Add CLI, Web UI option, and CI tests. Increase DEFAULT_PBKDF2_ROUNDS to 100_000. Fixes: #6269 Reviewed by: @Firstyear, @progier389, @tbordaz (Thanks!!!)
…2-* plugins (#6447) Description: Add nsslapd-pwdPBKDF2Rounds attribute that can be configured in PBKDF2-* password storage plugin entries. This is a password hashing round value that can be adjusted. Certain compliance requirements (like from BSI) require specific hashing round values greater than what we currently provide. Add CLI, Web UI option, and CI tests. Increase DEFAULT_PBKDF2_ROUNDS to 100_000. Fixes: #6269 Reviewed by: @Firstyear, @progier389, @tbordaz (Thanks!!!)
…2-* plugins (#6447) Description: Add nsslapd-pwdPBKDF2Rounds attribute that can be configured in PBKDF2-* password storage plugin entries. This is a password hashing round value that can be adjusted. Certain compliance requirements (like from BSI) require specific hashing round values greater than what we currently provide. Add CLI, Web UI option, and CI tests. Increase DEFAULT_PBKDF2_ROUNDS to 100_000. Fixes: #6269 Reviewed by: @Firstyear, @progier389, @tbordaz (Thanks!!!)
Description: Add nsslapd-pwdPBKDF2Rounds attribute that can be configured in
PBKDF2-* password storage plugin entries. This was password hashing round value can be adjusted.
Certain compliance requirements (like from BSI) require specific hashing round values greater than
what we currently provide.
Fixes: #6269
Reviewed by: ?