Formal Connector: a protocol-aware reverse proxy in your VPC

A protocol-aware reverse proxy in your VPC, in front of databases, servers, clusters, APIs and MCP servers. People and agents connect as themselves with the clients they already use, and the Connector holds the credentials, applies policy and logs each request.

Decision log
  1. maya@acme.com sends SELECT email FROM customers to postgres-prod. Rule mask-pii-columns: run, mask email. MASKED: returned: a***@example.com.
  2. claude-code · leo sends DELETE FROM users WHERE plan='free' to postgres-prod. Rule no-deletes-in-prod: block. BLOCKED.
  3. claude-code · leo sends SELECT * FROM orders to snowflake. Rule cap-agent-reads: add LIMIT, then run. LIMIT ADDED: rewritten with a row LIMIT.
  4. sam · on call sends kubectl exec -it payments-7f -- sh to k8s-prod. Rule prod-exec-needs-approval: approved in Slack, record. APPROVED: session recorded for replay.
People and agents keep their tools. Formal Connector holds the credentials, runs each query as a native user and decides on it before it reaches your data.

Trusted by security and platform teams

How it works

From one container to a decision on each query

  1. Deploy it next to your resources

    Run the container on Amazon ECS or Kubernetes, then add listeners: a port, plus a rule that sends its traffic to one resource or to every resource of a technology.

    CONNECTOR · PROD-VPCexample
    • listener :5432 · every Postgres resource✓
    • listener :22 · prod-bastion✓
    • 2 instances behind an NLB, cluster formed✓
  2. Connect as yourself

    Engineers sign in with SSO and keep psql, ssh or kubectl. Agents use short-lived OIDC identities. The real password, key or IAM role stays on the Connector, in a Native User.

    WHO CONNECTSexample
    • maya@acme.com · SSOPERSON
    • claude-code for leo · OIDCAGENT · FOR LEO
    • native user app_ro · AWS Secrets ManagerNEVER SHOWN
  3. Decide on each request

    The Connector parses the wire protocol, so a policy sees the SQL statement, the MCP tool call or the API request, and what comes back. It allows, blocks, masks, rewrites or asks for MFA, then logs it.

    DECIDED ON EACH REQUESTexample
    • DELETE FROM users WHERE plan='free'BLOCKED
    • SELECT name, ssn FROM patientsMASKED
    • mcp tools/call linear.create_issueALLOWED

Why a protocol-aware proxy

How the Formal Connector handles a connection

Formal Connector is a reverse proxy that reads each connection’s wire protocol, so it knows the SQL statement or the MCP tool call, and every connection carries a Formal identity. That makes it an identity-aware proxy for protocols that web access proxies never read.

One port, every protocol

The Connector detects which protocol the client speaks (PostgreSQL, MongoDB, HTTP, SSH and the rest) and loads the matching parser, so adding a technology doesn’t mean opening a new port. What MongoDB’s framing taught us.

  • PostgreSQL
  • MySQL
  • MongoDB
  • Snowflake
  • SSH
  • Kubernetes
  • HTTP
  • gRPC
  • MCP

The clients you already use

psql, mysql, mongosh, ssh and kubectl connect to a Connector hostname, or the Formal Endpoint on a laptop forwards the connection there.

Credentials stay on the Connector

A Native User signs in to the resource. People and agents authenticate with their Formal identity and never see the password, key or token.

Rego, evaluated inside the proxy

Policies are written in Rego, the language of Open Policy Agent, and run in an embedded OPA engine that can’t make network calls.

Outside context through hooks

Context the policy can’t see, like the ticket a support engineer is working on, comes in through hooks or policy data loaders.

Changes without a restart

The container needs one API key. Policies, resources and listeners reach running Connectors from the Control Plane, and cloud discovery finds RDS, EC2 and Kubernetes resources.

  • Policies
  • Resources
  • Listeners
  • Cloud discovery

Capabilities

What the Connector does on each connection

Nobody holds the upstream secret

A Native User tells the Connector how to sign in to the resource. People and agents authenticate with their Formal identity and never see the password, key or token behind it.

  • Passwords, SSH keys, Snowflake keys, AWS, GCP and Azure IAM, kubeconfigs and HTTP credentials
  • Point a Native User at Azure Key Vault, AWS Secrets Manager or GCP Secret Manager; Formal keeps the reference, never the secret
  • A hook can generate or fetch the credential at connection time, after policy allows the connection
  • Pick another Native User for one session by appending @<label> to your Formal username
Database access ›
psql · prod-postgresexample
08:30:01leo@acme.compsql via Formal, no passwordALLOWED
08:30:01connectornative user app_ro from AWS Secrets ManagerTOKEN INJECTED
08:30:04leo@acme.comSELECT count(*) FROM ordersALLOWED

Policy on the query and on the result

Policies are Rego, evaluated by the Connector when a session opens, on each request and on each response. They apply to every resource type except DynamoDB, which Formal authenticates and logs.

  • Block, ask for MFA, rewrite a query, filter rows, mask values or encrypt them
  • Masking on Postgres, MySQL, MariaDB, Redshift, Snowflake and BigQuery columns, MongoDB fields and CSV files read from S3
  • Dry-run a policy, backtest it on retained traffic, and roll back any version
  • Policies, resources and listeners as Terraform
Data masking ›
policy · read-only-for-agentsexample
backtestretained trafficwould have blocked 3 statementsDRY RUN
dry runv4no unexpected blocksDRY RUN
enforcev4live on prod-postgresALLOWED

Every request, with who sent it

The Connector logs each query, command and API call with the person or agent behind it. For SSH, and for kubectl exec or attach, it also keeps a recording you can play back.

  • Recorded SSH and Kubernetes sessions get a risk score from 1 to 5
  • End a suspicious session while it runs
  • Log schemas drop, truncate or encrypt fields before logs leave the Connector
  • Seven log destinations, from Datadog, Splunk and Panther to your own S3, GCS or Azure Blob bucket and Pub/Sub
Session recording ›
ssh · prod-bastionrecording · 22m 10s
maya@acme.comrisk4/5
  1. 15:10:02ssh prod-bastion
  2. 15:18:12journalctl -u payments --since -1h
  3. 15:31:40sudo cat /etc/shadow
  4. 15:32:12exit
SummaryInvestigated payment logs, then read /etc/shadow, which the investigation didn't need. Flagged for review.

MCP servers and model APIs behind the same proxy

MCP clients reach remote MCP servers through the Connector, and applications that call Anthropic, OpenAI or Gemini point at a Connector hostname instead of the provider. Each request gets the same identity, policy and logging as a database query.

  • Each MCP server gets a subdomain of the Connector hostname
  • Upstream sign-in with each user’s own OAuth token, a shared credential, or what the client passes through
  • The Catalog has 80+ MCP server templates that run on it
  • Local stdio MCP servers aren’t covered
MCP gateway ›
mcp · linear.connector.acme.comexample
10:04:11maya@acme.comtools/call linear.create_issueALLOWED
10:04:30claude-code for leotools/call linear.delete_issueBLOCKED
10:05:02billing-appPOST /v1/messages · claude-sonnetALLOWED

Configuration as code

Listeners and rules, in Terraform

A listener is a port. A resource rule sends everything on it to one resource; a technology rule sends it to every resource of one technology, and smart routing picks the right one from the connection string. Spaces narrow which resources a rule can reach.

  • Port 8080 is reserved for health checks
  • One environment variable on the container: FORMAL_CONTROL_PLANE_API_KEY
  • New policies, resources and listeners need no restart; only a version upgrade pulls a new image
Listeners guide ›
connector.tfhcl
resource "formal_connector" "main" {
  name = "main"
}

resource "formal_connector_listener" "postgres_listener" {
  connector_id = formal_connector.main.id
  name         = "postgres-listener"
  port         = 5432
}

resource "formal_connector_listener_rule" "postgres_rule" {
  connector_listener_id = formal_connector_listener.postgres_listener.id
  type                  = "technology"
  rule                  = "postgres"
}

Supported resources

Which protocols does the Formal Connector support?

The Connector proxies 21 resource types. What a policy can do differs by type, because each protocol exposes different things to inspect: the FAQ below lists where policy runs and what can be masked.

Every connection option per technology ›

Deployment

Where does the Connector run?

In your network, as a statically linked binary in a multi-architecture distroless image: Linux, AMD64 or ARM64, any Docker-compatible runtime.

Deployment6 items
01

Amazon ECS or Kubernetes

For production, ECS on Fargate behind a Network Load Balancer across availability zones, or EKS, GKE, AKS or on-premises Kubernetes with the Formal Helm charts. Plain Docker is for development.

02

Sized for policy in memory

Give each instance 2 whole CPU cores and 4 GB of RAM, and run at least two. A fractional CPU limit shows up as latency at peak (deployment guide).

03

Logs survive an outage

Mount 10 GB at /formal/logs and the Connector spools logs there when it can’t deliver them: more than a day of outage at 100 requests per second.

04

Instances form a cluster

On ECS or Kubernetes, instances find each other over port 7946. Each works alone; shared state is what makes a rate limit hold across all of them.

05

TLS on both sides

A Formal-managed hostname gets its certificate issued and renewed. Your own hostname needs a *.<hostname> certificate too (TLS guide). Toward resources, up to verify-full.

06

FIPS 140-3 build

A separate image builds against the Go Cryptographic Module in FIPS 140-3 mode. It drops policy hooks and RDP and refuses unapproved options (FIPS docs).

Trust

Your data stays in your network

Your traffic

Queries and results go between the client, the Connector and the resource. The Control Plane can't interact with your data. It receives logs, minus whatever a log schema drops or encrypts.

Control Plane outages

Running Connectors keep their last configuration, and spool logs to disk until they can deliver them.

Monitoring

Health checks on port 8080. Metrics over OpenTelemetry, with Datadog and Grafana dashboards to import.

Hosting and trust

Formal runs the Control Plane, or you run it yourself on AWS. On AWS, the Connector can reach it over PrivateLink. SOC 2 Type II and ISO 27001, SSO and SCIM.

Customer proof

Technologies secured
10+
Resources secured
1,000+
Logs per week
40M+
Sessions per week
600K+
“With Formal, we can finally manage least privilege access across our entire infrastructure through a single control plane.”
Tom Daniels
Tom Daniels
CISO, Cursor
Read the Cursor story ›

FAQ

Questions engineers ask us

Do engineers have to change their tools?

No. psql, mysql, mongosh, ssh and kubectl keep working against the Connector hostname. The Formal CLI sets up the local connection.

What can a policy do on each protocol?

On PostgreSQL, MySQL, MariaDB, Redshift, Snowflake and BigQuery, policy runs on the session, each query and each result, and masks columns. MongoDB is the same with field paths. ClickHouse runs all three stages but a column mask fails closed. S3 masks CSV objects read with GetObject. HTTP, Web, GCP and LLM APIs can redact by policy; MCP responses aren’t masked. gRPC and Redis run session and request policies. Kubernetes checks every API request, SSH and AWS SSM decide at session start, RDP allows, blocks or asks for MFA, and DynamoDB is authenticated and logged only.

Is the Connector an identity-aware proxy?

Yes, in the sense that every connection carries a Formal identity: SSO for people, a short-lived OIDC token for agents and workloads. Most identity-aware proxies front web applications over HTTPS and decide at login. The Connector also parses database, SSH, RDP and Kubernetes protocols, so a policy can act on the query or the API request itself.

Is it a database proxy, like a connection pooler?

No. A connection-pooling database proxy reuses connections and fails over between replicas. The Connector is a reverse proxy for access control and audit: it authenticates each user, applies policy to each query and logs it. We don’t document pooling or read/write splitting, so keep the pooler you have.

Why a proxy instead of an agentless tool?

Agentless tools work from what each system already reports, such as database audit logs or Kubernetes audit events, so they tell you afterwards what ran. Sitting in the path is what lets Formal change the outcome before the client sees it, and hold the credential so the user never has it. The cost is one more hop in the path, which you run and size yourself.

Does our data go through Formal's cloud?

No. Queries and results travel between the client, the Connector and the resource. Logs do reach the Control Plane, and log schemas can drop, truncate or encrypt fields before they leave the Connector.

Is there a FIPS 140-3 build of the Connector?

Yes, a separate image built against the Go Cryptographic Module v1.26.0 in FIPS 140-3 mode, published to ECR in us-east-1, us-west-1 and us-west-2. It drops policy hooks and RDP proxying and refuses unapproved options: MySQL and MariaDB need TLS on both sides, PostgreSQL loses MD5 passwords, MongoDB loses SCRAM-SHA-1 and SSH needs a pinned host key. Go’s FIPS 140-3 page has the module’s CMVP status, and the image alone doesn’t make a deployment FIPS compliant.

Does Formal rotate passwords?

Not automatically. Someone changes the credential once, on the Native User, and no client config changes with it. If your vault already rotates the secret, store a reference to it instead, and the Connector reads the value when a connection opens.

Can AI agents connect through it?

Yes. Agents authenticate with short-lived OIDC tokens; Formal has 15 issuer presets, GitHub Actions, EKS and Devin among them, and accepts any other OIDC provider. Each agent is mapped to the human it works for, follows the same policies, and its requests are attributed to that person.

Put the Connector in front of one database

Deploy it in your VPC, then connect with psql, ssh or kubectl as yourself.