Switch to Cert-based VPN

Published
Length
3 min read

Luis Felipe Dias

All posts

To switch to cert based vpn entry, replace static user passwords with cryptographic keys. You set up an internal authority that signs and checks each device key. Many teams start with shared secrets or simple password logins for remote staff. Those old setups fail when an attacker steals a password or reuses a token. Broad network roles then let that person roam across many internal servers at once. How to switch to cert based vpn architecture A certificate setup relies on public key math ins

VPN Access Control + End-to-End Encryption: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

To switch to cert based vpn entry, replace static user passwords with cryptographic keys. You set up an internal authority that signs and checks each device key. Many teams start with shared secrets or simple password logins for remote staff. Those old setups fail when an attacker steals a password or reuses a token. Broad network roles then let that person roam across many internal servers at once.

How to switch to cert based vpn architecture

A certificate setup relies on public key math instead of typed secrets. First, your security team builds a private root authority on a locked server. That root server holds a master key and signs smaller keys for staff laptops. You never put the master signing key on the public internet.

Next, you set up an intermediate signing server to handle daily key requests. The VPN server trusts any client key signed by this intermediate server. Each engineer gets a unique key pair stored inside their device keychain. When the engineer logs in, the VPN checks the signature on their client key.

The server also checks that the client key has not expired or been revoked. You can tie this issuance flow to your identity provider for single sign-on. After a user proves their identity, the system writes a short-lived key to their laptop. This design stops password theft because no password travels across the wire during login. Teams also set up device posture checks to verify laptop health before issuing keys.

What client certificates solve and what they miss

Moving to client keys fixes several big problems with old remote login tools. Attackers cannot phish a cryptographic key embedded inside a hardware chip on a laptop. You also stop credential sharing because keys stay bound to one single device. When an employee leaves the team, you revoke their key on the central list.

Still, a VPN still works at the network layer rather than the command layer. Once a user passes the key check, their laptop joins the internal network subnet. The VPN decides who gets onto the network, not what commands they run next. An engineer with a valid VPN key still logs into databases with broad roles.

VPN Access Control + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Network logs only show packet flows and IP addresses between the laptop and server. Those logs cannot tell you which SQL query an engineer ran inside Postgres. They also do not show which shell commands a developer typed on a Linux host. If a trusted laptop gets malware, the attacker rides that open tunnel to internal systems. Also, raw data like emails and card numbers flows back to the laptop unchecked.

Managing key lifecycles and revocation lists

Running your own key authority takes steady operational work from your platform team. Long-lived keys create risk if a laptop gets lost or stolen at a cafe. To lower that risk, you must maintain an active revocation list on the server. The VPN server must fetch this list often so it blocks bad keys fast.

If the revocation server goes offline, your VPN might fail open or block everyone. Many teams switch to short-lived keys that expire after twelve or twenty-four hours. Short lifecycles shrink the window of risk without needing complex revocation lists. Still, short keys only guard the front door to the network subnet. You still need fine-grained controls over actual database queries and server commands in flight.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev sits inline in the wire protocol beside those services as an open-source proxy, a sidecar for your Postgres or API. On every query an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run, and hoop.dev data masking rewrites matched sensitive values in responses in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

How often should VPN client certificates expire?

Short lifecycles of one day or one week work best for engineering teams. Short expiry times reduce your need to manage complex revocation lists when laptops go missing.

Where should staff laptops store their private VPN keys?

Store private keys inside the laptop hardware security chip or the system keychain. This prevents malware or users from copying the raw key file to another machine.

Does a certificate VPN replace database role controls?

No, a VPN only controls network entry from the user laptop to the subnet. You still must manage database roles and inspect queries to protect sensitive records.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.