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

test: Implement Unit Test for Password Hashing #226

Open
6 tasks
benoit-bremaud opened this issue Jul 27, 2024 · 0 comments
Open
6 tasks

test: Implement Unit Test for Password Hashing #226

benoit-bremaud opened this issue Jul 27, 2024 · 0 comments
Assignees
Labels
backend Label to indicate the backend team security Related to authentication and authorization test Related to testing and validation

Comments

@benoit-bremaud
Copy link
Owner

Summary

This issue aims to implement unit tests to verify that user passwords are being hashed correctly before being saved to the database. It is crucial to ensure that plain text passwords are not stored, thereby enhancing the security of user data.

Context

Proper hashing of passwords is a fundamental security practice. It ensures that even if the database is compromised, the actual passwords cannot be easily retrieved. The tests will focus on validating that the hashing function is correctly implemented and that passwords are stored in a hashed format.

Objectives

  • Implement unit tests for the password hashing function.
  • Ensure that the hashing function does not store passwords in plain text.
  • Verify that the hashed passwords match the expected hash format (e.g., bcrypt).

Acceptance Criteria

  • The hashing function must not return the plain text password.
  • The hashed password must match the expected format (e.g., bcrypt hash format).
  • Tests should include validation of both the hash and compare functions to ensure consistency.

Tasks

  • Create and initialize a new working branch
    • Use the branch name following the conventions specified in the CONTRIBUTING.md guide.
    • Branch name format: test/issue-number-password-hashing
  • Implement unit tests for the password hashing function.
  • Verify that the passwords are not stored in plain text.
  • Validate that the hashed passwords conform to the expected format.
  • Write the commit message
    • Ensure the commit message follows the naming conventions as specified in the CONTRIBUTING.md guide.
  • Create the Pull Request
    • Ensure the Pull Request follows the naming and description conventions as specified in the CONTRIBUTING.md guide.

Resources

UML Diagrams References

  • Class Diagram: To visualize the structure of the user model and its methods, including hashing functionalities.

Branch Name

test/issue-number-password-hashing

@benoit-bremaud benoit-bremaud added backend Label to indicate the backend team security Related to authentication and authorization test Related to testing and validation labels Jul 27, 2024
@benoit-bremaud benoit-bremaud self-assigned this Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Label to indicate the backend team security Related to authentication and authorization test Related to testing and validation
Projects
None yet
Development

No branches or pull requests

1 participant