AWS ECS Fargate
Use Terraform to deploy Tracecat into ECS Fargate.
This stack is meant for production use. TRACECAT__AUTH_TYPES=google_oauth,saml
is the default configuration.
You’ll need to configure Google OAuth or SAML SSO to login.
Prerequisites
The open source Terraform stack deploys Tracecat into AWS with a public facing application load balancer (ALB) and public hosted zone.
Internal services (e.g. API, worker, databases) are segregrated via private security groups. If your security model requires an internal facing ALB and private hosted zone, please reach out to founders@tracecat.com for help!
- Terraform
curl
,openssl
,docker
to create cryptographic keys used in the Tracecat app- AWS credentials. View AWS Provider docs for details.
- A public Route53 hosted zone (save the hosted zone’s domain name and ID)
- To create secrets in Secrets Manager, either:
- AWS CLI. View installation docs.
- Access to the AWS Management Console.
Instructions
Download Terraform stack
Download installation files from the Tracecat GitHub repo: https://github.com/TracecatHQ/tracecat/tree/main/deployments/aws
Create encryption secrets for Tracecat
Tracecat relies on three symmetric encryption keys (TRACECAT__DB_ENCRYPTION_KEY
, TRACECAT__SERVICE_KEY
, TRACECAT__SIGNING_SECRET
) to sign and encrypt secrets within the application.
The service key and signing secret are random 32-byte hexadecial strings generated by the openssl
CLI tool.
The database encryption key is created using the cryptography
Python library, which is run in Docker.
Download and execute the secrets creation bash script.
View create-aws-secrets.sh
file on GitHub for details
if you want to run this step manually.
Retrieve secret ARNs
Store the ARNs of the three created secrets in a secure place. You will need these ARNs to pass into the Terraform stack as variables.
You can find the ARNs in the web console:
Configure Google OAuth or SAML SSO
The Terraform stack has two Google OAuth variables or four SAML SSO variables that need to be configured to setup Google OAuth or SAML SSO. The variables are:
oauth_client_id_arn
oauth_client_secret_arn
saml_idp_entity_id_arn
saml_idp_redirect_url_arn
saml_idp_certificate_arn
saml_idp_metadata_url_arn
These variables are the ARNs of the AWS Secrets Manager secrets that contain the Google OAuth or SAML SSO configuration. Create the secrets in AWS Secrets Manager and take note of the ARNs.
Deploy stack
Initialize Terraform and deploy the stack by running the following commands:
Wait for the Terraform stack to deploy. This can take up to 10 minutes as spinning up new RDS databases can be slow.
You can configure the Tracecat Fargate deployment via Terraform variables.
View available configs in the variables.tf
file on GitHub.
Access Tracecat UI
Access the Tracecat UI via https://<your-hosted-zone-domain-name>
.
You can also view Tracecat’s API docs via https://<your-hosted-zone-domain-name>/api/docs
.
Login
The first user that logs in via Google OAuth or SAML SSO will be created with default admin privileges.
Next Steps
- Log into Tracecat and build your first playbook. View quickstart.
- Read
variables.tf
andecs/locals.tf
files to better understand Tracecat’s configurations.