Urgent.News

What's breaking now, across thousands of outlets.

Tech

Hardening a SaaS login on Cloudflare Free: Turnstile, Google sign-in and email without SMTP

SyllogOS is a multi-tenant platform I'm building for Greek cultural associations and the federations they belong to: members, boards, events, documents. Its first tenant is a regional federation, and the people logging in are volunteers, not engineers. That shaped the login more than any threat model. It has to be safe, and it has to feel safe to someone who has never heard the word "brute…

SyllogOS, a multi-tenant platform being built for Greek cultural associations, utilizes Cloudflare's Free plan and one VPS to secure its login process. The login flow consists of several layers, each assuming the previous one has failed:

1. At the edge, a rate limit is implemented, allowing only three requests per IP within a 10-second timeframe. If exceeded, the request is blocked for 10 seconds. This measure is not foolproof and is intended to serve as a deterrent.

2. The real client IP is essential for accurate rate limiting. To achieve this, nginx is configured to trust specific Cloudflare IP ranges, ensuring that the visitor's actual IP is used for subsequent checks. This allows for precise rate limiting without falsely blocking legitimate users.

3. Cloudflare's Turnstile service replaces traditional CAPTCHAs with an invisible verification system. Upon successful verification, a single-use token is sent to the server for authentication. The server must verify this token to grant access, ensuring that bots cannot bypass the verification process.

4. An application limiter is placed within the API, limiting the number of login attempts to 10 per minute. If exceeded, the client is locked out for 10 minutes. This layer remains functional even if the Cloudflare rate limit is altered or bypassed.

5. Google sign-in is integrated without requiring Google to build protection mechanisms. Members are added by tenant administrators, and upon successful Google sign-in, the user's email address is verified against the tenant's records.

6. For email notifications, the platform utilizes a transactional email API (Resend) instead of SMTP, as the VPS provider blocks outbound mail ports. Emails are sent over HTTPS, ensuring secure communication without relying on SMTP infrastructure.

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

Cómo armé un Pit Wall con AWS IoT Core (y por qué este patrón sirve para cualquier industria)

Hola a todos! Hace unos meses me surgio la idea de empezar a correr en simrace nuevamente, en pandemia me compré el volante y lo usé un rato pero perdi la motivación cuando me di cuenta de lo dificil…

  • Author built a Pit Wall using AWS IoT Core for racing simulation.
  • Captured data from Assetto Corsa simulator and sent to AWS IoT Core.
  • Pattern applies to any device generating data outside infrastructure.

Circuit Breaker Pattern

One-liner: A circuit breaker stops calling a failing service to give it time to recover — instead of hammering it with requests that are guaranteed to fail.

  • Circuit breaker pattern prevents repeated calls to failing services, allowing recovery time.
  • Three states: CLOSED, OPEN, HALF-OPEN; circuit trips to OPEN on failure threshold exceedance.
  • Implemented in Java, Node.js, Go, Python, .NET; integrated into service meshes like Istio.

More from Saturday 12 September →