Urgent.News

What's breaking now, across thousands of outlets.

Tech

Decoupled Security: Securing the Auth Flow Without Touching the Implementation

Integrating additional security measures into existing authentication systems often introduces operational risks. With our new Caddy plugin, we shift this layer into the infrastructure. A load test with 40,000 requests demonstrates the stability of this architecture. For technical decision-makers, the authentication process is a mission-critical component. Any modification to the core codebase…

Integrating extra security into existing authentication systems can bring operational risks. Caddy's new plugin shifts this layer to infrastructure, a load test with 40,000 requests confirms the architecture's stability. For technical decision-makers, the authentication process is critical; any change to the core codebase raises system failure risks.

New verification methods, like checking for leaked passwords, often require backend changes and new dependencies. However, a non-negotiable requirement remains: third-party service latency or failure must not disrupt the standard login process for users.

Instead of requiring teams to modify their backend implementations (Node, PHP, Go, Java), Caddy adopts an infrastructure-based approach. The official caddy-hansestack plugin for the Caddy reverse proxy completely decouples the security QA layer from the application. In enrich_response mode, the plugin acts as middleware, intercepting requests, securely extracting passwords using k-anonymity, and immediately passing the original login request to the backend in parallel.

The backend remains unchanged and processes the login normally. Caddy waits for the asynchronous API result before responding and adds the HTTP header (X-Hansestack-Leaked: true) to the client's response. This requires no backend code changes and adds no latency to the primary login process.

To validate the system's reliability, a load test with 40,000 concurrent login attempts was conducted. The system was tested in a controlled environment, simulating 40 blocks of 1,000 background processes targeting the local Caddy server using a bash script. The goal was to overload the system to measure the behavior of the integrated circuit breaker. The load test showed that 36,700 requests were intercepted by the fail-open mechanism, with zero client errors occurring.

The system's resilience is demonstrated by its ability to handle over 36,700 requests, rate-limiting 1,924 requests due to concurrency, and activating the circuit breaker after five consecutive errors. After the circuit breaker opens, the remaining 36,715 requests are passed through locally without an API call, relieving the external interface and preventing the auth flow from being blocked.

The system recorded 0 client errors, maintaining delivery of requests to the backend, and maintained the login process with measured latencies of p50 (median) at 2.73 ms, p95 at 150 ms, and p99 at 345 ms, all below the 500ms timeout.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How to Set Up a Google Play Closed Testing Campaign

When I finished building my first Android app, I thought pushing my code to production was going to be as simple as hitting a release button.

  • Create and name closed testing track in Google Play Console
  • Upload signed Android App Bundle for review
  • Recruit 12 testers for 14 consecutive days

Creating a Custom Agent in 5 Minutes

Agents are cool, we know that, but making them can seem daunting. But actually it can be super easy, with the right tools and approach, let me show you how.

  • Use M365 Agent Builder for quick custom agent creation
  • Define clear use case and requirements before design
  • Build instruction file with logic, error handling, and UI

The Deployment Failure That Only Shows Up on a Clean Clone

Six months of adding tools to my site, one page router file, and a lesson about the difference between "works on my machine" and "exists in version control." The setup DukoTools just went from 112 to…

  • Six months of gradual tool integration increased tools from 112 to 138.
  • Crucial deployment failure due to uncommitted tools in version control.
  • Clean Vercel clone build succeeded after removing 14 orphaned import lines.

More from Monday 14 September →