Live data from Hacker News

Using HTTP Basic Auth in 2022

joeldare.com

311–320 of 345 posts

Re: Using HTTP Basic Auth in 2022

#311
post #298

Earlier quoted context omitted.

Ok, but if you handle that in the app, it doesn't get invoked for CSS/JS/images/etc requests.

I don't know how you got to this being used for an app, but in most cases users will just be using a normal web browser and they will be requesting those resources (perhaps with etag/if-modified-since) on each request.

App doesn't exclusively refer to mobile applications, in this case I meant the web application.

Re: Using HTTP Basic Auth in 2022

#312

Earlier quoted context omitted.

"Stop passing plain passwords over the wire." If you are using HTTPS, you are equally as good as any other login form. Some have suggested using JavaScript to encrypt passwords before send - but in my opinion, this is generally stupid because it breaks support on browsers without JavaScript, and this doesn't protect you from the server at all because a hacker could just change the JavaScript to send plaintext copies…

No, it would be much better to use a zero knowledge proof (typically called a PAKE — password authenticated key agreement) to demonstrate that the user knows their password without sending that password over the channel. Sending the password over HTTPS doesn’t expose the password to passive observers, but it does unnecessarily expose the password to the server. https://en.m.wikipedia.org/wiki/Password-authenticated_k…

Don't such methods require you to store the password in a non-hashed form on the server? That seems mostly worse than this approach, since now the passwords of all users are visible at rest and can be used directly as authentication. RADIUS I know commonly uses this approach and it always made me nervous having the passwords in plaintext.

Re: Using HTTP Basic Auth in 2022

#313

Earlier quoted context omitted.

The first implementation was Bellovin and Merritt's Encrypted Key Exchange in 1992. In 2000 a provably secure implementation was released. PAKE has been around for quite some time and is proven, and is in wide use in the field. Here's a decent article on the subject: https://blog.cryptographyengineering.com/2018/10/19/lets-tal...

I don't dispute the technology exists - I dispute that this technology can be deployed on a web app to general users effectively. I don't believe that is currently possible in production effectively in a way that neutralizes my arguments that an attacker could just change the JavaScript to record passwords somewhere.

I'm really not sure what you are disputing here. PAKEs are for preventing man in the middle attacks, not for securing a local program or preventing malicious code from running in the browser. No one is advocating, use a PAKE and all your problems are gone - it's about addressing key exchange over the wire and eliminating an entire class of attack. Password managers are a tough subject - they are like coffee . Yes, there may be small amounts of toxic stuff in it, but that is offset by a factor of 10,000 by the number of people who do not get in a wreck on the way to work, thanks to being awake and aware form 70mg of caffeine.

Re: Using HTTP Basic Auth in 2022

#315

Earlier quoted context omitted.

Zero knowledge proofs protect against the password leaking due to any kind of error from the server. That's not security theater, passwords leak all the time. And the nice thing is that browsers already implement that, no need for Javascript. The bad news is that the UX sucks so much that you just can not use, so it's as useful as it not being there. But digest password authentication protects against nearly none of…

> Zero knowledge proofs protect against the password leaking due to any kind of error from the server. That's not security theater, passwords leak all the time. That's a little confused. PAKE usually still stores a password or hashed password on the server, with the password potentially recoverable by brute force reversing the hash. What it avoids is transmitting a hash over the wire that can be reversed into a passw…

There are more ways to do zero knowledge proofs than PAKE. (Besides, PAKE isn't the way current browsers support.)

PAKE is interesting mostly because we have some infrastructure for dealing with passwords already, but passwords in any form are not optimal.

Re: Using HTTP Basic Auth in 2022

#316
post #46

My big problem with HTTP basic auth in 2022 (squints at Netgear router) is that in Edge/Chrome 1Password can’t auto complete it. It gets really annoying really quickly.

Yes, this is one of my major grapes. I’m using LastPass though. The comment below about bitwarden is interesting and I will have to give that a try.

Re: Using HTTP Basic Auth in 2022

#317

Earlier quoted context omitted.

> unlike Chrome 49, which is the last version for XP and Vista Oh God.

Agreed. My sympathies that the GP even needs to know this.

No need, I just angrily redirect users to FF52 (Firefox tends to be the last major browser maintained for older systems anyways). Plus, requiring a minimum of TLS 1.2 with specific PFS ciphers is now the requirement, nuking even the Windows Embedded POS version of Windows XP for Chrome (Firefox brings its own cryptographic libraries).

Re: Using HTTP Basic Auth in 2022

#318
post #270
post #48

HTTP Basic Auth could be so much better with a little help from browsers. If it was a bit better, most websites wouldn't need to implement login pages over and over again. Plus it would be more secure since the popup is in its own security context. * Add a button to log out. Logout never really worked across browsers with basic auth. * Allow to inject a logo or a tiny bit of customization for branding. The default po…

Is there any chance to go even further than this? I'm imaging a public key based authentication scheme. The user submit their public key to the server first, then in the feature logins, server will generate a challenge for client to decrypt and respond. Of course the browser can apply some UX magic at the client end, for example displaying a pop window to allow user to select a public key for the authentication proce…

Sounds like client certificates. I guess you have never used those. All major browsers support them.

In Firefox you can find them here: Settings -> Privacy & Security -> View Certificates -> Your Certificates

Re: Using HTTP Basic Auth in 2022

#319
post #297

Earlier quoted context omitted.

> You want to check without hashing, that's the entire point. It's not the point. There is no attempt to avoid hashing. At this moment I'd like to be careful and distinguish between ordinary cryptographic hash functions (SHA-2, BLAKE2, etc) and key derivation functions (PBKDF2, Argon2, etc), even though both are often referred to as "hashing" in this context. The thing about key derivation functions is that they make…

> At this moment I'd like to be careful and distinguish between between a technicality (that I'm not even sure I agree with, hashing is still hashing also if you do it a million times) and what the people you're replying to were talking about. Sure, if you ignore what the topic was above then you can indeed say that nobody was trying to avoid doing hashing.

No idea what point you are trying to make here. Do you not agree with what I’m saying about hashing? Or do you just disagree with the way I said it?

You can cache password validation without storing the clear text password. That’s what I’m saying. If you don’t understand what a key stretching function is, the whole concept makes no sense, so I put a short explanation in.

Post reply on HN