Skip to content
All guides

Encryption at rest and in transit

Every place Trakkwise stores customer data is encrypted, and every connection that leaves a private network uses TLS 1.2 or later. This page lists each one, for security reviews and questionnaires. The source of truth is the Terraform in infra/terraform, the API in api/src, and the agent in agent/internal.

At rest

One customer-managed KMS key per environment (kms.tf), rotated yearly by AWS, encrypts everything below marked "KMS key".

Where What Encryption
Postgres (RDS) events, inventory, settings, users, audit log KMS key, including automated backups, snapshots and Performance Insights
S3 raw bucket event batches as received SSE-KMS with the KMS key
Secrets Manager database passwords, session and sealing keys, the RDS master password KMS key
CloudWatch Logs application, VPC flow and WAF logs KMS key
ECR container images KMS key
SNS alarm notifications KMS key
S3 logs bucket load balancer, CloudFront and S3 access logs SSE-S3 (AES-256): load balancer log delivery supports only this
S3 downloads bucket signed agent installers and profiles (public files) SSE-S3 (AES-256)
Fargate task storage temporary files while a task runs AES-256 with an AWS-managed key (Fargate default)
Terraform state the infrastructure's state, including generated secrets S3 with SSE-KMS, versioned, readable only by the deploy and admin roles

Secrets customers give us are sealed again inside the database with AES-256-GCM under a key held in Secrets Manager (SSO_SECRET_KEY), and are never returned by the API:

  • each organization's SSO client secret;
  • Slack webhook URLs;
  • AI platform admin keys (Settings → Integrations).

Captured prompts (prompt capture, off unless a customer turns it on) are encrypted with AES-256-GCM under a key of each customer's own, made when capture is first set up. That key is sealed under PROMPT_CAPTURE_KEY (Secrets Manager, separate from SSO_SECRET_KEY). Deleting every prompt also replaces the customer's key. Database backups hold both until they expire (14 days).

On employees' computers, the agent keeps its queue of unsent events, its policy and its credential in a folder only root or SYSTEM can read. The agent does not encrypt that folder itself; it relies on full-disk encryption (FileVault, BitLocker), which customers' MDM normally enforces. The browser extension keeps its settings and unsent events in the browser's extension storage.

In transit

Connection Protection
Agents, browsers and the console's users → load balancer TLS 1.3 or 1.2 only (ELBSecurityPolicy-TLS13-1-2-2021-06); port 80 only redirects to 443. The console and the API send HSTS
Load balancer → API and console tasks Plain HTTP inside private subnets; each task accepts traffic only from the load balancer's security group
API → Postgres TLS with full certificate verification against the RDS CA bundle (sslmode=verify-full). The database refuses connections without TLS (rds.force_ssl) and below TLS 1.2 (ssl_min_protocol_version)
API and jobs → S3, KMS, Secrets Manager, SES HTTPS via the AWS SDK. Every bucket refuses requests without TLS or below TLS 1.2 (bucket policies)
API → identity providers, AI platform APIs, Slack HTTPS with certificate verification, TLS 1.2 minimum (Node.js default). Issuer and webhook addresses must be https; the SSO issuer must resolve to a public address
Alert email (SES → recipient's mail server) TLS required (tls_policy = REQUIRE): a mail server that can't do TLS gets nothing, rather than a message in clear
Agent installers and updates (CloudFront) HTTPS only (HTTP redirects). Production uses its own domain with TLS 1.2 or later (TLSv1.2_2021); Terraform refuses a production plan without one. Update manifests are also signed (Ed25519), so a file changed in transit is refused
Agent → API TLS 1.2 or later, certificate verified. The agent refuses plain http to any public host, so a misconfigured MDM profile sends nothing rather than its device key in clear. Plain http is allowed only to this computer or a private network address, for the local trial kit

Separation between customers

All customers share one database, one API and one object store, with each customer's data kept apart in several layers, so a mistake in one doesn't expose another customer:

Layer How
Database Row-level security on every table that holds a customer's data: each query runs inside a transaction tagged with one organization, and Postgres returns and accepts only that organization's rows. The API connects as a role that owns no tables and can't bypass row-level security. The few tables without it hold no customer data (list prices, migration records) or are closed to the API role entirely
Trakkwise's own customer records A customer's plan, contacts and billing are under row-level security too: an organization can read its own record, read-only; only Trakkwise's operator code, after checking the caller is Trakkwise staff, sees them all
API Every organization route checks that the credential (console session or API key) belongs to the organization in the address. A credential for another organization gets the same 404 as an organization that doesn't exist, so it can't even learn whether one exists. Device, gateway, SCIM and telemetry credentials each belong to one organization, which the API reads from the credential, never from the request
Roles inside a customer Each route requires a role (viewer, analyst or admin); a route without one is refused
Object storage Raw uploads are stored under the organization's own prefix (raw/<organization>/…), taken from the device's credential
Analytics database (ClickHouse, optional) It has no row-level security of its own, so every read goes through one function that sets the organization itself and refuses a query that doesn't filter on it
Secrets SSO secrets, vendor keys and webhook URLs are sealed per value; captured prompts are encrypted with a key of each organization's own

Automated tests check this on every change (api/test/isolation.test.ts): that every table either has row-level security or is listed with the reason it's safe, that the API's database roles can't bypass it, that every organization route in the API answers another organization's credential with 404 and nothing of the first organization's, that customer records are readable only as above, and that an analytics query without the organization filter is refused before it is sent.

Not covered

  • The local trial kit (trial/) runs on one computer or a private network over plain http. It is for evaluation with test data only.
  • Agent data on a computer without full-disk encryption is readable by someone with administrator rights on that computer.