Skip to content

Archive

Authentication

99 articles
Cybersecurity 09 Sep 2026 8 min read

Treat Time as a Security Dependency

Security controls often depend on time without treating the clock itself as part of the control. A token may expire at a timestamp, a signed request may be accepted only for a short window, and investigators may reconstruct an incident by ordering events from several services. If those clocks are wrong, the security decision can be wrong too. A clock that jumps backward can extend a time-based window. Two servers with different wall clocks can disagree about whether the same credential is expired. Poorly synchronized log timestamps can make a correct sequence of events appear reversed.

Cybersecurity 09 Sep 2026 10 min read

Treat Account Email Changes as Security-Sensitive

Changing an account email address can look like an ordinary profile edit. In many systems, however, the email address is also used for sign-in, password recovery, security notifications, or proving control of the account. That makes the change a security-sensitive transition, not merely a text-field update. If an application lets a valid session replace the account email without additional checks, a stolen or unattended session may be enough to redirect future recovery messages to someone else. The legitimate user can then lose both a warning channel and a path back into the account.

Cybersecurity 09 Sep 2026 10 min read

Make Sensitive Requests Replay-Resistant

A server can correctly prove that a request came from a trusted client and still process it more times than intended. If an authenticated request says “approve this payout” or “change this recovery address,” accepting the same valid request twice can create a security problem even though neither copy was forged. This is a replay problem. A replay happens when a previously valid message is presented again and the receiver cannot tell that its authority has already been used, or that the message is too old to trust.

Cybersecurity 09 Sep 2026 8 min read

Keep Session Cookies Bound to the Host That Needs Them

A web application can protect its session identifier with HTTPS and HttpOnly and still give more hosts influence over that session than intended. The problem is often the cookie’s Domain attribute. Suppose the authenticated application is app.example.com, while docs.example.com, status.example.com, and temporary preview hosts live under the same parent domain. If the session cookie is deliberately scoped to example.com, it can be sent to subdomains that do not need it. More broadly scoped cookies also make sibling subdomains part of the cookie’s integrity boundary: a sibling that can set cookies for the parent domain may be able to create a cookie with the same name and interfere with how the application interprets session state.

Cybersecurity 09 Sep 2026 8 min read

Expire Sessions with Idle and Absolute Timeouts

A login session is convenient because a user does not need to authenticate on every request. The same property becomes a security problem when a session credential is copied: whoever possesses a usable credential may keep acting with the authority attached to it until the application stops accepting it. Expiration limits that window. But a single vague setting called “session timeout” is often not enough. Two different questions matter: how long may a session sit unused, and how long may it exist even if it stays active? These are the idle timeout and the absolute timeout.

Cybersecurity 09 Sep 2026 10 min read

Do Not Use Security Questions as Authenticators

An application can protect normal sign-in with a strong password or multi-factor authentication and then weaken the same account with one recovery question such as a pet name or birthplace. If answering that question is enough to reset a password or regain access, the question is effectively another authenticator. That matters because many personal facts are easier to discover, infer, reuse, or guess than a deliberately chosen authentication secret. The recovery path can therefore become easier to satisfy than the sign-in path it is meant to recover.

Cybersecurity 09 Sep 2026 9 min read

Design Security Notifications as Alerts, Not Authentication

A security notification can help a user notice that something important happened to an account: a password changed, a new authenticator was added, a recovery address changed, or a new session appeared. The notification is useful because it creates a second observation path outside the action that caused the event. That benefit can disappear if the notification itself becomes an authentication shortcut. A convenient link that immediately reverses a sensitive change may effectively become a bearer credential: anyone who obtains the link can exercise the authority embedded in it.

Cybersecurity 09 Sep 2026 10 min read

Design Push MFA to Resist Prompt Fatigue

Push-based multi-factor authentication can make sign-in convenient: after a password is accepted, the user receives a prompt on a trusted device and approves the attempt. The weakness appears when the prompt itself becomes easy to approve without understanding what it represents. If an attacker obtains a password and can repeatedly trigger approval requests, the legitimate user may eventually approve one because the prompts are confusing, disruptive, or mistaken for a request they initiated. The second factor still exists, but its security value has been reduced to a repeated yes-or-no question.

Cybersecurity 08 Sep 2026 9 min read

Treat Recovery Codes as One-Time Authenticators

Multi-factor authentication can fail for ordinary reasons: a phone is replaced, a hardware authenticator is lost, or an authenticator application becomes unavailable. Recovery codes give a user a backup path, but that path also becomes part of the authentication system. If a copied recovery code keeps working after it has been used, anyone who obtained the copy may be able to reuse it later. The useful mental model is therefore simple: a recovery code is a one-time backup authenticator, not a reusable emergency password. The server should accept a valid code once, consume it as part of that successful authentication, and reject the same code afterward.

Cybersecurity 08 Sep 2026 9 min read

Throttle Authentication Failures Without Creating a Lockout Weapon

A login endpoint has to reject wrong credentials, but rejection alone does not control how quickly someone can keep trying. If an application accepts thousands of password attempts against the same account with no meaningful slowdown, an attacker gets many chances to guess a valid password. A simple permanent lock after a few failures creates a different problem: anyone who knows a username may be able to lock out its owner on demand.

Cybersecurity 07 Sep 2026 8 min read

Verify the Entire Password Without Truncation

A password field may accept 100 characters while the authentication system verifies only the first 72, 64, or 20. The interface appears to accept the whole password, but the security decision does not. That mismatch is password truncation: silently discarding part of a password before storing or verifying it. Truncation can make two visibly different passwords authenticate as the same credential. It can also create confusing migration bugs when one component preserves the full password and another shortens it.

Cybersecurity 07 Sep 2026 10 min read

Verify a New Contact Before Making It Authoritative

Changing an account email address or phone number can look like an ordinary profile update. It is not ordinary when that contact is used for password resets, account recovery, login alerts, or other security decisions. If an application accepts a new address and immediately treats it as authoritative, a typing mistake can redirect important messages to someone else. An attacker who has gained limited account access may also try to replace a trusted recovery destination with one they control. In both cases, the dangerous step is the same: the application trusts a new destination before establishing that the account holder can receive messages there.

Cybersecurity 07 Sep 2026 10 min read

Treat Authenticator Enrollment as an Account-Control Change

Adding an authenticator can look like an ordinary settings change. It is not. A newly enrolled security key, authenticator app, or other login method may be accepted during future sign-ins, long after the session that created it has ended. That makes enrollment an account-control change: it changes which evidence the system will trust as proof of the user’s identity. If a stolen session is enough to add a new authenticator, an attacker may turn temporary session access into a durable way to return later.

Cybersecurity 07 Sep 2026 10 min read

Store API Keys as Verifiers, Not Recoverable Secrets

An API key is often treated like a password: a client presents a secret string, and the server decides whether that string represents an authorized caller. Yet many systems store API keys in plaintext because the application needs to compare them later. That design creates an avoidable consequence. If an attacker obtains the credential database, every stored plaintext key may immediately become a usable credential. The database leak becomes an authentication compromise as well as a data leak.

Cybersecurity 07 Sep 2026 9 min read

Notify Users When Authentication Controls Change

An application can protect a password change, authenticator enrollment, or account-recovery flow with strong checks and still need a plan for the case where those checks are defeated. If an attacker manages to change an authentication control, the legitimate user may otherwise have no visible signal until the attacker uses the new access or locks them out. A security notification gives the user a second chance to detect that change. The important design detail is independence: the notice should not depend only on the channel or authenticator that the change just replaced.

Cybersecurity 07 Sep 2026 9 min read

Match OAuth Redirect URIs Exactly

An OAuth authorization server eventually has to answer a deceptively simple question: where may it send the browser after authorization? If that destination is validated too loosely, an authorization response intended for one client can be sent somewhere the client does not control. In an authorization-code flow, that can expose the authorization code to another endpoint. Other protections may still limit what can be done with a leaked code, but redirect validation should not create the leak in the first place.

Cybersecurity 07 Sep 2026 10 min read

Let a New Password Reset Request Supersede Older Ones

A password reset link is temporary authority to replace an account credential. If a user requests three reset emails and all three links remain valid, the application has created three independent pieces of recovery authority. Using one link may not remove the risk from the other two. That matters because reset messages can remain in inboxes, mail previews, browser history, or other places the application does not control. A user may request a second link because the first message arrived late, looked stale, or was requested by mistake. If the second request leaves the first token valid, the user’s attempt to start over has not actually replaced the earlier recovery path.

Cybersecurity 07 Sep 2026 10 min read

Do Not Use Personal Questions for Account Recovery

A login flow can use strong passwords and multi-factor authentication, yet the account can still be easier to take over through its recovery path. If a user who cannot sign in only needs to answer questions such as a birth city, school name, or family detail, the recovery process may accept evidence that another person can discover, infer, or repeatedly guess. That makes personal security questions a poor substitute for authentication. The problem is not merely that some questions are badly chosen. The deeper problem is that facts about a person are usually not secrets designed for authentication: they can be shared, become public, remain unchanged for years, and be known by people other than the account owner.

Cybersecurity 07 Sep 2026 7 min read

Do Not Silently Downgrade Authentication

A login system may support several ways to prove identity. That flexibility becomes dangerous when the system silently replaces a required authentication method with a weaker one because the preferred method is unavailable. Imagine an administrative account that normally requires a password plus a phishing-resistant authenticator. The authenticator service has a temporary outage. If the application responds by accepting only the password, an availability problem has changed the account’s security requirement. An attacker who has the password now needs less proof precisely while a security dependency is failing.

Cybersecurity 07 Sep 2026 9 min read

Design Recovery Codes as One-Time Authenticators

Multi-factor authentication can protect an account well during normal login and still leave a weak path around that protection. The weak path is often recovery: a user loses a device, reaches for a saved recovery code, and the application accepts that code as proof of account control. A recovery code is therefore not merely a convenience string. While it is valid, it is an authenticator. If someone else obtains it, they may be able to use the same recovery path as the legitimate user.

Cybersecurity 06 Sep 2026 9 min read

Rotate API Credentials Without Breaking Services

Long-lived API credentials create an awkward security trade-off. Keeping one credential forever avoids deployment work, but extends the useful lifetime of any copy that is exposed. Replacing it abruptly reduces that lifetime, but can also break every client that still uses the old value. The practical solution is not simply to “rotate more often.” It is to design the authentication system so a credential can be introduced, adopted, verified, and retired without requiring one perfectly synchronized change.

Cybersecurity 06 Sep 2026 10 min read

Require Reauthentication Before Sensitive Actions

A user can remain signed in for hours or days, which is useful for ordinary work. The same convenience becomes risky when that old session is enough to change a password, add a new authenticator, reveal a recovery secret, or perform another action with lasting security impact. The problem is simple: a valid session proves that authentication happened earlier; it does not prove that the legitimate user is still in control now. A session may be open on an unattended device or may have been copied by an attacker. If every account change trusts the session equally, possession of that session can become enough to take over the account permanently.

Cybersecurity 06 Sep 2026 11 min read

Rate-Limit Login Attempts by Account and Source

A login endpoint may verify passwords correctly and still give an attacker too many chances to guess them. If failed attempts can be repeated quickly, weak or reused passwords become easier to test through the same interface legitimate users use. A common response is to add a rate limit. The difficult part is choosing what the limit follows. Limiting only an IP address misses distributed attempts from many sources. Limiting only an account lets one source spread attempts across many accounts. Combining the IP address and account into one key looks stricter, but creates a fresh allowance for every pair.

Cybersecurity 06 Sep 2026 10 min read

Notify Users About Security-Sensitive Account Changes

A sensitive account change can succeed even when the application has reasonable preventive controls. An attacker may have a valid stolen session, a user may approve a fraudulent authentication prompt, or a support process may make the wrong change. If the application silently accepts the result, the legitimate user may not discover the problem until the attacker has had time to strengthen control of the account. A security notification gives the user an independent signal that an important change occurred. It does not authorize the change and should not be treated as proof that the change was legitimate. Its job is different: shorten the time between an unauthorized change and the moment the user can recognize and respond to it.