-
Notifications
You must be signed in to change notification settings - Fork 158
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
Use pba authentication instead of authutils #1505
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.
Is there a reason you handle the authentication config so it has to be passed to manage_option_setup
and all the manage_...
functions instead of handling it like other options?
If it's necessary to do it that way, it would be good if you could add line breaks to the extended function parameter lists so the lines are 80 characters or less.
I'm not sure how the other options are handled, I need it within: managq_sql.c hence I copied the way how In the meantime I will add line breaks. |
I was thinking of using getter and setter functions like |
I don't think this is a good solution in this case because
Since manage_option_setup is calling init_manage_helper which then is ending up in init_manage_internal it would have the same effect from an API point of view. Although I agree that it is weird to introduce authentication settings to DB specific manage construct in my opinion it would not make it easier to maintain when we introduce a setter construct on top within manage_sql.c. |
Another way to handle that could be create a separation of the actual authentication and information gathering for the authentication process; I think that could be achieved when separating However I'm not sure if it would be a good idea to do such a massive change for 20.08 which is also targeted by this hash update pull request. A middle ground could be to start a manage_authentication setup but just deal with password based authentication for now to not have to deal with authentication settings within manag_sql but just verify and create hash. That way the intrusion is limited and the footprint of the existing |
Moving the authentication to a separate source and header file to make it clearer that the options need to be initialized sound like a good idea. I think we should go ahead with that. |
To be able to verify new password hashes and update old ones gvmd is using passwordbasedauthentication of gvm-libs. To configure: - pepper - counts - algorithm authentication_settings_t is introduced. manage_option_setup is using authentication_settings_t to translate it to PBASettings for password based authentication. To configure it from a user perspective use `--hashcount` and `--pepper`. Once a pepper is set you must reuse it; otherwise the login are not working due to incorrect salt.
Use pba authentication instead of authutils (backport #1505)
Use pba authentication instead of authutils (backport #1505)
To be able to verify new password hashes and update old ones gvmd is
using passwordbasedauthentication of gvm-libs.
This is depending on: greenbone/gvm-libs#484
What:
Why:
How did you test it:
Before you login with your previous account verify the hash is following the old pattern:
login and verify if the hash is following the pattern
$6$rounds=20000$....
.Then create a user and verify that the new user has the new hash format as well.
To verify the new parameter
--pepper
and--hashcount
you can create a user with pepper and one without and then verify the password hash. The user with pepper should contain:0000$
to indicate a 4 byte pepper within the db.Checklist: