Skip to content
VectoryHelp center
Home

Security model

View Markdown

Copy page as Markdown

Clipboard access is unavailable. The complete page is selected below. Copy it using your keyboard or device menu, or download the Markdown file.

Download Markdown

What Vectory guarantees, who has to trust whom, and where the limits are. Read this before you connect production hosts.

  • Devices only connect out. The agent opens every connection, over TLS 1.3. Nothing on a device listens for Vectory. No option skips certificate checks: not in the agent, the installer, or the install command, which checks its download against your server’s CA. To hear about changes within seconds, the agent keeps one of its own requests open; the answer only tells it to check in.
  • Devices prove who they are. Each device has its own key and certificate. Every request after enrollment uses mutual TLS, and a revoked device is refused at once.
  • Devices only run what they can verify. A configuration is an immutable, published version. It arrives in a manifest signed for that one device, and the agent refuses anything older than what it has already accepted.
  • An agent updates only with the host’s consent and a signature. A host installs a new agent build only if someone on it agreed to updates, and only if a key it pinned signed the build. Updates are off until an administrator turns them on. See Agent updates.
  • The host decides what a pipeline may touch. Restricted mode, files, destinations and listeners are local choices. The server can’t widen them. The one exception is a loopback-only exporter of Vector’s own metrics, described under Restricted and full mode.
  • Device-bound credentials stay on the host. Pipelines reference secrets by name. Their local files and values are not sent as configuration or bindings to the server. A Vector report can still echo a value that redaction misses; see Credentials and data.
  • Your event stream stays on its route. Events flow from Vector to your destinations, not through Vectory. Vectory receives status, the bounded metrics you enable, and redacted Vector error and validation reports. A report can contain text derived from an event; see Credentials and data.
  • Changes are authorized and recorded. The server checks each permission itself and writes an audit event for each change it accepts.
Party Trusted to Enforced by
Administrators Manage people, recover device identities and run server maintenance. Server-side role checks; password plus optional two-factor sign-in.
Operators Publish and deploy to devices, and manage enrollment tokens and device access. Server-side role checks. Every deployment is previewed and audited.
Pipeline publishers Run the components each device allows. In full mode, act with Vector’s permissions on that host. The device’s local mode and allowances.
Host operators Choose restricted or full mode, approve resources and provide credentials. They also choose, once, whether the host takes agent updates and which key it pins. Local files and flags that only someone on the host can change.
The holder of a release key Decide which agent builds every host that pinned the key installs, as root. The signature a host checks, the key it pinned, its release counters and its own consent.
The Vectory server Tell devices which signed version to run. Signed manifests, generation checks and local policy on each device.

A person who can publish pipelines to a full-mode device can make that host’s Vector do anything Vector can do. Choose full mode only where you trust everyone with the Operator role.

Each device runs in one mode, chosen on the host when the agent is installed.

Restricted (the default) accepts only:

Kind Allowed
Sources demo_logs, internal_metrics, file, http_server, syslog, opentelemetry
Transforms remap, filter, route, sample, reduce, log_to_metric
Sinks console (to stderr only), blackhole, http, loki, elasticsearch, prometheus_exporter
Global settings data_dir, acknowledgements, healthchecks, timezone

Within those components, restricted mode also:

  • allows only the file roots, host:port destinations and listener addresses listed in the device’s allowance file. One listener is exempt: the monitoring exporter, a prometheus_exporter on a loopback IP literal whose inputs are all internal_metrics sources (what Add monitoring adds). It exposes only Vector’s own metrics, to this host. Only one such exporter per pipeline is exempt;
  • refuses a file root that would give pipelines the agent’s own files: /, the root of a drive or share, or a directory that is, holds or lies inside the agent’s state directory, the managed configuration directory or a file bound to a device secret. install, setup and vectory allow check it when you add the root;
  • requires explicit destinations and listeners, so a component can’t fall back to a default address;
  • refuses an AWS credentials file (credentials_file under auth). A profile can name a program that Vector runs while it validates, and a pipeline’s own file sink could write such a file under an allowed root. Give the sink its access keys as device secrets;
  • refuses the AWS strategy (auth.strategy: aws) without explicit keys, in the elasticsearch, http, loki and prometheus_exporter sinks. Without both access_key_id and secret_access_key, or with assume_role, imds or profile, the sink would sign with this host’s own AWS identity, which no allowance names. Give it explicit keys as device secrets;
  • refuses environment variables ($NAME, ${NAME}), {{ }} templates and other substitutions anywhere in the pipeline;
  • refuses secret providers, enrichment tables, external VRL files and any setting that runs a program;
  • refuses any api block, including one with enabled: false; the whole block needs a full-mode device. When enabled, Vector’s API has no authentication and can stream live events. Its default address, 127.0.0.1:8686, is reachable by clients on that device. A wildcard or non-loopback address may also be reachable by network clients, depending on host and network controls. Keep it isolated from untrusted clients;
  • refuses VRL that calls a function reaching outside the event: get_env_var, get_secret, set_secret, remove_secret, dns_lookup, reverse_dns, http_request, get_enrichment_table_record, find_enrichment_table_records, and the functions that read a file (validate_json_schema, parse_proto, encode_proto). It also refuses a call that passes a file to parse_groks (alias_sources) or parse_etld (psl), because Vector opens that file when it compiles the program and no file root covers it. Without a file argument, both functions are allowed. Only a call counts: a metric named http_requests_total or an event value "http_request" is data;
  • refuses to turn off TLS certificate or host name verification.

Full Vector mode accepts anything the host’s Vector build supports. Only the host can enable it, with vectory install --allow-full-vector-config; the dashboard shows the mode and blocks deployments that need full mode on restricted devices. Allowances don’t apply in full mode.

Both modes refuse a component ID that could be a path: one with a /, a \ or a control character, or one that starts with a drive letter and a colon (like C:). Vector uses an ID as a directory name under its data_dir for disk buffers and checkpoints, so an ID such as /tmp/x would make it create files outside the agent’s state directory. The agent refuses such a version before Vector sees it and reports INVALID_COMPONENT_ID, naming the component. A restricted device refuses an api block the same way and reports LOCAL_API_DENIED: no allowance covers it, so the version needs a full-mode device. An AWS credentials file and AWS credentials the host supplies are refused the same way, as CREDENTIALS_FILE_DENIED and AMBIENT_CREDENTIALS_DENIED, and the deploy review blocks a restricted device for them as it does for an api block. These findings, and what to do about them, are in A pipeline is rejected or rolled back.

  1. Enrollment. The agent creates its private key on the host and sends a certificate request with a one-time enrollment token. It verifies the server’s certificate before sending the token. The server issues a client certificate valid for 30 days and ignores every other field the request asks for.
  2. Every check-in uses mutual TLS with that certificate. Enrollment tokens can’t authenticate check-ins, downloads or the dashboard.
  3. Renewal happens automatically, over the same authenticated channel, in the certificate’s last day. After the server’s device certificate authority is rotated, renewal moves each device to the new one; until the old one is retired, certificates from both are accepted.
  4. Revocation in the dashboard blocks the identity’s certificates immediately. It also removes the device from its groups and from deployments that follow group membership. It doesn’t stop Vector on the host.
  5. Recovery replaces a lost identity. It needs an administrator’s one-time authorization and a person on the host, and it creates a new device identity. See Recover a device identity.

Enrollment tokens can be limited by use count, expiry and device-name prefix, and to a list of up to 500 device names, each of which can enroll once. A token can’t take over a name that belongs to an existing device.

A token can also give the devices it enrolls up to 8 labels, such as site=berlin. Search Devices for a label key, value or key=value to find those hosts. Labels describe a device. They never add it to a group, target it with a deployment or give it secrets: every new device starts unmanaged until someone deploys to it. Someone who steals a token can enroll a device only within the token’s limits, and that device receives nothing until an operator targets it. Revoke a token you no longer need in Add device.

  1. Checked before publishing. The pipeline gets structural checks. The isolated validator runs vector validate where safe; a configuration provider supplies the configuration on each device, so its native check waits for that device. Other checks that need the device, such as local files, wait for step 7 too. The validator never runs Lua, which can run any program, never reads an enrichment table’s file and never builds an AWS instance metadata step, which sends requests to the address you wrote: it stands in for those steps, and the tests of such a pipeline run only on devices. If a pipeline needs the isolated validator and it is unavailable, publishing stops; it never skips that check.
  2. Immutable once published. A version never changes. Rolling back deploys an older version as a new, higher generation.
  3. Announced, never pushed. When a device’s version, settings or access change, the server answers the agent’s open request with {"changed":true}. The answer is unsigned and carries nothing else: the agent checks in as usual, so a forged answer can cause at most an early check-in.
  4. Signed for one device. Each check-in returns a manifest signed with the server’s Ed25519 key. It names the device, echoes a fresh random value the agent sent, and expires after five minutes, so it can’t be replayed elsewhere or later.
  5. Never older. The agent remembers the highest generation it has accepted and refuses anything older, even from a restored server backup.
  6. Fetched by digest. The agent downloads the version by its SHA-256 and checks the bytes. The server only serves the version currently released to that device.
  7. Checked again on the host. The agent applies the device’s mode and allowances, then runs Vector’s own validation in the host environment.
  8. Applied safely. The agent records each step, starts Vector with the new configuration and watches it stay up. If it fails, the agent restores the last working configuration.
  9. Pinned Vector. The agent records the SHA-256 of the Vector binary it adopted and refuses to run a changed binary until someone on the host approves the new one.

Check on devices in the deploy review asks the devices you’re about to target to validate the version on their own hosts first. Each one downloads that candidate, runs Vector’s validation against its own local policy and secrets, and answers in a check-in. A device that keeps a request open for changes (see Turn off wake-ups) hears of the request within seconds, any other at its next check-in. A check never applies anything.

  • A check never activates the candidate. It never touches the managed file, the recovery journal, the last working configuration, a generation or the running Vector process. Vectory records only the answer. On a full-mode device, native providers and exec secret backends used during Vector validation may have their own host-side effects.
  • It’s advisory. Deploy never waits for a check. Passes here is the device’s own report that validation found no error, not evidence that the version is applied or healthy.
  • It uses the trust a deployment uses. The request is part of the manifest signed for that one device, and it expires after ten minutes. A device can download only its own candidate, over its own mutual-TLS connection. The server serves it to no other device, and not after the device answered or the check expired.
  • What Vectory keeps. The candidate, with that device’s variable values and secret references, is held only while the device hasn’t answered. The answer holds the diagnostics the agent redacted on the device, test results and the names of unbound device secrets, in fixed fields with fixed limits, and nothing else. Answers are kept for 24 hours.
  • Who can ask and read. Operators and administrators can ask. Only the person who asked, or an administrator, can read the answers. Each request is audited with counts and the pipeline version, never the configuration.

A device that is offline, or runs an agent that can’t be checked, is named and not waited for.

Agent updates replace the agent on many hosts from the dashboard. They add a second kind of trust to the one that governs pipelines: a key that decides which agent builds hosts install, as root. They’re off until an administrator turns them on.

  • A host opts in, locally. It fetches an agent build only if a command run on that host gave it a level, Automatic or Ask on the host, and a key to pin. The choice lives in a file only root can write. Nothing the server sends changes it, and a host with no choice, or with Off, never fetches a build.
  • A pinned key authorizes a build. The host pins a release key by the whole SHA-256 fingerprint the command carries, and installs only a build whose signature verifies under a key it pinned, with the key’s own bytes. The server signs the offer, which makes it fresh and addressed to one device, and that signature authorizes no code.
  • A build is checked before it runs. The agent verifies the signature before it downloads, and stages the file only when its size and SHA-256 match the signed ones. A small step run by root verifies everything again, from files it copied first, before it swaps, and runs the new build once to see that it reports the version and platform the release names. That run lasts at most ten seconds and reads a small answer, and what else bounds it depends on the system. On Linux the build runs as the agent’s account with no network and a read-only file system. On a Mac it runs as the agent’s account. On Windows it runs as the update step’s own account, SYSTEM under the service, with the network and the files open to it, and Windows ends it and everything it started when the time is up. A signed build that does harm in those ten seconds is one its key holder chose to sign, and that holder can already run code as root on the host.
  • Counters only go forward. Each release has a counter. The host keeps, in a root-owned file, the highest counter it tried for each key it pins, and refuses a release at or below it. A server can’t make a host try a release twice or take one at or below a counter it already tried, and a host never goes backward. A release it hasn’t tried yet stays valid until it expires (see below).
  • A trial, then a rollback. The new build runs for five minutes. If it doesn’t start, doesn’t check in or isn’t healthy, the host restores the previous build from a copy it kept and reports why. A release that was taken back is never tried again on that host.
  • Rollouts are gated. A canary goes first, batches follow, and a rollout stops when devices roll back, fail or stop delivering. Stop all updates cancels every rollout and refuses new ones.
  • On Windows, a few accounts are trusted as administrators. The host checks who owns the agent’s files and who can change them by their access lists. An account that holds the right to back up files, restore files or take ownership of files bypasses access lists, so no message names it. The Backup Operators group holds the first two (and Server Operators on a domain controller); it is empty on a new machine, and its members are near-administrators. A host that takes updates trusts these accounts as it trusts the Administrators. To see who they are, look at the members of those groups, run whoami /priv for an account’s rights, and open secpol.msc (Local Policies, User Rights Assignment) for who was given them.

Who can approve a build depends on who holds the release key:

You chose Who can sign a build that hosts install
This server signs Anyone who administers the server, or holds a backup of it. The key is sealed with a key in the same data volume, so a backup carries both.
A key kept offline Whoever holds the private key file. The server holds the public half only, and can offer a release you signed but never make one.

A host trusts a key until someone runs its Upgrade agent command with another one. Revoking a key stops this server from offering what it signed, but it doesn’t unpin the key on any host. If a key is stolen, follow If a key is stolen.

  • Device secrets. A reference such as vectory-secret:API_TOKEN is resolved by the agent from a private local file, in any credential field. Plain text in a credential field is refused at save and publish. The agent substitutes only at the credential fields of its own built-in table, never where the server asks, so a pipeline can’t move a secret into a URL, header or program. It reports bound names at check-in, never values or paths. The value is written only into the device’s managed configuration, which the agent keeps private. See Keep credentials on the device.
  • Native Vector secrets and environment variables (full mode only) are resolved by Vector on the host; their values are not sent as configuration. The agent may not know a value resolved by a native provider, so it cannot guarantee redaction if Vector writes that value into a report.
  • Event flow and reports. Vectory does not transport the event stream. Operational metrics come only from a Prometheus exporter in your own pipeline, are bounded in size, and never include event contents. The agent also sends bounded, redacted Vector warning and error summaries and validation diagnostics. Vector can echo event data in a log message; redaction removes known secrets and suspicious tokens but cannot guarantee removal of arbitrary event-derived text. Treat device diagnostics as sensitive. See Recent Vector errors.
  • The validator receives the pipeline you check, runs as its own user with no network route and no secrets, and returns only bounded results. It never runs your Lua, never sends the requests of an AWS instance metadata step, and never reads your enrichment files or the files a VRL program names: those are used only on a device.
  • Notification channels keep their webhook URLs, signing secrets, header values and SMTP passwords write-only: encrypted at rest, never returned by the API, never written to the audit log or server logs. The server sends notifications only to public addresses, unless an administrator allows private ones for a channel, and never to link-local or cloud metadata addresses. See Alerts and notifications.
  • Accounts are local. Passwords (12 to 256 bytes) are stored as Argon2 hashes. Two-factor secrets are encrypted at rest.
  • Sessions last 12 hours in an HttpOnly, SameSite=Strict, Secure cookie. Every change also needs a per-session CSRF token.
  • Sign-in attempts are rate-limited. Repeated failures for an account pause further attempts, and the error says when to try again. Authenticator codes have their own limit: five wrong codes end a sign-in, and ten attempts in five minutes pause the account’s second step, whichever addresses they come from. One address can’t use up the limits other people need, and an address that has signed in before keeps a reserved share during a flood.
  • Permissions are enforced by the server on every request. Hiding a button is only a convenience.
  • Browser protection: a strict Content Security Policy with no inline scripts, no framing, and no requests to other sites. The dashboard, fonts, API reference and this Help center are all served by your server.
  • Audit log: each change the server accepts records who made it, when and the result. You can export it as JSON Lines with a SHA-256 of the file.
  • Full mode trusts publishers with the host permissions of Vector.
  • The server is a high-value system. Whoever controls it can deploy any configuration each device’s local policy allows. Restrict access to it and to its backups.
  • A certificate authority isn’t an identity. A device must present a certificate the server issued and still has on record, so the device CA’s key alone can’t impersonate a device.
  • Backups restore old decisions. Restoring an old backup brings back old accounts, roles and device access. Follow Restore a backup before reconnecting anyone.
  • The project’s downloads aren’t signed yet. Agent downloads carry SHA-256 checksums. Check them against the values shown in Add device. A build you roll out with agent updates is signed with your own release key.
  • A signed release stays valid until it expires. A compromised server can offer a release you signed to any host that agreed to updates, within its 180 days, and can withhold one. It can’t offer a build you didn’t sign. Withdraw a release you no longer want offered, and keep the key’s holder small.
  • Expiry uses each host’s own clock. A host whose clock is far behind accepts a release that has expired.

The detailed threat model is in the source repository at docs/security/THREAT-MODEL.md. To report a vulnerability, follow the repository’s SECURITY.md.