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

store hashed passwords securely #40

Open
derhuerst opened this issue Nov 21, 2023 · 2 comments
Open

store hashed passwords securely #40

derhuerst opened this issue Nov 21, 2023 · 2 comments
Assignees

Comments

@derhuerst
Copy link
Collaborator

derhuerst commented Nov 21, 2023

Currently, it seems that ParkAPI v3 stores passwords only hashed with a single iteration of SHA256 hashing, which can be cracked within minutes for short passwords with today's hardware:

https://github.com/mobidata-bw/park-api-v3/blob/8f5da93266ce9f5d1c79bdfc0ca47ddf0786ff5f/webapp/common/server_auth/server_auth_users.py#L92-L94

It would be good to use some industry standard like bcrypt, which some guide on how to do password hashing in Python also mentions, among others. (I just googled for 5s, it is not necessarily the best resource on this topic.)

@the-infinity
Copy link
Collaborator

This is valid for user passwords, but not for long generated maschine passwords. Especially with lot's of updates, one of the features of bcrypts, long hashing times, turns to a disadvantage, because requests take much longer as they should. If you have 64 chars random chars, you have enaugh entropy that brute forcing won't ever work, and you also cannot create rainbow tables.

@derhuerst
Copy link
Collaborator Author

Let's hope then that all ParkAPI v3 users out there will use very strong passwords. 🙃

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

No branches or pull requests

2 participants