beginner

Authentication: Passwords, MFA, Passkeys and Single Sign-On

How to prove who you are, and how attackers break it: authentication factors, why passwords fail (reuse, phishing, stuffing, cracking), modern password guidance, multi-factor authentication and phishing-resistant options, passkeys, single sign-on with SAML and OIDC, and account recovery.

45 min

Identity is the new front door

Most breaches begin with someone else’s credentials. Attackers do not always “hack in”; they log in. That makes authentication (proving who you are) and authorisation (deciding what you may do) the most important controls in modern security, in the cloud and on-premises.

Three related ideas, often confused:

Term Question it answers
Identification Who do you claim to be? (a username, an email)
Authentication Can you prove it? (a password, a code, a key)
Authorisation What are you allowed to do now that we know who you are? (permissions, roles)

A fourth, accounting (audit logging), records what happened. Together they are sometimes called AAA.

The authentication factors

Factor Meaning Examples Weakness
Knowledge Something you know Password, PIN, security question Can be guessed, phished, reused, leaked
Possession Something you have Phone app code, hardware key, smart card Can be stolen or (for codes) phished
Inherence Something you are Fingerprint, face Cannot be changed if compromised; false matches
Context Somewhere you are, something you do Location, device health, behaviour Used as a risk signal, not a lone factor

Multi-factor authentication (MFA) requires factors from different categories. Two passwords, or a password and a security question, are still one factor.

Why passwords fail

  • Weak and guessable: Password1!, names, dates, keyboard patterns. Attackers try the most common ones first (password spraying tries a few common passwords across many accounts to avoid lockouts).
  • Reused: when one site is breached, the leaked pairs are tried everywhere else (credential stuffing). This is the most common way accounts are taken over at scale.
  • Phished: users are tricked into typing them into a fake site.
  • Cracked: if a database of password hashes is stolen, fast hashes (MD5, plain SHA) are cracked in minutes. Slow, salted hashes (Argon2id, bcrypt) make it far harder (the Backend course covers how services should store them).
  • Captured: keyloggers and information-stealing malware, shoulder surfing, insecure storage in plain files or chat messages.
  • Guessed through recovery: “mother’s maiden name” and similar answers are often findable.

Modern password guidance

Current guidance (NIST SP 800-63B) differs from old habits:

  • Length beats complexity. Prefer long passphrases (four or more unrelated words) over short, complex strings. Allow at least 64 characters and any characters, including spaces.
  • Do not force periodic changes without a reason. Mandatory rotation makes people pick predictable variations (Summer2026! to Autumn2026!). Change a password when there is evidence of compromise.
  • Block bad passwords: reject common, leaked and context-specific passwords (the company name, the username).
  • Use a password manager so every account has a unique, random password. Users remember one strong passphrase and the manager does the rest.
  • Allow pasting, so password managers work.
  • Limit and monitor guessing: rate limiting, lockouts that do not allow easy denial of service, and alerts on bursts of failures.
  • Never email or log passwords, and never store them reversibly.

Multi-factor authentication

MFA stops most account takeover, because a stolen password alone is no longer enough. Methods, from weakest to strongest:

Method Notes
SMS or voice code Better than nothing, but vulnerable to SIM-swapping, interception and phishing
Email code Only as secure as the mailbox
Authenticator app (TOTP) A code that changes every 30 seconds, generated on the phone; good, but can be phished in real time
Push approval Convenient, but susceptible to MFA fatigue (attackers spam approval requests until a tired user taps accept). Use number matching and context in the prompt
Hardware security key / passkey (FIDO2/WebAuthn) Phishing-resistant: the best option

Attacks on MFA

  • Real-time phishing proxies (adversary-in-the-middle kits) sit between the user and the real site, relay the password and the one-time code, and steal the session cookie. Only phishing-resistant methods defeat them.
  • MFA fatigue / push bombing: repeated prompts until the user approves.
  • SIM swapping: convincing a mobile carrier to move a number to the attacker’s SIM.
  • Session theft: malware steals a signed-in session token, bypassing MFA entirely. Short sessions, device binding and endpoint security help.
  • Weak recovery paths: if “I lost my phone” resets MFA with a weak check, the attacker uses that.

Passkeys and security keys

FIDO2 / WebAuthn replaces passwords with public-key cryptography: the device holds a private key; the site stores only the public key. At sign-in the device signs a challenge that includes the website’s real domain, after a local unlock (fingerprint, face or PIN). Because the signature is bound to the genuine site, a phishing page cannot use it, and there is no shared secret to leak in a breach.

Passkeys are discoverable FIDO credentials that sync between a person’s devices through a platform (Apple, Google, Microsoft, or a password manager), making them practical for everyone. Hardware keys (such as YubiKey) are the choice for administrators and high-risk users. For critical accounts, register two keys and keep one safely stored.

Single sign-on and federation

Instead of every application keeping its own passwords, users sign in once to a central identity provider (IdP) (Microsoft Entra ID, Okta, Google Workspace, Keycloak), which tells each application “this is Ada, and she passed MFA.”

Protocol Used for
SAML 2.0 Enterprise web applications; XML assertions signed by the IdP
OpenID Connect (OIDC) Modern web and mobile sign-in, built on OAuth 2.0; JSON tokens (an ID token says who you are)
OAuth 2.0 Authorisation delegation (“let this app read my calendar”), not authentication by itself
Kerberos / NTLM Windows domains
RADIUS / 802.1X Network access (Wi-Fi, switch ports; see the Layer 2 security lessons)

Benefits: one place to enforce MFA, conditional access and device checks; faster, cleaner onboarding and offboarding (disable one account and access ends everywhere); better audit logs; fewer passwords. Risks: the IdP becomes a single point of compromise and failure, so protect it with phishing-resistant MFA, break-glass accounts and monitoring, and watch for token theft and over-broad application consent.

Conditional access adds context: require MFA from new locations, block sign-ins from impossible travel, require a compliant (patched, encrypted) device for sensitive apps, and deny legacy protocols that cannot do MFA.

Accounts, privileges and lifecycle

  • Least privilege: give only the access needed. Use separate admin accounts for administrative work, not the account that reads email and browses the web.
  • Joiner, mover, leaver process: grant access on arrival, adjust on role change, remove on departure the same day. Orphaned accounts are a common entry point.
  • Service accounts and API keys need owners, narrow permissions, rotation and monitoring, and should not be shared by people.
  • Privileged access management (PAM): vault admin credentials, check them out for a limited time, and record sessions.
  • Review access regularly (access recertification).
  • Account recovery is part of authentication. Verify identity carefully for resets, notify the user of changes, and never let help-desk staff reset MFA on a phone call alone.

What attackers do, and the matching defence

Attack Defence
Brute force / spraying Rate limiting, lockout, breached-password blocking, MFA
Credential stuffing Unique passwords (manager), breached-password checks, MFA, bot detection
Phishing Phishing-resistant MFA (passkeys), email filtering, user training, reporting button
Password database theft Slow salted hashing, MFA so cracked passwords are not enough
Session hijacking HttpOnly and Secure cookies, short sessions, token binding, endpoint protection
MFA fatigue Number matching, rate limit prompts, alert on bursts of denied pushes
Help-desk social engineering Strict identity-proofing scripts, callbacks to known numbers
A company enforces a 90-day password change with complexity rules. Staff increasingly use patterns such as Spring2026! then Summer2026!, and help-desk resets are rising. What would you change?

Follow current guidance: remove forced periodic rotation (change only on evidence of compromise), require longer passphrases instead of complexity rules, block common and breached passwords, provide a password manager, and require MFA (ideally phishing-resistant for admins). Also secure the help-desk reset process, since it is an attack path.

Can You Explain It?

Close the lesson and answer these without looking back. The goal isn't the wording — it's whether you've formed a usable mental model.

  • Explain the difference between authentication and authorisation, with an example of each.
  • Why is SMS-based MFA weaker than a hardware key, and what does 'phishing-resistant' mean?
  • Describe the benefits and the main risk of single sign-on.

🧪 Want to practise this on your own computer? See how to set up your lab →

🤖

Need clarification? Ask GT

Hi, I'm GT — your AI tutor for Authentication: Passwords, MFA, Passkeys and Single Sign-On. What would you like to know?
📝

Knowledge Check

1 of 4

Which is an example of two different authentication factors?

Report a problem

About: /lessons/authentication-passwords-mfa-and-sso