Skip to content

Zero Trust Access: A Practical Guide for Web Applications

Author: Published: Updated: 6 min read

What is zero trust?

Zero trust is an approach where a request is not trusted because it "came from the internal network"; each access is verified separately against identity and context. NIST defines it in SP 800-207: network location alone grants no authority, and access is decided per resource.

For web applications the plain reading is this: if your admin panel is reachable from the internet, everyone can see the login form and guess passwords. A zero trust layer puts a gate in front of that form too.

What should not sit on the open internet?

Three kinds of systems get targeted often:

  • Admin panels. Paths such as /admin, /wp-admin and /dashboard are the first thing automated scanners look for. A weak password or a software flaw turns an attack straight into admin rights.
  • Staging and test environments. They are usually patched less than production, may hold a copy of real data, and can leak into search engines.
  • Internal tools. Grafana, Kibana, n8n and database admin UIs ship with their own authentication, but that authentication is often weak.

What they share: the user base is small and known. If nobody needs anonymous access, closing anonymous access is the cheapest defense.

VPN or an identity-aware access layer?

A VPN works at the network level: the connected user is inside the network and can reach everything on it. You also have to install and manage a client for every employee.

An identity-aware access layer works at the application level. As the visitor goes to the application, a reverse proxy steps in, asks for proof of identity and forwards the request only if it checks out. No client install is needed; a browser is enough. The architecture is covered in what is a reverse proxy.

VPNIdentity-aware layer
ScopeWhole networkOne application or path
SetupClient on every deviceBrowser
SSH, databasesProtectsDoes not protect
Fine-grained path rulesHardNatural

Neither replaces the other. SSH and database ports need a VPN or a firewall rule.

Proving identity: e-mail OTP and TOTP

E-mail OTP sends a one-time code to the user's address. It is easy to set up and needs no extra app. Its weakness is that it depends on mailbox security; codes can be delayed or land in spam.

TOTP is a time-based one-time password (RFC 6238). An authenticator app and the server share a secret, and both derive a code from the current time window, commonly 30 seconds. It builds on HOTP (RFC 4226). It needs no network and does not depend on a mailbox, but if the phone holding the secret is lost you need a recovery plan.

Requiring both means an attacker must take over the mailbox and the phone. For sensitive panels this is the most reasonable choice.

Scope: what, for whom, on which path?

A good access rule answers three questions:

  1. Which path? The whole site, or only a prefix such as /admin? A narrow scope leaves public pages alone.
  2. Which IPs? Adding your office's fixed address to an allow-list lets traffic from it skip the authentication step. Keep the list tight; if a compromised device connects from that IP, the gate stays open.
  3. Which exceptions? Webhooks, payment callbacks, health checks and mobile-app APIs cannot enter an OTP. Put them in the excluded paths.

A session cookie spares the user from authenticating on every request. Keep its lifetime short and be careful in environments with shared devices.

Why session cookies matter

Entering an OTP on every request is not workable. After verification the proxy gives the browser a session cookie and from then on only checks the cookie. That cookie behaves like a password: if it is stolen, the thief gets in as the owner. Three measures help: set the cookie Secure and HttpOnly, keep its lifetime as short as your work allows, and ask users to sign out on shared computers.

Session length is a trade-off. Too short and users must enter an OTP every hour, and people will lobby to remove the gate. Too long and a lost device becomes a bigger risk. A same-day lifetime for sensitive panels and a longer one for low-risk staging is a reasonable start.

Bypass risks

An identity layer assumes traffic really passes through it. If an attacker finds your origin server's IP and connects directly, they never see Zero Trust. That is why the origin must accept traffic only from the proxy; see origin IP hiding and origin lock.

Other risks:

  • Over-broad exclusions. An exclusion such as /public/* can be bypassed with /public/../admin if path normalization is wrong. Verify that matching runs on the normalized path.
  • Brute force. If the OTP endpoint allows unlimited attempts, codes can be guessed. Attempt and send limits are mandatory.
  • Weak recovery. If the "I got the code" flow can be talked around through social engineering, the layer is worthless.

Bot traffic needs a separate layer; see bot protection.

How Nexren Shield handles this

Zero Trust is an access layer placed in front of an application or a path. Current features:

  • Methods: e-mail OTP, TOTP, or both.
  • Scope: path scope, an IP allow-list and excluded paths.
  • Session: one cookie per site.
  • Abuse limits: a rate limit on OTP sends and a cap on failed TOTP attempts.
  • Human evidence: a verified Zero Trust identity counts as evidence of a human, so the CAPTCHA step is skipped.
  • Plans: available on every plan.
  • Privacy: OTP codes and passwords are not written to logs.

The limit, stated plainly: Zero Trust protects only HTTP(S) applications behind the proxy. It does not protect SSH or database ports. It can also be bypassed if the origin is reachable directly; origin lock and the firewall script exist for that reason. For an overview of the product see what is Nexren Shield, and for the technical layers the technology page.

Rollout order

  1. Decide what to protect (/admin, the whole staging site).
  2. List webhook and API paths and exclude them.
  3. Pick the method; require both on a sensitive panel.
  4. Add office IPs to the allow-list, only truly fixed ones.
  5. Test from another device and network; confirm that a signed-out browser hits the gate on the panel path.
  6. Make the origin reachable only from the proxy.

Sources

Related product pages:Technology

Frequently asked questions

Do I need a VPN for zero trust?

No. If the application is served over HTTP(S), an identity layer placed in front of it restricts access without a VPN. A VPN still makes sense for non-web services such as SSH or databases.

Does Zero Trust protect SSH or database ports?

No. Nexren Shield's Zero Trust layer protects only HTTP(S) applications behind the proxy. Use a firewall or VPN for SSH and database ports.

Which is better, e-mail OTP or TOTP?

They carry different risks. E-mail OTP depends on mailbox access; TOTP depends on an enrolled authenticator app. Requiring both is the strictest option.

Will Zero Trust break my webhooks?

It will if the scope covers them, because the system sending a webhook cannot enter an OTP. Add webhook paths to the excluded paths.

Does Zero Trust cost extra?

No. Zero Trust is on every plan; only a few features such as manual Under Attack mode are limited to Pro and Enterprise.

Related guides

Take a closer look at Nexren Shield

Review the plans and prices. Accounts are opened by our team; you can send an account request through the contact form.