Recap: an account security checklist
Day 14 of our web security series: everything from logins and accounts week turned into one checklist for site owners, plus five habits for everyone.
Week two is done. Last week we followed a page from the address bar to the server and back. This week we followed a person: from creating a password, through logging in, staying logged in and recovering a lost account, to what they’re allowed to see once they’re inside.
As on Day 7, there’s no new theory today. Instead, here’s the whole week as a checklist you can work through, and it joins the website security checklist, version 1 to make version 2.
The week in one paragraph
A good site never stores your password, only a slow, salted hash of it (Day 8). Its login page slows down guessing without locking out the real user (Day 9). Once you’re in, a well-protected session cookie keeps you logged in safely (Day 10), and the “Forgot password?” link only lets the real owner back in (Day 11). Passkeys and two-factor login mean a stolen password isn’t enough on its own (Day 12), and permission checks on every request make sure each user only sees what’s theirs (Day 13).
For site owners: the account checklist
Passwords
- Passwords are hashed with Argon2id, scrypt or bcrypt through a maintained library.
- Old hashes are upgraded when users next log in.
- Passwords never appear in logs, analytics or error reports.
- Long passwords and all characters are allowed; there’s no short maximum length.
- New passwords are checked against known breach lists.
The login page
- Login, sign-up and reset forms are rate limited per account and per IP.
- Repeated failures cause delays or step-up checks, not permanent lockouts.
- Error messages are the same whether or not the account exists.
- Users get an email when someone signs in from a new device.
Sessions
- The session cookie has
Secure,HttpOnlyandSameSite=LaxorStrict, and noDomain. - It uses the
__Host-prefix where your framework allows. - A new session ID is issued at login and at any privilege change.
- Sessions have both an idle and an absolute timeout.
- Logout destroys the session on the server.
- Changing or resetting a password ends all other sessions.
Password reset
- Reset tokens are long, random, hashed in storage, single-use and short-lived.
- Reset links are built from a configured site address, never from the
Hostheader. - The reset page loads no third-party scripts and sends no referrer.
- No security questions.
- A “your password was changed” email is always sent.
Second factors
- Users can turn on an authenticator app, and passkeys are supported or planned.
- Recovery codes are issued at setup and stored hashed.
- Code entry is rate limited.
- Changing security settings requires logging in again and sends a notification.
- Admin and staff accounts must use a strong second factor.
Permissions
- Every request that reads or changes a record checks that this user may access this record.
- New routes deny access by default.
- Permission rules live in one shared place.
- Staff, tools and services have the least access they need, and access is removed when people leave.
- The two-account test from Day 13 passes on your most important pages.
If that looks like a lot, start with three items: hashing, session cookie settings and ownership checks on every request. Those three prevent the largest and most common account breaches.
For everyone: the five-minute habits
- Use a password manager and a different password for every site.
- Secure your email account first, with a strong password and two-factor login. Almost every reset link on the web goes there.
- Turn on passkeys or an authenticator app for email, banking, social media and your password manager.
- Read the security emails: “new sign-in” and “password changed” messages exist so you can act fast.
- Log out of all devices after changing a password or losing a phone or laptop.
A quick look back at week two
| Day | Post | One-line takeaway |
|---|---|---|
| 8 | Storing passwords properly | A site should never be able to read your password |
| 9 | Login pages that resist guessing | Slow attackers down without shutting real users out |
| 10 | Sessions done right | Protect the session cookie like the password it replaces |
| 11 | Password reset flows | The “Forgot password?” link is a second front door |
| 12 | Passkeys and 2FA for your site | A stolen password alone shouldn’t be enough |
| 13 | Getting permissions right | Logged in doesn’t mean allowed |
Coming up next
Next week we look at the most common ways web applications go wrong, from a defender’s side. On Day 15 we start with the OWASP Top 10: what it is, who makes it, and why every developer and site owner should know it.