website/content/en/docs/setup/going-to-prod/hardening.md
Before we can harden Vector we must understand how it’s vulnerable. The following table demonstrates Vector’s threat model coverage with the below defense-in-depth strategy.
| Threat | Defenses |
|---|---|
| Eavesdropping attacks | 🛡️ Enable whole disk encryption |
| 🛡️ Disable swap | |
| 🛡️ Restrict Vector’s data directory | |
| 🛡️ Encrypt external storage | |
| 🛡️ Encrypt or redact sensitive attributes | |
| 🛡️ Disable core dumps | |
| 🛡️ Use end-to-end TLS | |
| 🛡️ Use modern encryption algorithms | |
| 🛡️ Use a firewall | |
| Supply chain attacks | 🛡️ Download over encrypted channels |
| 🛡️ Verify Vector’s download | |
| Credential theft attacks | 🛡️ Never use plain text secrets |
| 🛡️ Restrict Vector’s configuration directory | |
| Privilege escalation attacks | 🛡️ Do not run Vector as root |
| 🛡️ Restrict the Vector service account | |
| 🛡️ Ensure Vector is the single tenant | |
| 🛡️ Disable SSH or remote access | |
| Upstream attacks | 🛡️ Review Vector’s security policy |
| 🛡️ Upgrade Vector frequency |
Vector takes a defense-in-depth approach to hardening and follows the data, process, host, and network onion model.
Vector will not serialize events on disk unless you’ve configured Vector to use disk buffers or have enabled swap. Therefore, to secure data at rest, we recommend:
/var/lib/vector ).redact function).RLIMIT_CORE to 0 disables core dumps. In the systemd service unit file, setting LimitCORE=0 will enforce this setting for the Vector service (this is done automatically when installing Vector through apt or yum).{{< info >}} Vector implements an affine type system via Rust that achieves memory safety and removes data from memory as soon as possible. Memory safety eliminates a class of memory-related security bugs, and the affine type system reduces exposure by only keeping data in memory when needed. {{< /info >}}
{{< info >}} Vector’s code is open-source, and the development process is secured as outlined in Vector’s security policy. {{< /info >}}
/etc/vector) should be read restricted to Vector’s unprivileged service account and write restricted to your operational account used when deploying Vector./etc/vector directory). The only directory the Vector service account should write to is Vector’s data directory (i.e., /var/lib/vector).