by londons_explore · 2y ago · 0 comments
That means it's super easy to do credential stuffing attacks, and at google-scale, that sort of attack is going to let an attacker ruin a lot of lives.
This is a good thing, and they should have done it years ago (they kinda did by defaulting IMAP/POP/SMTP access to off - that protects most users - this is just for the rest)
Take your preferred auth module in Dovecot and modify it to read the input password as: pwd+otp code. If the user is 2fa enabled, read last 6 digits and compare against totp.
If match, allow the IP through for x minutes or whatever other policy you want.
It works surprisingly well
It's a pretty commonly used, and works very well, but requires user education on how to fill in their combined password. A proper API with distinct fields for password and OTP is cleaner, but requires protocol support.
A dedicated question for the OTP would be much better. Also, the password manager would know to not save the password+OTP every time as a new password.
instead of sending your password as johndoe, you send johndoe123456 where 123456 is the code
Luckily I don't use GMail for my mail.
And most users only have a couple devices so tracking that once you already know the user is usually very easy even without a cookie.
This is a feature.