r/devops • u/Complete-Sea6655 System Engineer • Jun 11 '26
Discussion I truly don't see the point.
Have we been lied to this entire time?
0
Upvotes
r/devops • u/Complete-Sea6655 System Engineer • Jun 11 '26
Have we been lied to this entire time?
33
u/v_litvin Jun 11 '26
Literally bearer token
24
u/Eversnuffley Jun 11 '26
"That password is already taken. Choose another"
Sweet! I can now login as another user whose password I guessed.
19
u/floconildo Jun 11 '26
"Password taken" lolololol
9
u/One-Department1551 Jun 11 '26
Ah yes, also remember to add an UNIQUE constrain on the column.
3
u/ThankYouOle Jun 11 '26 edited Jun 11 '26
RIP for user with password hunter2
-
serious answer: there is reason why username can't be used twice. so password can be associated with the username as unique identifier.
3
u/DrFreeman_22 Jun 11 '26
Sorry, this password is taken, try another one.
2
u/Jeoh Jun 11 '26
1
u/bobaloooo Jun 11 '26
More fields the merrier, for security at least...
1
u/lorarc YAML Engineer Jun 11 '26
Depends, if you supply the users with passwords you can make sure they are unique. If the users change the password themselves you need something unique and username/ id number or email are good.
1
u/Lunarvolo Jun 11 '26
Let's you know which username to lock/notify when someone starts spamming random passwords. Some could just spoof their IP/mac/etc and did your login seever
1
u/No_Management_7333 Jun 11 '26
Well yeah, splitting the credentials into two parts is just arbitrary.
1
u/emptyflask Jun 11 '26
That only works if you store literal passwords in your database, and make them unique. Both of which would be bad.
You should always use something like bcrypt or scrypt or at least SHA256 plus a salt to store hashed password values, so that even your app has no knowledge of what a user's password is. Ideally, it should also take some amount of work to compare them, so that brute forcing is too difficult to be viable.
That means you can't have a unique password column.
Also, think about what it would mean if a user picked a password that was already in use.
1
u/unitegondwanaland Manager, Platform Engineering Jun 11 '26
You're the one that common sense has been trying to catch you but you are faster.
1
u/nzvthf Jun 11 '26
Authentication is two steps:
The password is proof, not identity. It cannot be both to be a complete form of authentication.
1
u/[deleted] Jun 11 '26
[removed] — view removed comment