5 ms·
Why Login Security Sucks
- janalsncm 2y agoA website that allows login via forgot password -> send email -> reset password should skip passwords entirely and use magic links instead. Also, at this point there’s a huge number of previously leaked passwords. So websites should simply not allow passwords that have appeared in those leaks.
- graemep 2y agoMagic links are annoying for users.
- ibll 2y agoI always forget how stinking nice password manager autofill is until I have to fight with magic links because some service hates me. And most implementations I've seen only log you in from the new link the email sent, not the original page. So if you are trying to log in on a device your email isn't signed in on, you get to type the entire thing in on your second device.
- 0cf8612b2e1e 2y agoMore times than I would like, I have had to manually type out some ludicrously long secret key/token/url. Could we please standardize on only using long strings that do not require il1o0 in them? I suppose it is a failure of Latin or the default fonts with which I am frequently stuck, but it would save me a minor bit of life aggravation.
- weikju 2y ago> And most implementations I've seen only log you in from the new link the email sent, not the original page. Probably because: - Bad actor A attempts to login - User B sees the email and unthinkingly clicks the magic link - Bad Actor A now has access. There are probably ways around this (browser session/cookies/IP/etc must match?) but that'd be a common enough scenario... Common enough that e.g. Microsoft Authenticator switched from sending a notification that you can tap to approve/reject (same as scenario above) to needing to enter a 2-digit code that you also see on the webpage (so without seeing Bad Actor A's page you cannot enter the code and approve their login).
- radicality 2y agoI absolutely hate the magic links :S A whole bunch of AI companies are going that route where you can’t have a password and login via magic links - eg Perplexity
- radicality 2y agoI know that crypto/blockchain is not super popular here, but the experience of logging-in to various dapps is pretty nice. The ”login” is the dapp showing the user a message to sign to prove they own the key, then you can sign the message, and that’s the whole login. There’s various ways to implement it, but here’s a quick tutorial for doing login with MetaMask. https://docs.metamask.io/wallet/how-to/sign-data/siwe/ https://docs.metamask.io/wallet/how-to/sign-data/siwe/
- tptacek 2y agoThere is no less attractive use of blockchain tech than login. The biggest problem with login security isn't attesting to an identity, it's account recovery; blockchains make that incredibly difficult.
- radicality 2y agoFair enough, I guess for crypto wallets there isn’t any recovery that can be done if you lose the private key. In the end a cryptocurrency wallet is usually just a pub/priv keypair, so purely for login/identity purposes it’s similar to passkeys. And can be backed up easily. What I wanted to say is that hopping around different ‘dapps’ is quite seamless from a login point of view (and has benefits like ability to pay for goods immediately). Often I don’t even proceed exploring some website if it asks me to create an account since the friction is high. In any case, this popped into my head as I was exploring openrouter.ai yesterday (routing layer for LLMs, you buy credits and can use many models), and they had a “Login with MetaMask” option, which is rare for non-crypto websites, and it worked quite seamlessly.
- tptacek 2y agoIt's easy to make things seamless if you define away the corner cases!
- vdelitz 2y agoThere's a new trend coming up of "Smart Wallets" which make use of synced passkeys for authentication. I can share a blog post about this topic that I recently wrote if you're interested in some details (e.g. Coinbase did it this way).
- tptacek 2y agoThis person is wildly overthinking their problems. Early in the piece, they marvel that it's somehow OK to email magic login links to people, but not to SMS logins. Yes: among other reasons, that's because there's nobody an attacker can realistically call on the phone or bribe at a neighborhood cell phone store to rehome an email account. Nobody wants to do away with SMTP more than I do, but everybody has it, and most people (by an overwhelming majority) host it with their absolute most secure provider. Get past the SMS/SMTP thing. You're doing a low-sensitivity CMS application. It would be bizarre for you to have a Passkeys implementation. It's even weird for you to do login-with-Google or SIWA. Just mail magic links! Be done with it! TOTP is dead tech. Implement the full gamut of OIDC provider logins --- most of which have better TOTP implementations than you'll come up with (but also tend to steer their users away from TOTP) and forget that it exists. I'd like to have a coda here about how things get much harder if you're a high-sensitivity application. But they don't. Mostly what happens is that OIDC signon gets much more important. The bit about TOTP secrets being worse, harder-to-rotate passwords also misses the point of why passwords are bad and why unmasked TOTP seed storage is not in fact that big of a deal, but who cares? Just don't do TOTP.
- stavros 2y ago> they marvel that it's somehow OK to email magic login links to people, but not to SMS logins The answer here is that, even if you aren't emailing magic links, you're emailing magic links: the "forgot my password" flow is effectively a magic login link, because it uses your email as your single authentication method. There's then no additional loss of security if you use magic links instead of passwords.
- kibwen 2y agoWhat's wrong with TOTP? Are you using that term in a technical sense to mean something specific or are you referring to any situation where someone needs to consult an app on a second device to receive a code to present to the first device?
- tptacek 2y agoIt's clunky and it's not phishing resistant.
- Dwedit 2y agoIf I'm going to be forced into two-factor authentication, I would much rather use TOTP than be forced to use a phone number. Phones can break.
- jonpurdy 2y agoYes. The absolute worst 2FA is SMS based, especially when they refuse to work with my VoIP numbers (I now have a $5/mo 2nd eSIM plan just for this since my primary SIM is data only). IMHO, just let me check a box that enables me to ONLY use username and password all the time, no extra steps or IP-based captcha or “verify it’s you” by clicking an extra email. My passwords are unique and strong and the provider is more likely to get hacked than my passwords get cracked.
- smcnally 2y ago> I would much rather use TOTP than be forced to use a phone number. Phones can break. Phones / SMS is also less secure than TOTP. It’s odd that most orgs that require 2FA yet accept only phone calls or sms as the second factor are financial institutions.
- deleted 2y ago[deleted]
- wepple 2y ago> It is unclear why generating a one-time password for the user is bad but if we call the password a "recovery code" it is suddenly sufficient. The OTP is usually very long, highly randomized (you don’t get to choose Summer2024!), and designed to be stored offline somewhere as a break glass. Passwords typically follow none of those rules.
- tomsmeding 2y ago> highly randomized (you don’t get to choose Summer2024!) Sure. > designed to be stored offline somewhere as a break glass. That's fair. > The OTP is usually very long, No, 10 digits is not very long, that's just 10^10 (about 2^33). The xkcd password ( https://xkcd.com/936/ https://xkcd.com/936/ ) is better than that. It's better than Summer2024 perhaps, but not all that much better.
- smcnally 2y agoThe xkcd password requires the use of spaces as legal characters. For some reason, this is still an issue with the majority of orgs with complex password requirements.
- Feathercrown 2y agocorrecthorsebatterystaple isn't much worse
- hinkley 2y ago
- bluepuma77 2y agoIt could be a good thing to have a confirmed email in the database, in case a 3-letter-agency knocks on your door because of some highly illegal content on your site.
- hinkley 2y agoI have to unsubscribe from five things a week that are clearly other people using my email address to sign up for things. Someone used my email address to sign up for a Mint account. And the only way you can delink Mint is to call Mint or log into someone else’s financial account. I’m no lawyer but that seems like a very, very bad idea to me.
- bluepuma77 2y agoUsually you have to click a unique confirmation link in the email to activate the account.
- hinkley 2y agoMy inbox says otherwise. Many sites don’t require the activation code to start using the account apparently. Fucking internet, man.
- motohagiography 2y agothe problem is the threat models for different sites and apps aren't the same, and so security protocols that cover the maximum bases for compliance, identity, security, privacy, recovery, and moderation don't have a lot of flexibility. the only thing that is going to change authentication is a new mode for working online and the death of the browser from AI rendering most of what we need. maybe this polarizes, where on one end you have the resurgence of TUIs that raise the technical bar and normalize cryptography and key management for tech work, and at the other we have AI interfaces using a kind of real time biometric context, mediated by some opaque hardware integration. I would be surprised if we're still typing passwds and TOTP tokens in as little as 10 years.
- hinkley 2y agoBut you could break most of the apps I use into a handful of kinds, and apply rules accordingly. Like there’s no reason my bank, brokerage, and doctor shouldn’t use the same degree of paranoia. But who cares if someone cracks my hackernews password. I haven’t associated my account with any projects or my real identity so the worst you can do is make me look like an idiot or get dang to ban me.
- fragmede 2y agoAll of the ones in the "wait crap, I'm screwed" kind need to have different passwords.
- RadiozRadioz 2y agoControversial opinion: Username and password is perfectly fine. To provide an example that most people here are probably comfortable with: An SSH key is effectively a really long password with cryptographic properties. It's a single factor, one thing, that you use to complete a challenge for the server. We are fine to use SSH keys as our only authentication factor for servers, with IP whitelisting where security trumps convenience; why should we feel uncomfortable using long passwords as our only authentication factor for websites, with opt-in MFA when security trumps convenience? Instead, websites enforce terrible 8-20 character passwords with a recipe of strict requirements to help crackers, and a download of the flavor of the month authenticator app that quickly becomes burdensome and annoying. Why does my library think they're Fort Knox and want me to get an authenticator app? The tech is fine, but its universal forced application bugs me. It's like those campaigning for enforcing MFA everywhere never considered that different users have different risk appetites/tolerances. The problem with passwords comes when humans mismanage passwords and pick bad ones. Passwords themselves are fine.
- jrochkind1 2y agoAh, so the problem is the HUMANS! This is great, because all we need to do is switch out the humans.
- deleted 2y ago[deleted]
- wlesieutre 2y agoAn SSH key isn’t exactly a long password since the service you use it for can’t leak your private key in a security breach
- bruce343434 2y agoThe password isn't leaked, a hash of the salted and peppered password is the only thing in the database (+ the salt, and the pepper elsewhere).
- joshka 2y agoMany of the questions about TOTP lengths / timing / storage are covered in the Security Considerations part of the RFC[1]. This is written in fairly plain language. The meta answer is if you're implementing a security protocol yourself, you should always be reading the RFC for this sort of thing. If you're designing a library to implement a security protocol, you should document the parts that need to be implemented according to spec (e.g. storage / transmission / time / etc.). [1]: https://www.rfc-editor.org/rfc/rfc6238#section-5 https://www.rfc-editor.org/rfc/rfc6238#section-5 On a what can we do perspective. We actually need some higher level concepts in play than just the APIs. What you really care about is: 1. You can identify the user. 2. The identity used by the user doesn't have a single point of failure. Passkeys solve only the first part. You want the browser to tell you that the user has synced the passkey to another place other than just the browser. Or you want some other way to remove the reliance on a single factor. The problem you really have though is not everyone has the same ability to sync passkeys. For some apps giving you an email address is likely secure enough to satisfy requirement 2. I hate it being the primary option though - that's annoying AF.
- bruce343434 2y agoThe credentials api seems rather opaque to the user. What happens if I want to log in temporarily from a strange computer that isn't synced? Will I be shit out of luck? What if I don't have my own device with me? I am anxious about the fact that if you lose your phone in the modern world, you are in for so much work and inconvenience. I don't carry my personal laptop everywhere you know. So throughout the day, for many hours my phone is basically 1FA, not 2FA, and I think that goes for lots of people.