Security Hardening
These practices tighten a default Lyft Data deployment so only trusted users and systems can interact with it.
Security properties
- Transport security ready - run the server with
--tls-cert/--tls-key(or theLYFTDATA_TLS_CERT/LYFTDATA_TLS_KEYenv vars) to serve HTTPS. Workers and CLIs validate certificates by default and only drop to insecure mode when you set the hiddenLYFTDATA_TLS_INSECUREoverride, so leave it unset in production. - Tokenised APIs - every REST route is wrapped with role-specific JWT filters. Tokens are signed with
LYFTDATA_JWT_PSK, and invalid or role-mismatched requests are rejected before handler code executes. - Workers require credentials - the worker CLI will not start unless it receives an API key or auto-enrolment secret. During bootstrap it exchanges those credentials for short-lived JWTs, keeping unauthenticated workers from connecting silently.
- Signed job bundles enforced - workers verify each job’s DSL IR bundle and refuse to stage tampered payloads. Build without the default
strict-signaturefeature only if you have a controlled test scenario that requires it. - Auto-generated signing secrets - if
LYFTDATA_JWT_PSKis absent at startup the server prints and stores a fresh 30-character secret, so there is never a shared default key. Persist the generated value (or set your own) to keep issued tokens valid across restarts.
Network boundaries
- Allow only required ports (server API, worker API, SSH). Example with UFW:
Terminal window sudo ufw allow 22/tcpsudo ufw allow 3000/tcp # server API (internal only)sudo ufw deny 3000/tcp # block from public networkssudo ufw enable - Segment traffic: keep the control plane, workers, and backing databases in separate subnets or security groups and restrict cross-segment traffic to the minimum required ports.
- Require VPN or bastion access for administration; lock the server port to management CIDRs.
Authentication and access
- Issue unique API keys for every worker and rotate them on a schedule. Store keys in environment files with
chmod 600and load them through your service manager. - Use auto-enrolment (
LYFTDATA_AUTO_ENROLLMENT_KEY) only on trusted networks. Audit the list of registered workers after enabling it and disable the key when you are done provisioning. - Enable TLS on the control plane with either CLI flags or environment variables:
Point workers at the HTTPS URL (
Terminal window lyftdata run server \--tls-cert /etc/lyftdata/certs/server.crt \--tls-key /etc/lyftdata/certs/server.keyLYFTDATA_URL=https://lyftdata.example.com) and ensure the certificate chain is trusted on each host. - Restrict unauthenticated access to metrics/log endpoints with the server
--whitelistflag (LYFTDATAD_WHITELISTenv) or by placing the server behind a reverse proxy that enforces IP allow-lists and auth for admin routes. - Add HTTP basic auth or SSO at the proxy layer for the UI if your deployment runs on a shared management network.
Protect data at rest and in transit
- Encrypt disks or volumes that store staging data, backups, and logs (LUKS, encrypted EBS/EFS, etc.).
- Terminate TLS at the server or a reverse proxy; renew certificates automatically (Let’s Encrypt, ACM, Vault, etc.).
- Encrypt sensitive columns in downstream databases when exporting data (for example,
pgp_sym_encryptin Postgres).
Harden the OS
- Disable unused services (
telnet,ftp, etc.). - Disable root SSH login and password authentication; rely on key-based access.
- Apply least privileges on
/etc/lyftdataand/var/lib/lyftdatadirectories. - Keep the OS and Lyft Data binaries patched; subscribe to security advisories.
Logging and auditing
- Forward server and worker logs to your SIEM; monitor for unusual login attempts and configuration changes.
- Enable shell history logging or configuration management to track changes to
server.yamland unit files. - Periodically review context changes in the Context workspace or by calling
/api/contexts/globalto ensure secrets haven’t drifted.
Incident response checklist
- Isolate impacted workers/servers from the network.
- Rotate API keys, TLS certificates, and any credentials stored in context.
- Restore from a known-good backup (see Backup & recovery).
- Review audit logs to determine cause and scope.
- Patch vulnerabilities and document lessons learned.
Security is ongoing; integrate these hardening steps into your deployment automation and revisit them quarterly.