News for hackers. Stuff that matters.
Re:Using HTTP Basic Auth in 2022 by IggleSniggle on Saturday January 01, 2022 @08:19PM (#29764735)
I’m confused by this. If you have the username, the hashed password, the salt, and the algorithm used, all present in the config file, then what’s the difference between doing what caddy does here and just having the plaintext password in the config file? Isn’t that just the same thing but with extra (known) steps?

Not trying to be intentionally dense, genuine confusion/question.

Re:Using HTTP Basic Auth in 2022 by spiffytech on Saturday January 01, 2022 @10:23PM (#29765483)
If an attacker compromises your stored plaintext passwords, they can test those username+password pairs against other online services, since lots of users reuse passwords. If you store hashes instead of the actual passwords, the attacker doesn't get the user's credentials.

You have to use hash functions appropriate for passwords (like bcrypt; don't use hashes like sha256 for this). And if you hashed correctly, it's still practical for an attacker to brute-force simple/common passwords. But at least users with hard-to-guess passwords get protected from your breach facilitating credential stuffing attacks.

Re:Using HTTP Basic Auth in 2022 by nvllsvm on Saturday January 01, 2022 @08:44PM (#29764889)
It's essentially impossible to reverse the hashed password. This is particularly helpful for users who reuse the same password for everything online.
Re:Using HTTP Basic Auth in 2022 by eyelidlessness on Saturday January 01, 2022 @11:44PM (#29765902)
> It's essentially impossible to reverse the hashed password.

It’s essentially a nontrivial unit of work to brute force the hash (or exploit collisions for a compromised hashing algo). That’s not impossible but it’s important not to overstate its safety too.

Re:Using HTTP Basic Auth in 2022 by mholt on Sunday January 02, 2022 @04:52AM (#29767318)
... for one account. It takes N times as many more resources to do that for N more accounts. The attacks are impractically expensive for most attackers.
Re:Using HTTP Basic Auth in 2022 by mholt on Sunday January 02, 2022 @04:51AM (#29767313)
It means that if someone sees your config file, they can't log into your sites and impersonate users (unless they have a LOT of money/resources and can reverse secure hashes -- one account at a time). It makes attacks impractically expensive.