TenanciTenanci

Help centerSecurity & access

TenantGuard

Tenanci's protection against attacks and malicious bots on every domain, with monitor or block mode and a security panel in analytics.

TenantGuard is Tenanci's protection layer in front of every domain: it inspects each request before it reaches your app and stops intrusion attempts and malicious bots. It's included in every plan, needs no installation and also protects the APIs you publish with AuthMesh and the API Gateway.

What it does

There are two layers, both automatic:

Layer What it stops
Per-request inspection (WAF) SQL injection, XSS, path traversal, attempts to read .env and .git files, exploits of known vulnerabilities. It looks at headers, address and request body (up to 128 KB).
Banned IPs addresses that behaved like attackers: page scanning, hunting for admin panels, login brute force, known attack tools, aggressive crawling. A banned IP is blocked for a while on every Tenanci domain, not just yours.

Whoever gets stopped sees an "Access denied" page (403) and the request never reaches the origin. Regular visitors and search engines don't notice anything.

Per-domain settings

  1. Open the project and click the domain.
  2. Go to the Settings tab and find the TenantGuard (WAF) card.
  3. Under Mode, pick:
    • Block attacks: stops dangerous requests. Recommended for live sites.
    • Monitor (log only): detects and shows them in analytics, but lets them through. The default for every new domain.
    • Off: doesn't inspect requests.
  4. Under If the WAF becomes unavailable, pick:
    • Let traffic through (favors availability): the default. If inspection fails for a moment, the site stays up.
    • Block (favors security): on failure, visitors see "Service temporarily unavailable" (503) until inspection is back.

The change is saved as soon as you pick the option.

Seeing attacks in analytics

In the domain's analytics (the Analytics button on the domain page), the Security (TenantGuard) section shows what was stopped in the selected period:

Block What it shows
Requests stopped how many were stopped by the WAF, a banned IP or a rate limit
Attacks detected attacks identified by TenantGuard (including the ones only logged in monitor mode)
Attacking IPs how many distinct addresses attacked
Bans how many IPs were banned and how many bans are still active
Attacks over time chart of requests stopped and attacks detected
Attack types the type (e.g. "Login brute force"), number of attacks, number of IPs and when it was last seen
Top attacking IPs each IP with its status (Banned) and when it was last seen
Recent events when, the request and the result (IP banned, Blocked or Detected)
Requests stopped by reason, country and page where they come from and what they're trying to reach

Under By reason, Detected (not blocked) are the requests monitor mode let through, and Rate limit are the ones stopped by the limits you set in AuthMesh or the API Gateway.

Through the API

The mode is a domain field in PATCH /domains/:id (domains:write scope): wafMode (off, monitor, block) and wafFailMode (open, closed). The security numbers come from GET /domains/:id/analytics/security.

curl -X PATCH https://api.tenanci.com/v2/domains/dom_4h7n1q \
  -H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"wafMode":"block","wafFailMode":"open"}'

curl "https://api.tenanci.com/v2/domains/dom_4h7n1q/analytics/security?from=2026-10-01T00:00:00Z&to=2026-11-01T00:00:00Z" \
  -H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"

FAQ

  • One of my customers got "Access denied". Check Recent events for their IP. If a legitimate request was stopped by the WAF, switch the domain back to Monitor while you investigate and contact Tenanci support with the time and the address that was accessed.
  • I want to block specific paths (e.g. /admin). That doesn't depend on attacks: use blocked paths.
  • I want to keep AI bots from reading the site. Well-behaved bots follow robots.txt; use the Block AI bots template in sitemap and robots.txt.
  • Does TenantGuard slow the site down? Inspection happens on the edge itself, before the request moves on to the origin, with no extra round trip to your server.