Using WatchLog Cloud? How it keeps your data is in WatchLog Cloud below.
WatchLog's agents are read-only. They never run commands you didn't install, never write to your cluster or hosts, and send data out; nothing connects in.
Never collected, never sent: Secrets, ConfigMap data, environment variable values, command lines, request or response payloads, and TLS contents. There is no TLS inspection, ever.
This page summarises docs/security.md in the repository, which has every detail and the decision behind it. That document changes in the same pull request as any change to what the agent can access.
Kubernetes
Two agents with separate permissions:
- Cluster-agent (one Deployment) watches the Kubernetes API.
- Node agent (a DaemonSet) reads its own node. It never talks to the API server.
Cluster-agent permissions
| Can read (get, list, watch) | Why |
|---|---|
| nodes, namespaces, pods, persistentvolumeclaims | Inventory, node and pod views |
| deployments, replicasets, statefulsets, daemonsets, jobs, cronjobs, horizontalpodautoscalers | Workload views |
| events | Kubernetes events |
| services, endpointslices | Service map: which pods are behind a Service |
It can also create TokenReviews, to check that a node agent is who it says, and use a Lease in its own namespace for leader election.
While logs on demand is on (the default), it can also get pods/log: it reads a container's last lines through the API server only when someone asks for them, redacts them, and keeps nothing. logs.enabled: false removes that permission.
No access to Secrets, ConfigMaps, nodes/proxy, Ingresses or PersistentVolumes. Objects are trimmed before they're sent: no environment variables, commands, arguments, probe commands, termination messages or managedFields. Annotations are kept only from a short allow-list, such as the deployment revision.
Node agent
- Permissions:
nodes/statson its own node's kubelet (/stats/summary), nothing else. It doesn't use the container runtime socket ornodes/proxy. - Host access: read-only mounts of
/proc,/sysand/, for host, container and filesystem metrics. NohostPID, nohostNetwork, read-only root filesystem, seccompRuntimeDefault, no privilege escalation. - Capabilities: with network flows on (the default), the container runs as uid 0 with every capability dropped except
BPFandPERFMON. Linux only makes added capabilities effective for uid 0 in Kubernetes. WithoutDAC_OVERRIDE, root still can't write host files, and the mounts are read-only anyway. Withagent.networkFlows.enabled=falseit runs as uid 65532 with no capabilities. - Namespace: it needs the
privilegedPodSecurity level, only because of the read-only hostPath mounts.
Network flows (eBPF)
The kernel programs read:
- TCP connections: destination address and port, local port and state, state changes, retransmits and byte counts. Never the data itself. Counters are added up in the kernel per container, destination and port, and read every 15 seconds.
- DNS outcomes: the 12-byte header of DNS responses, for NXDOMAIN, SERVFAIL and timeouts per workload.
- HTTP requests and responses (plain HTTP/1.x only): the first 16 bytes of each message, enough to see
GET /orHTTP/1.1 503. The kernel keeps a count per method class and status code, and the response time; the bytes themselves never leave the kernel, so no path, header or body is read or sent. HTTPS is never decrypted and shows as connections only. Turn it off withagent.networkFlows.http: false. - DNS names of external services: for a successful DNS response, the agent reads the question and the A, AAAA and CNAME answers. That lets an external edge show
api.stripe.com:443instead of104.18.0.0/24:443. The names stay in agent memory (at most 10,000, for the record's TTL), are never written to disk, and are sent only as that edge's destination name.
Edges carry workload names, never pod IPs. An external destination is a DNS name or a /24 network. Egress watch keeps a record of those external destinations from these same counts, and reads nothing more.
Linux servers
Installed with the script or a package (see Linux servers), the agent is a
systemd unit running as the user watchlog, not root, with exactly five capabilities:
| Capability | Why |
|---|---|
CAP_BPF, CAP_PERFMON |
Its eBPF programs: network flows, HTTP and process exits |
CAP_SYS_PTRACE |
Other users' /proc/<pid>/exe: a process's executable and its releases |
CAP_DAC_READ_SEARCH |
Other users' open sockets (listening ports), pm2's files, and the journal for logs on demand |
CAP_SYS_RESOURCE |
eBPF maps on kernels before 5.11 (RLIMIT_MEMLOCK) |
The unit adds NoNewPrivileges, a read-only system (ProtectSystem=strict), private /tmp,
MemoryMax=256M and the address families it needs. It reads /proc (never a process's
environ), the cgroups, systemd's unit states over D-Bus, which any user may read, and pm2's
pid and log files in each account's home (only the home field of /etc/passwd).
Command lines, arguments, process ids and user names never leave the server; a process group
is sent as its derived name, redacted. The token is in /etc/watchlog/agent.env, mode 0640,
root and the watchlog group. The integrations collector runs with no capability.
The Docker socket is read only when watchlog is in the docker group, which the script
adds (it says so: that group can control Docker); --no-docker leaves it out. Podman has no
docker group: the script and the packages give its API socket to the group watchlog
through a systemd drop-in (/etc/systemd/system/podman.socket.d/watchlog.conf), say the same,
and remove it on uninstall; --no-docker (WATCHLOG_DOCKER=no for the packages) leaves it out.
With docker run
The docker run agent, and why each setting is there:
| Setting | Why |
|---|---|
--user 0:65532 --cap-drop ALL and five --cap-add |
BPF and PERFMON for eBPF, SYS_PTRACE, DAC_READ_SEARCH and SYS_RESOURCE as for the unit above. Every other capability is dropped; no --privileged. |
--security-opt no-new-privileges |
No privilege gain through setuid binaries. |
-v /var/run/docker.sock:...:ro |
Only /_ping, /version, container list, inspect and stats, /events, and a container's logs when someone asks (WATCHLOG_LOGS=false turns that off) are called. The client refuses anything else before sending. |
-v /proc, /sys, / read-only |
Host and container metrics, filesystem usage. |
--pid host --cgroupns host, the D-Bus socket read-only |
So the mounted /proc and cgroups describe the host, and systemd's units can be read, not only the agent's container. |
volume watchlog-agent-state |
Buffer while the server is unreachable. |
Docker's inspect response contains a container's environment variables. The agent never decodes, stores, logs or sends them, nor the command line.
Health-check commands and probe output can contain credentials. The agent redacts passwords, tokens, auth headers and keys before sending, folds output to one line of at most 512 bytes, and WATCHLOG_HEALTH_OUTPUT=false turns output off entirely.
Container logs on demand
The last lines of a container's log, when someone opens its Logs panel or asks through the API or MCP. See Container logs on demand.
- Redacted in the agent. Each line is redacted like health check output before it leaves your cluster or host, cut at 2 KB, with control characters removed.
- Never stored. Lines pass through the server to the reader and are gone: not in the database, the metrics store, the agent's buffer, request logs or the MCP call log.
- Who: every role by default; Owners and Admins can limit it to themselves or turn it off in Settings. Every read is audited (who, which container, how many lines), never the lines.
- Off for an installation:
logs.enabled: false(Helm) orWATCHLOG_LOGS=false(Docker). The agent then refuses every request.
Integrations collector (Applications)
Services you monitor on the Applications page (Redis, PostgreSQL, Nginx, RabbitMQ) are read by a separate collector, never by the node agent, which still reads no secrets.
Read-only by construction. It runs a fixed list of statements and commands for each kind of service, written in the code. Nothing the server sends is ever executed. The users WatchLog asks you to create get monitoring roles only, such as PostgreSQL's
pg_monitor, which reads statistics, never table data.Kubernetes: one Deployment per cluster, as uid 65532 with every capability dropped and a read-only root filesystem. It has no ClusterRole. It reads a Secret only if you name one, and only after you grant its ServiceAccount that one Secret. WatchLog shows the exact
kubectl create role … --resource-namecommand.Docker: one container on each host that runs a monitored service, started with:
Setting Why --network hostIt reaches each container at its address on the host's bridge networks, without joining them. --user 0:0 --cap-drop ALLIt reads root-owned 0600files under/etc/watchlog/secrets/when you keep a password there. Every capability is dropped; no--privileged.--read-only --tmpfs /var/lib/watchlog-integrationsNothing is written outside a small buffer in memory. --security-opt no-new-privilegesNo privilege gain through setuid binaries. It mounts no Docker socket and no host filesystem other than that secrets directory, read-only. The command WatchLog shows takes the token and the WatchLog address from the agent already running on that host (
docker inspect watchlog-agent), so it reports where the agent does; no token is shown on screen.Credentials: a password WatchLog generates or you type in is stored encrypted with AES-256-GCM under the same key as alert channel secrets, tied to that one service: copied to another, it can't be decrypted. The API never returns it; the generated password appears once, inside the command you run to create the user. Only the collector of that service's cluster receives it, over TLS, and keeps it in memory. Who set or changed a credential, and when, is recorded, never the value.
Or keep the password yourself: in a Kubernetes Secret, which the collector may read only after you run the two
kubectl create role/rolebindinglines WatchLog shows for that one Secret; or in a file under/etc/watchlog/secrets/on the Docker host. WatchLog then stores only the name.Least privilege, checked: the user WatchLog creates gets monitoring rights only (PostgreSQL's
pg_monitor; a Redis ACL of read-only commands). If you use an existing user that can do more, such as a superuser, the connect drawer says so.Push only: like the agents, the collector connects out to your WatchLog server. The server never connects into your cluster or hosts.
What is sent, and how
- Every 15 seconds over HTTPS: metrics (CPU, memory, disk, network; container and pod resource use; connection counts), heartbeats (agent version, mode, node name and whether eBPF runs, with the reason if not), and object summaries (names, states, restart and exit reasons).
- No IP addresses as labels, process names, file contents or payloads.
- Agent tokens:
wl_ct_plus 256 random bits. The server stores only a SHA-256 hash; you can rotate tokens and revoke them at once. - Network: agents connect out to your WatchLog server only.
The server
- Secrets at rest: alert channel secrets (Slack webhooks, Telegram tokens, webhook signing secrets), the email server password and service credentials are encrypted with AES-256-GCM under a key you keep. The API never returns them. You can rotate the key without downtime (see Configuration).
- Passwords: hashed with argon2id. Sessions use secure cookies behind HTTPS, with CSRF protection and rate-limited sign-in.
- Containers: all server containers run as non-root with every capability dropped.
- Images: the agent image is
FROM scratchwith one static binary. - Signing: release images and charts are signed with cosign (keyless). How to verify is in each release's notes.
Users and roles
- Three roles. Viewers see everything and change nothing: no settings, rules, integrations or silences; they can make personal read-only API tokens. Admins run the clusters: rules, channels, silences, services and their credentials, and they invite and manage Admins and Viewers. There is one Owner, who can also hand ownership to an Admin and delete clusters.
- Enforced by the server. Every route that changes something names the roles it allows, and a test fails if one doesn't. The dashboard shows locked controls to Viewers with the reason; the server refuses the same change.
- Invites and password resets are links. An invite works once, for 7 days; a password reset works once, for an hour. The server keeps only a SHA-256 hash of each token (and, while an invite is pending, an encrypted copy so it can be copied again). With email set up they are also sent by email; without it you share the link yourself.
- Resetting signs out everywhere. The old password keeps working until a new one is set; setting it ends every session of that account.
- Removing a user signs them out and revokes their API tokens at once. What they set up stays.
- Locked out? The Owner can print a reset link inside the backend container with
watchlog admin reset-password(see Configuration). Anyone who can run a command there already controls the install. - Audit: invites, role changes, reset links (including from the command line), removals and the ownership handover are logged with who, when and from which address, shown to Owners and Admins. Never a token or a password. Log reads are recorded too, without the lines.
API tokens and MCP
- Personal API tokens (Settings → API tokens) are
wl_pat_plus 256 random bits. The server keeps only a SHA-256 hash. The value is shown once, when you create the token. - Read only: a token reads only the documented REST API routes and the MCP server, and only what its user can see. It can't change anything: no setting, rule, channel or cluster.
- Container logs: a token reads them with its user's role, if the Container logs setting allows that role. They are redacted in the agent and never stored.
- Never returned to a token: Secrets, environment values, payloads, alert channel targets, email and Telegram settings, other tokens, and the error text of a failed alert delivery, which can name your mail server or part of a webhook address.
- Expiry and revocation: tokens expire after 30 days, 90 days or a year, or never if you choose. You get an email 7 days before. Revoking stops a token at the next request.
- Each token's history: when it was created, its first use, use from a new address, and its expiry or revocation.
- MCP call log: each tool call's tool, a short argument summary, status, time and answer size, never the answer itself. Kept 30 days.
- Limits: 300 requests and 60 tool calls a minute per token.
- Prompt injection: names and messages from your cluster reach an AI assistant only as data, in their own fields, cleaned and cut to a fixed length. Since every tool only reads, an injected instruction can't make WatchLog do anything. See Ask your cluster.
- Turning MCP off: set
mcp.enabled: false(Helm) orWATCHLOG_MCP_ENABLED=false(Compose).
WatchLog Cloud
WatchLog Cloud runs the same code as the self-hosted edition, with the measures below on top. They describe what is built today.
Isolation between organizations. Every row of data belongs to one organization, and PostgreSQL enforces it with Row-Level Security, under a database role that can't bypass it; the organization is set on each connection a request uses. Every query, API call, MCP tool and live stream also checks the organization. A test suite calls every API route, MCP tool, curated query and stream as one organization with another's ids, and checks that nothing is shown or changed; it runs in CI on every change, and a failure blocks a release.
Accounts. Passwords are hashed with argon2id and checked against known breaches without being sent anywhere (only the first 5 characters of their SHA-1 hash leave). Two-factor sign-in with an authenticator app (TOTP) and 10 recovery codes is optional for everyone, and required for the Owners of an organization that pays for Pro. Sessions are listed in Settings › Security, where you can end them. Sign-up, password reset and new verification links are behind Cloudflare Turnstile, and sign-ins and sign-ups are rate-limited.
Staff access. WatchLog staff never sign in as you. To help with a problem, a staff member opens a support session with a reason: read-only (enforced by the request, the role and the database), at most an hour, announced to your Owners by email and listed in Settings › Security with the pages it opened. API tokens show when staff viewed them.
Encryption. HTTPS everywhere, with HSTS. Channel secrets and two-factor secrets are encrypted at rest with AES-256-GCM; cluster tokens (wl_ct_…), API tokens and recovery codes are stored only as hashes. Backups are encrypted (AES-256, with an HMAC to detect tampering) on the server before they go off-site; the keys stay on the server.
The dashboard. A strict Content-Security-Policy: no inline scripts and no third-party scripts, except Cloudflare Turnstile on the pages that need it; it can't be framed. No analytics or advertising scripts.
Outbound requests. Slack and webhook channels may only post to public addresses: internal, private and cloud metadata addresses are refused when you save the channel and again when a message is sent, and redirects are never followed.
Payments. Once billing starts, cards are entered on Stripe's own pages and never reach WatchLog's servers.
Your data, your call. An Owner can export the organization's configuration and metrics, and delete it with 7 days to undo, in Settings › Data.
What we don't claim. WatchLog Cloud is in beta: there is no SLA, and we don't hold certifications such as SOC 2 or ISO 27001. The service's state is at status.watchlog.io. Who processes data for Cloud is on the subprocessors page, and how in the data processing agreement.
Reporting a vulnerability
Please report privately. See SECURITY.md.