The Simplest Way to Make Traefik and Zscaler Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

You pair traefik and zscaler to route private network requests to internal web apps. Zscaler handles user login and network paths, while Traefik directs traffic inside your cluster. Together, they help teams drop public endpoints and block direct network hits. A user logs in once, and the network path routes to the right container. This setup keeps internal services off the public web. How traefik and zscaler move traffic and user identity The workflow starts when a team member opens a brows

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You pair traefik and zscaler to route private network requests to internal web apps. Zscaler handles user login and network paths, while Traefik directs traffic inside your cluster.

Together, they help teams drop public endpoints and block direct network hits. A user logs in once, and the network path routes to the right container. This setup keeps internal services off the public web.

How traefik and zscaler move traffic and user identity

The workflow starts when a team member opens a browser or a local tool. Zscaler checks the user identity through your main login provider. It also checks the device state before it opens a private network path.

Once the user passes these checks, Zscaler sends the request to a private connector. That connector sits inside the same private network as your app cluster. The connector forwards the traffic straight to your Traefik ingress point.

Traefik reads the host name and path on each incoming request. It matches those details against its own routing rules. Then it forwards the request to the right backend service or container.

To share identity, Zscaler can pass user headers along with the web request. Traefik reads these headers and passes them to the backend app. You can also set up Traefik middleware to check tokens from your identity provider.

Common failure modes and how to scope network paths

A common mistake is giving the Zscaler connector a wide network path. If the connector can reach every port, one bad rule exposes the whole cluster. Instead, point Zscaler only to the specific internal IP and port for Traefik.

Another failure mode comes from trusting plain HTTP headers without strict network rules. If any pod in the cluster can talk to Traefik, it can fake headers. Lock down your internal firewall so only the Zscaler connector reaches that entry point.

End-to-End Encryption + Traefik Middleware Security: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Shared service accounts also create risk when teams run automated jobs or scripts. A broad token in a build tool can bypass user checks and hit routes. Give each automated job its own narrow role and short token lifespan.

Certificate errors often break traffic between the two tools. If Zscaler checks TLS traffic, Traefik must trust the root cert from Zscaler. Set up mutual TLS between the connector and Traefik to secure the local link.

Auditing and data controls across internal routes

Network routing and ingress rules only solve part of the access puzzle. Zscaler logs when a network path opens for a given user. Traefik logs the web path, the status code, and the response time.

Neither tool looks inside database queries or admin commands that run past the ingress. When an engineer connects to a backend database, basic ingress logs miss the query. You also need a way to mask sensitive fields in query outputs.

Good data controls rewrite matched fields like emails, phone numbers, or card numbers. Masking rewrites these fields in results before they reach the user screen. Combining network rules with action logs and data masking gives you complete control.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

Should Traefik use a public IP when paired with Zscaler?

No, keep Traefik on a private IP inside your internal network. The Zscaler connector sits inside the network and sends traffic to that private address. This hides your ingress point from public internet scans.

Who handles TLS certificates in this setup?

You can terminate TLS at Traefik using certs from an internal authority. Make sure the Zscaler connector trusts that internal certificate chain. You can also pass encrypted traffic straight through to Traefik.

How do we restrict which apps a user can reach?

Define app segments in Zscaler for each internal host name rather than whole subnets. Map each segment to a specific user group in your login provider. Traefik then routes only the host names that pass the first check.

The query runs. The emails stay hidden.