TLS Proxy Server
A tls proxy server sits between a client and a backend service to handle encryption. It checks digital certificates and sets up a secure tunnel for network traffic. Most engineering teams set up this server at the edge of their network. They load private keys onto one central node instead of every backend host. Still, once the handshake finishes, the user often gets broad permissions on the backend. Transport rules check the machine or the network path, not the actual commands inside. How a tl
Database Proxy (ProxySQL, PgBouncer) + Kubernetes API Server Access: the complete guide
Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.
A tls proxy server sits between a client and a backend service to handle encryption. It checks digital certificates and sets up a secure tunnel for network traffic. Most engineering teams set up this server at the edge of their network. They load private keys onto one central node instead of every backend host. Still, once the handshake finishes, the user often gets broad permissions on the backend. Transport rules check the machine or the network path, not the actual commands inside.
How a tls proxy server handles network traffic
When a user or app sends a request, it hits the server first. The server presents a public certificate to prove its identity to the client. Next, both sides agree on a cipher and exchange session keys. This step keeps attackers from reading packets as they cross the wire.
Teams choose between two main modes when they set up this architecture. The first mode is termination, where the server decrypts the incoming traffic. It reads the plain traffic and forwards it to the internal backend host. Sometimes the server re-encrypts the data before sending it to the final destination. The second mode is passthrough, where the server does not decrypt the traffic. Instead, it reads the server name from the handshake and routes the raw stream.
For strict internal rules, teams often turn on mutual TLS. In this setup, the client must also show a valid certificate to log in. An internal certificate authority signs these client files for each developer or service. The server checks the signature and expiration date before it opens the network tunnel.
Why transport encryption is only the first step
Centralizing certificates saves a lot of time for platform teams. You do not need to rotate keys on dozens of small database or app servers. You can block bad ciphers in one place and drop unencrypted traffic right away. Mutual TLS also stops unknown machines from reaching your private ports.
Still, transport checks only happen when the session starts. Once the tunnel is open, the network layer trusts everything inside that stream. A valid client certificate proves who owns the device, not what the user plans to run. If a developer logs into a production database, the tunnel forwards every query.
Database Proxy (ProxySQL, PgBouncer) + Kubernetes API Server Access: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
The server does not know the difference between a safe read and a table drop. It also does not see raw PII like emails, phone numbers, or card numbers. When a query returns thousand of rows, the encrypted tunnel sends all that raw data back. Standard network logs only show IP addresses, ports, and byte counts. Auditors cannot see which SQL statement ran or which shell command changed a file.
Managing client certificates and permissions at scale
Running mutual TLS for human users brings heavy daily work. Every time an engineer joins the team, you must issue a new client certificate. When someone leaves or loses a laptop, you must update revocation lists right away. If a revocation list fails to sync, a revoked key might still work.
Because managing many roles is hard, teams often share one backend account across many users. Everyone passes the transport check and lands in the same shared database role or Linux user. This makes it impossible to tie a specific command back to one person. To keep data safe, teams need controls that read and filter commands inside the session.
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 inline in the protocol beside the service as an open-source proxy, a sidecar for your database or API. On every production query an agent or human runs, hoop.dev decides whether to pass, mask, block, or escalate it for review.
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 approval, and hoop.dev data masking rewrites sensitive fields in responses in memory. Explore the MIT-licensed project on GitHub.
Frequently asked questions
What is the difference between TLS termination and TLS passthrough?
Termination decrypts traffic at the intermediate server before sending it to the backend. Passthrough routes the encrypted stream straight to the backend without decrypting the payload.
Does mutual TLS control which database queries a user can run?
No, mutual TLS only checks certificates during the initial network handshake. It cannot inspect or block individual SQL statements once the session starts.
Can a transport server mask sensitive data in query results?
No, a standard transport server only moves byte streams between hosts. Rewriting fields like emails or national IDs requires a tool that understands the database protocol.
Related guides
In this post