Account Hardening
tsdevstack sets up each environment it deploys with a WAF at the edge, private networks, encrypted storage, private buckets, access logs and an audit trail. Compliance Readiness lists all of it.
The services on this page work on your cloud account as a whole, often across all your projects. The framework doesn't turn them on. They cost money per account, and if you work in a company, your team may already run them. This page says what each one does, what it costs, and how to turn it on.
Prices were checked on 2026-11-09: AWS for US East (N. Virginia), Google's list prices, and Azure's retail prices (Sweden Central, an hourly rate times 730 hours for a month). Prices change, so check the linked pages before you decide.
At a glance
Threat detection
These services watch your account's activity and network traffic, and report unusual behaviour as findings. They don't block anything on their own.
- GCP: Security Command Center only works for a project that belongs to an organization. A project made with a personal Google account has none. If the trial ends and you don't go back to the Standard tier first, Premium keeps billing.
- AWS: GuardDuty reads CloudTrail, VPC flow logs and DNS logs on its own. It doesn't need the trail or flow logs tsdevstack creates. During the trial, GuardDuty's Usage page estimates your monthly cost.
- Azure: each plan covers one kind of resource. For a tsdevstack environment the useful ones are App Service (Kong and the Next.js apps), PostgreSQL, Key Vault, Storage and Resource Manager.
Findings in one place
These services check your setup against each cloud's recommended settings and gather the findings, their own and the threat detection service's, in one list.
- AWS: a tsdevstack environment runs on Fargate, so it has no EC2 instances. What counts is its container images in ECR, its Lambda functions and its IAM roles. The Essentials plan includes the AWS Config recorder it needs.
Secret rotation
Rotating a secret means replacing it with a new value, on a schedule or whenever you choose.
In tsdevstack:
-
Secrets you add yourself (a payment provider's API key, for example): create a new key at the provider, then store it:
Code that reads it with
SecretsServicegets the new value within 5 minutes. A value your code reads fromprocess.envchanges on the next deploy. Then remove the old key at the provider. -
JWT signing keys: see Key rotation.
-
Database passwords: see Changing a service's database password below.
Don't attach the cloud's automatic rotation to the secrets the framework manages (database URLs, JWT keys, service URLs). The framework writes them and expects their format.
What each cloud can automate, for the secrets you add yourself:
Changing a service's database password
Each service connects to its database with its own user, through its DATABASE_URL. To give that user a new password, run three steps. The example uses auth-service in prod:
-
Replace the service's
DATABASE_URLwith a placeholder: -
Deploy the infrastructure. Its database step finds no password in the URL, sets a new one and writes the new
DATABASE_URL: -
Deploy the service, so it and its workers start with the new URL:
Run the steps one after another, at a quiet time. Until step 3 is done, the service may briefly lose its database connection.
This changes the password the service runs with. The migrations use a separate one, which stays as it is.
Mutual TLS between services
Mutual TLS (mTLS) makes each service prove who it is on every call to another service. Your services already reach each other without going over the public internet. Adding mTLS isn't an account setting on any of the three clouds:
- AWS: ECS offers it through Service Connect, with a certificate authority in AWS Private CA: $50 a month for a short-lived certificate authority plus $0.058 per certificate. tsdevstack uses Cloud Map for service discovery instead.
- Azure: the Container Apps environment has an mTLS setting, in public preview. tsdevstack's Terraform keeps it off, so a change made by hand is undone by the next
infra:deploy. - GCP: Cloud Run checks the caller when a service requires IAM and every call carries a Google ID token. tsdevstack doesn't set that up.
DNSSEC
DNSSEC signs your domain's DNS answers, so resolvers can check that they're genuine. It takes two parts: your DNS host signs the zone, and your registrar publishes a DS record for it.
- Check before you add the DS record: once it's published, resolvers that check signatures stop answering for your domain if the signing breaks. On Route 53, set a CloudWatch alarm on
DNSSECInternalFailureandDNSSECKeySigningKeysNeedingAction, as AWS recommends. - Turning it off: in reverse. Remove the DS record at the registrar first, wait for its TTL, then stop signing.
The zone goes with the environment, and so do its signing keys. Before you destroy, remove the DS record at your registrar and wait for its TTL. Otherwise resolvers that check signatures stop answering for your domain. A later deploy creates a new zone with new keys: sign it again and add its new DS record.