Overview
Deploying Formal consists of four main steps:- Add a Resource: Define the database, API, or infrastructure you want to protect
- Add a Native User: Create a user account for authentication
- Configure a Connector: Create a Connector with listeners in the Control Plane
- Deploy the Connector: Run the Connector container in your infrastructure
Step 1: Add a Resource
The first step is to register the resource you want to protect in Formal.- Web Console
- Terraform
- Navigate to Resources in the Formal console
- Click Create Resource
- Fill in the connection details:
- Technology: Select your technology (PostgreSQL, MySQL, MongoDB, Snowflake, HTTP, SSH, etc.)
- Resource Friendly Name: A friendly name for your resource
- Hostname: Your service hostname or IP
- Port: Service port (e.g., 5432 for PostgreSQL, 27017 for MongoDB)
- Space: (Optional) Logical grouping for access control
- Set Termination Protection to Yes to prevent accidental deletion (recommended for production)
- Click Create
Step 2: Add a Native User to your Resource
Add a native user account that will be used to authenticate connections to your resource.- Web Console
- Terraform
- Navigate to Resources in the Formal console
- Click on your resource to open its details
- Open the Authentication tab
- Under Native Users, click Add User
- Select an authentication method (for example, Password), then fill in the fields:
- Username: resource username (e.g.,
app_user) - Password: resource password
- Username: resource username (e.g.,
- Click Create
After you create a resource that supports native users, the Formal console
opens the Add Native User wizard automatically. You can complete it
there or click Skip and add the user later from Authentication.
Step 3: Configure a Connector
Next, create a Connector in the Control Plane to define how clients will connect.- Web Console
- Terraform
- Navigate to Connectors in the Formal console
- Click Create Connector
- Enter a Name (and optional Space), then click Create
- Open the Connector and go to the Listeners tab
- Click New Listener, set a Name and Port (the port clients connect to, e.g. 5432), then click Create
- Open the listener, click New Rule, and choose a rule type:
- Resource: Route to a specific resource
- Technology: Route to all resources of a type (e.g., all PostgreSQL databases)
- Click Create, then copy the Connector API Token from the Connector details—you’ll need it for deployment
A single listener can use multiple rules. A Technology rule can route to
matching resources via smart
routing.
Step 4: Deploy the Connector
Now deploy the Connector container in your infrastructure.Connector Container Image
Use either registry when you set the Connector image in ECS, Helm, or Docker:- AWS ECR:
654654333078.dkr.ecr.<region>.amazonaws.com/formalco-prod-connector:<tag> - GCP Artifact Registry:
us-docker.pkg.dev/formal-public-assets/formalco-prod-connector/formalco-prod-connector:<tag>
- AWS ECS Fargate (Terraform)
- Kubernetes (Helm)
- Docker (Local Testing)
The recommended deployment for AWS environments.This creates:
Quick Start
- Clone the Formal Terraform examples:
- Create a
terraform.tfvarsfile:
- Deploy:
- ECS Fargate service across multiple availability zones
- Network Load Balancer for high availability
- CloudWatch logging for monitoring
- IAM roles and Secrets Manager for secure key storage
Network Requirements
Ensure your Connector can reach:- Outbound to Formal Control Plane:
api.joinformal.com(gRPC) - Inbound from clients: Port(s) configured in your listeners
- Outbound to resources: Your database/API endpoints
Step 5: Configure DNS and TLS (Optional)
For production deployments, add a custom domain and TLS:- Web Console
- Terraform
- Navigate to Connectors in the Formal console
- Select your Connector and go to Hostnames
- Click Add Hostname
- Enter your custom domain (e.g.,
db.yourcompany.com) - Choose TLS management:
- Formal-Managed: Automatic TLS certificates and DNS records (recommended)
- Customer-Managed: Upload your own TLS certificate and private key in PEM format
Step 6: Connect Through Formal
You’re ready to connect! Route your database connections through the Connector:- ✅ Authenticate your identity
- ✅ Evaluate policies in real-time
- ✅ Log all queries and responses
- ✅ Apply data masking and redaction rules
- ✅ Route to the correct resource
Next Steps
Now that your first Connector is running, explore these features:Write Access Policies
Control who can access what with policy-as-code
View Audit Logs
Monitor all queries and sessions in real-time
Troubleshooting
Connector won't start
Connector won't start
- Verify your API token is valid
- Check connectivity to
api.joinformal.com - Review logs in CloudWatch (ECS) or kubectl logs (Kubernetes)
- Ensure no port conflicts (port 8080 is reserved for health checks)
Can't connect to resources
Can't connect to resources
- Verify the resource is reachable from the Connector’s network
- Check security group rules allow outbound connections
- Confirm the resource host and port are correct in Formal console
- Test direct connectivity from the Connector container
Clients can't reach the Connector
Clients can't reach the Connector
- Verify DNS is resolving correctly
- Check security group/firewall rules allow inbound traffic
- Confirm the listener port matches your client connection string
- Test the Connector health endpoint:
http://connector:8080/health
Need help? Contact support at
support@joinformal.com or check the full
deployment guides.