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 New Resource
- Fill in the connection details:
- Name: A friendly name for your resource
- Type: Select your technology (PostgreSQL, MySQL, MongoDB, Snowflake, HTTP, SSH, etc.)
- Host: Your service hostname or IP
- Port: Service port (e.g., 5432 for PostgreSQL, 27017 for MongoDB)
- Space: (Optional) Logical grouping for access control
- Enable Termination Protection to prevent accidental deletion (recommended for production)
- Click Create Resource
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
- Go to the Native Users tab
- Click Add Native User
- Fill in the user details:
- Username: resource username (e.g.,
app_user) - Password: resource password
- Description: Optional description for the user
- Username: resource username (e.g.,
- Click Create Native User
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 New Connector
- Enter a Name for your Connector
- Add a Listener:
- Port: The port clients will connect to (e.g., 5432 for PostgreSQL)
- Rule Type: Choose how to route connections:
- Resource: Route to a specific resource
- Technology: Route to all resources of a type (e.g., all PostgreSQL databases)
- Any: Auto-detect protocol and route intelligently
- Click Create Connector
- Save the API Token that appears—you’ll need it for deployment
The Connector supports smart routing: a single listener on one port can
handle multiple protocols and automatically route to the correct resource.
Step 4: Deploy the Connector
Now deploy the Connector container in your infrastructure.- 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)
- Custom certificates: 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 2. Check security group rules allow outbound connections 3. Confirm the resource host and port are correct in Formal console 4. 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.