Skip to content

Archive

Authentication

99 articles
Cybersecurity 06 Sep 2026 9 min read

Do Not Use Security Questions for Account Recovery

A login system can use a strong password and multi-factor authentication, then quietly weaken the whole account through one recovery question: “What was the name of your first school?” If answering that question is enough to reset the password or replace an authentication factor, the answer is effectively another way to authenticate. An attacker does not need to defeat the stronger login path if the recovery path accepts information that can be guessed, researched, reused, or learned from another breach.

Cybersecurity 06 Sep 2026 12 min read

Design Session Revocation for Real Incidents

A user changes a compromised password, an administrator disables an account, or an incident responder chooses “sign out all devices.” The application confirms the action. Yet a browser or stolen session token that was already authenticated continues to work. That gap matters because changing a password and ending an authenticated session are different operations. A password is usually checked when a session is created. Once the session exists, later requests may rely only on the session credential. If the system has no way to withdraw that credential’s authority, fixing the original login secret does not necessarily end access that was established earlier.

Cybersecurity 06 Sep 2026 10 min read

Design Recovery Codes as Real Authenticators

Recovery codes are often presented as a convenience feature: save these codes somewhere, then use one if you lose access to your normal authenticator. That description can hide their real security role. A recovery code may be enough to regain control of an account, so anyone who obtains a valid code may gain the same recovery path as the legitimate user. The practical consequence is simple: a recovery code is an authenticator, not a harmless backup string. Its generation, storage, verification, use, replacement, and revocation all belong inside the authentication threat model.

Cybersecurity 06 Sep 2026 10 min read

Consume One-Time Tokens Atomically

A password-reset link may be labelled “single use” while still being usable twice. The problem is often not token randomness or expiration. It is a race between two requests that both verify the token before either request marks it as used. That matters because temporary tokens frequently authorize sensitive actions: resetting a password, verifying an email address, accepting an invitation, or completing account recovery. If the application promises one-time use, concurrent requests should not be able to turn that promise into two successful authorizations.

Cybersecurity 05 Sep 2026 7 min read

Use a Pepper to Limit Offline Password Cracking

A strong password-hashing function protects stored passwords by making each password guess deliberately expensive. A unique salt ensures that equal passwords do not produce reusable precomputed results. But if an attacker steals the entire password database, the salts are normally there too. The attacker can still test guesses offline without contacting the application. A pepper adds a different kind of barrier: a secret value used when deriving or protecting password verifiers, but stored separately from the password database. If an attacker obtains only the database and not the pepper, the stolen hashes are less useful for offline guessing.

Cybersecurity 05 Sep 2026 10 min read

Treat Email Address Changes as Account-Control Changes

Changing an email address can look like an ordinary profile edit. In many applications, however, email is also a login identifier, a password-recovery destination, a security-notification channel, or all three. Replacing it can therefore change who is able to recover or control the account. If a stolen session is enough to replace the email address immediately, an attacker who temporarily controls that session may be able to redirect later recovery messages and make the legitimate user’s recovery path harder. If the application trusts the new address before proving that the user controls it, a typing mistake can create a similar lockout without any attacker.

Cybersecurity 05 Sep 2026 9 min read

Throttle Login Attempts Without Making Lockout a Weapon

A login endpoint must accept failed passwords. That necessary behavior also gives an attacker a place to make repeated guesses or test credentials stolen from another service. If attempts are effectively unlimited, automation turns each individual login failure into part of a much larger search. A tempting response is to lock an account after a small number of failures. That slows guessing against the account, but it creates another problem: anyone who knows the username may be able to trigger the lockout. A control intended to protect authentication can become a denial-of-service mechanism against legitimate users.

Cybersecurity 05 Sep 2026 9 min read

Store Passwords for Offline Attack Resistance

A login system needs to recognize a password later, but it does not need to recover the original password. That distinction should shape how passwords are stored. If an application stores plaintext passwords, reversible encrypted passwords, or fast general-purpose hashes, a database disclosure can turn into a much larger authentication problem. An attacker who obtains password verifiers can make guesses on their own hardware, without sending each attempt through the application’s login endpoint. Online rate limits no longer control that work.

Cybersecurity 05 Sep 2026 11 min read

Slow Down Automated Login Attacks

A password login endpoint has to accept attempts from people who sometimes mistype their passwords. The same property also gives automated clients a place to try many guesses. If the application processes every attempt at full speed, an attacker can repeatedly test passwords against one account or spread attempts across many accounts. A correct password hash does not solve this problem. Password hashing makes each password verification deliberately costly, but the server still has to decide how many online attempts it will accept. Without another control, the application may provide an attacker with a large number of guesses over time.

Cybersecurity 05 Sep 2026 9 min read

Require Reauthentication Before Sensitive Account Changes

An authenticated session is evidence that a user authenticated at some earlier point. It is not proof that the legitimate account holder is still controlling the browser when a high-impact account change happens. That distinction matters when a session is left open on a shared device or its credential is exposed. A requester who can use the session may be able to change the account email, replace an authentication factor, or perform another action that makes later recovery harder. Ordinary session authentication alone gives the application no fresh signal before that change.

Cybersecurity 05 Sep 2026 8 min read

Require Fresh Authentication for Sensitive Actions

A valid login session is often enough to read ordinary account data or continue routine work. It should not automatically be enough for every action the account can perform. If an attacker obtains an authenticated session, or a user leaves an unlocked session unattended, a long-lived session can turn a temporary opportunity into permission to change a password, replace a recovery method, reveal a sensitive secret, or perform another high-impact operation. Requiring fresh authentication for selected actions reduces that risk by asking the application to verify the user again close to the moment of the sensitive operation.

Cybersecurity 05 Sep 2026 9 min read

Design Recovery Codes as Backup Authenticators

Strong authentication creates a recovery problem: what happens when the user loses the device, key, or application that normally proves who they are? If recovery is much weaker than normal sign-in, an attacker can ignore the strong authenticator and target the fallback instead. If recovery is too difficult, legitimate users can permanently lose access. A recovery code is a secret generated in advance and kept by the user for this failure case. It acts as a backup authenticator: possession of the code can restore access when the normal authenticator is unavailable.

Cybersecurity 05 Sep 2026 10 min read

Block Common and Compromised Passwords at Creation

A password can satisfy a length rule and still be a poor authentication secret. A familiar phrase, a predictable pattern, or a password exposed in an earlier breach may be among the first values an attacker tries against many accounts. This creates a practical problem for applications that allow users to choose passwords: checking only syntax does not tell you whether the chosen value is already widely known or unusually easy to predict.

Cybersecurity 04 Sep 2026 10 min read

Reduce Account Enumeration with Consistent Authentication Responses

A login form can reject every incorrect password and still reveal useful information about its users. If the application says Account not found for one email address and Wrong password for another, anyone who can submit login attempts can learn which address belongs to an account. That information leak is called account enumeration. The same problem can appear in password-reset, registration, invitation, and account-recovery flows. Even when the visible message is identical, differences in HTTP responses, redirects, response size, or processing time can reveal the same fact.

Cybersecurity 04 Sep 2026 11 min read

Bind Security Tokens to Their Intended Purpose

Applications often use temporary tokens to authorize narrow actions: verify an email address, reset a password, accept an invitation, approve an account change, or continue an authentication flow. A token can be random, unexpired, and correctly signed yet still be dangerous if the application accepts it for a different action than the one for which it was issued. The practical problem is token confusion. One part of a system proves that a token is authentic, while another part assumes that authenticity means the token is valid for whatever operation is currently being requested. If different flows share token formats, validation code, or signing keys, that assumption can turn a limited credential into broader authority.

Cybersecurity 03 Sep 2026 11 min read

Verify TLS Server Identity Without Bypasses

A client can establish an encrypted TLS connection and still connect to the wrong server if it does not verify the server’s identity correctly. Encryption protects traffic from observation and modification only within the connection that was established. The client must also decide whether the endpoint at the other end is the service it intended to reach. This matters for browsers, API clients, background workers, mobile applications, service-to-service calls, update clients, and any other software that relies on TLS. A tempting workaround such as “disable certificate verification because the internal certificate is inconvenient” can turn a configuration problem into an authentication failure.

Cybersecurity 03 Sep 2026 10 min read

Store Passwords with Memory-Hard Hashing

A login system must verify passwords, but it should not need to recover them. That distinction matters when an authentication database is copied through a vulnerability, backup exposure, or operational mistake. If the database contains plaintext passwords, the compromise immediately reveals them. If it contains fast, unsalted hashes, an attacker can test large numbers of password guesses efficiently and reuse work across accounts. Password hashing changes the problem. The application stores a verifier produced by a deliberately expensive password-hashing function. During login, it applies the same function to the submitted password and checks whether the result matches.

Cybersecurity 03 Sep 2026 10 min read

Limit Bearer Token Damage with Scope and Lifetime

Bearer tokens are convenient because a service can accept a request based on a credential presented with it. That convenience creates a simple security problem: if an attacker obtains a usable bearer token, the attacker may be able to present it too. The receiving service usually cannot distinguish the legitimate holder from a thief merely by possession of the token. The defensive goal is therefore not only to keep tokens confidential. It is also to limit what a stolen token can authorize and how long that authority remains useful. A token that can perform one narrow task for a short period creates a smaller exposure than a long-lived token with broad access.

Cybersecurity 03 Sep 2026 6 min read

Limit Authentication Abuse with Layered Rate Controls

Authentication endpoints attract automation because each request can test credentials, probe account state, or trigger expensive verification work. Rate controls reduce the speed and value of this abuse, but a single requests-per-minute limit is rarely enough. A useful design combines several signals and responses. The objective is to make abusive behaviour slower and noisier while keeping legitimate users able to recover from mistakes, shared networks, and temporary failures. Protect the whole authentication surface Login is only one part of authentication. Review every endpoint that can verify, change, or recover identity state, including:

Cybersecurity 03 Sep 2026 6 min read

Harden Authenticated Sessions Against Hijacking

Authentication does not end when a password, passkey, or second factor is accepted. After login, most applications represent the user’s authenticated state with a session credential. Anyone who obtains that credential may be able to act as the user without repeating the original authentication. Session security therefore depends on protecting the credential throughout its lifecycle: creation, transport, use, rotation, expiration, and revocation. Treat the session identifier as a credential A session identifier should be unpredictable and generated with a cryptographically secure random generator. It should not encode sequential database IDs, timestamps, usernames, or other values an attacker can infer.

Cybersecurity 03 Sep 2026 9 min read

Generate Security Tokens with Cryptographic Randomness

Many security features depend on a value that an attacker must not be able to guess. Password-reset links, email-verification links, invitation codes, session identifiers, and one-time capability URLs are common examples. If such a token is predictable, an attacker may not need to steal it. They may be able to guess a valid value instead. The defensive requirement is therefore stronger than “make the token look random.” A security token needs enough entropy, meaning uncertainty from the attacker’s point of view, and it needs to come from a generator designed for security-sensitive randomness.

Cybersecurity 03 Sep 2026 11 min read

Design Account Recovery as an Authentication Boundary

A strong sign-in flow can be undermined by a weak recovery flow. Suppose an account requires a password and a phishing-resistant authenticator for normal sign-in. That protection matters only until a user loses the authenticator. If the recovery path replaces it after answering easily discovered personal questions or passing a much weaker check, an attacker can target recovery instead of the normal login. The consequence is straightforward: account recovery is another authentication path, not an administrative convenience. It must provide confidence appropriate to the account and to the access it restores.

Cybersecurity 03 Sep 2026 8 min read

Choose Multi-Factor Authentication by Threat Model

Multi-factor authentication (MFA) reduces the damage caused by stolen passwords, but not every second factor provides the same protection. A one-time code, a push approval, and a hardware-backed credential all add another authentication step, yet they behave differently under phishing, malware, social engineering, and account recovery attacks. The useful question is therefore not simply whether MFA is enabled. It is whether the authentication method resists the threats that matter for the account being protected.

Cybersecurity 03 Sep 2026 9 min read

Authenticate Webhooks with Signed Requests

A webhook endpoint is often intentionally reachable from the internet. That makes delivery convenient, but it also means the endpoint cannot assume that every request came from the service it trusts. If an application processes an unsigned webhook simply because it arrived at the correct URL, anyone who discovers that URL may be able to submit lookalike events. Depending on the integration, a forged event could trigger account changes, fulfilment, notifications, billing workflows, or other automated actions.