3 ms·
Author here. The doc does acknowledge basic auth as a valid approach for server side usage, but the language was a bit too pessimistic about basic auth. I just
by ksri 9y ago
Author here. The doc does acknowledge basic auth as a valid approach for server side usage, but the language was a bit too pessimistic about basic auth.
I just modified it to say the following
If you use HTTPS, then basic authentication is a good choice for server side only applications. It is the easiest to get started, and is well supported by clients and server frameworks.
- euyyn 9y agoIt prevents delegation, though, which is an important use case for some APIs. As in "I want this third-party service to read my calendar from another server, but I don't want it to hijack my account, and I want to be able to revoke its access later on."
- thwarted 9y agoThat's an implementation detail of how the credentials are created, managed, interpreted by the server, and their use reported on to the user, none of which is specific to the credentials transport or encoding, which is all basic auth is. The thing to be aware of is how different HTTP clients, specifically user-interactive browsers, use (apply and remember) the credentials.
- sjtgraham 9y agoBasic auth is only OK if you don't have :80 open. Clients will send the creds over the clear to :80. It doesn't matter if you reply with a 400, the creds are already compromised at that point.
- JimDabell 9y agoEven if you don't have :80 open, that doesn't mean there isn't a MITM that would accept the connection instead of you.
- willstrafach 9y agoAs long as https:// https:// prefix is used, this is not true, MITM cannot downgrade that.
- beaconstudios 9y agoplus a HSTS header for any type-in traffic.
- theandrewbailey 9y agoAs a rule, HTTP basic auth is inappropriate without SSL, even for intranet apps. An office could easily have an insecure Wifi point, and someone sitting outside running Wireshark.
- willstrafach 9y agoAlso important to note that even on secure Wi-Fi with WPA2, if the attacker knew the password to the network they can just as easily sniff such plaintext ocontent.