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

feat: Updating Hashing Method to PBKDF2 with SHA-256 #2234

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mamccorm
Copy link

@mamccorm mamccorm commented May 7, 2024

Description

This PR updates the password hashing mechanism from the current method to PBKDF2 with SHA-256. The change affects how passwords are processed within the Flask-AppBuilder security module.

By default, werkzeug uses scrypt, which is not approved by FIPS, meaning anyone who wants to use this package inside an application which requires FIPS compliance will not be able to.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Is CRUD MVC related.
  • Is Auth, RBAC security related.
  • Changes the security db schema.
  • Introduces new feature
  • Removes existing feature

Signed-off-by: Mark McCormick <[email protected]>
@mamccorm mamccorm changed the title Enhance Password Security by Updating Hashing Method to PBKDF2 with SHA-256 feat | Enhance Password Security by Updating Hashing Method to PBKDF2 with SHA-256 May 7, 2024
@mamccorm mamccorm closed this May 7, 2024
@mamccorm mamccorm reopened this May 7, 2024
@mamccorm mamccorm changed the title feat | Enhance Password Security by Updating Hashing Method to PBKDF2 with SHA-256 feat: Enhance Password Security by Updating Hashing Method to PBKDF2 with SHA-256 May 7, 2024
@mamccorm mamccorm closed this May 7, 2024
@mamccorm mamccorm reopened this May 7, 2024
Signed-off-by: Mark McCormick <[email protected]>
@mamccorm
Copy link
Author

mamccorm commented May 7, 2024

Not sure why the python lint check in CI is still failing? I pushed up all fixes:

% black setup.py flask_appbuilder

All done! ✨ 🍰 ✨
84 files left unchanged.

@mamccorm mamccorm changed the title feat: Enhance Password Security by Updating Hashing Method to PBKDF2 with SHA-256 feat: Updating Hashing Method to PBKDF2 with SHA-256 May 7, 2024
Copy link
Owner

@dpgaspar dpgaspar left a comment

Choose a reason for hiding this comment

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

Thank you for the PR.

I think that the password hashing algorithm should be configurable, can you create a new config key named FAB_PASSWORD_HASH_METHOD

Seems that werkzeug has change the default hash method from pbkdf2 to scrypt: https://werkzeug.palletsprojects.com/en/3.0.x/utils/#module-werkzeug.security

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants