Security policy
Vulnerability reporting, supported versions, trust baseline, threat controls, and release verification for edgeweir and edgeweir-node.
简体中文:SECURITY.md
Scope
| Subject | Location |
|---|---|
| Console source | marvinli001/edgeweir |
| Node source | marvinli001/edgeweir-node |
| Console image | ghcr.io/marvinli001/edgeweir |
| Node release artifacts | edgeweir-node Releases |
Reporting a vulnerability
Do not report security vulnerabilities through public issues, discussions, or pull requests.
| Channel | Address |
|---|---|
| GitHub private security advisory (console) | https://github.com/marvinli001/edgeweir/security/advisories/new |
| GitHub private security advisory (node) | https://github.com/marvinli001/edgeweir-node/security/advisories/new |
Report contents:
| Item | Contents |
|---|---|
| Component and version | Affected component; image version, release version, or commit hash |
| Reproduction | Steps to reproduce or proof-of-concept code |
| Impact | What an attacker can achieve and the preconditions |
| Disclosure state | Whether the issue is public or known to be exploited |
Handling:
- Receipt of the report is acknowledged within 3 working days.
- After assessment, the reporter receives a preliminary conclusion and a fix plan, with progress updates during handling.
- The coordinated disclosure window is 90 days from the day the report is received. A security advisory is published after the fix; the reporter is credited in it with their consent.
- When a fix cannot ship within 90 days, an extension is agreed with the reporter; when the vulnerability is exploited in the wild, mitigations may be disclosed earlier.
Supported versions
| Component | Supported | Not supported |
|---|---|---|
| Console | The dated tag (<YYYYMMDD>-<commit>) of the current stable channel; the image of the newest master commit (latest) | Earlier dated tags |
| edgeweir-node | The latest 1.x release; the latest master | Earlier 1.x patch releases, 0.x releases |
Security fixes land on master only and are not backported; there are no maintenance branches. A console fix ships with the next dated tag, which then moves stable; a node fix ships with the next patch release. A stable console supports every edgeweir-node 1.x minor version; 0.x nodes keep working with the capabilities they report, and the console asks for an upgrade.
Trust baseline
These rules are hard constraints on all code in edgeweir and edgeweir-node.
| Rule | Contents |
|---|---|
| No phone-home | The console and the nodes never connect on their own to any server of the Edgeweir project (edgeweir.com, edgeweir.dev, and so on), version checks included |
| No license checks | The code has no license keys, online activation, or feature locks |
| Telemetry off by default | No telemetry is sent and there is no telemetry switch; telemetry may only be enabled explicitly by the operator, with the fields and destination listed before enabling; better-auth's own telemetry is hard-disabled |
| Envelope encryption of secrets | Private keys and third-party credentials are envelope-encrypted with the master key EDGEWEIR_MASTER_KEY before they reach the database; secrets that only need comparison are stored as hashes (see Sensitive data) |
| SSH credentials are never stored | The console has no option to store SSH credentials; nodes join only through the one-time install command generated by the console and enroll themselves |
| Management actions are audited | See Audit log |
| Verifiable releases | cosign keyless signatures, SBOMs, SLSA provenance (see Verifying releases) |
Separate commercial products (see LICENSING.en.md) may use licensing and cloud services under explicit terms after an administrator enables them, but must not add commercial feature locks to the open core and must not interrupt existing CDN traffic because an official license expired or a licensing service failed.
Sensitive data
Envelope encryption
| Item | Value |
|---|---|
| Master key | EDGEWEIR_MASTER_KEY: base64 of at least 32 random bytes (openssl rand -base64 32); never stored in the database |
| Master key format | Canonical base64 (standard or URL-safe alphabet); a space, a quote, or any other extra character stops the console instead of decoding to another key |
| Master key id | Envelopes record the key id kid (the first 16 hex characters of the SHA-256 of the raw master key), which picks the master key that decrypts them; at startup the kid of the internal CA key's envelope must be the current master key's or that of EDGEWEIR_MASTER_KEY_PREVIOUS, otherwise the console refuses to start with "master key does not match this database", before checking the session secret |
| Master key rotation | EDGEWEIR_MASTER_KEY_PREVIOUS (the key before the rotation) only decrypts. At startup, under an advisory lock, every stored envelope it sealed is opened and encrypted again with the current master key and a new data key, bound to the same row, and the log reports how many still use it; revision receipts held by nodes keep verifying while it is set. Steps: Rotating the master key |
| Key-encryption key | HKDF-SHA256, salt edgeweir/kek/v1, info envelope, 32 bytes |
| Data key | Random per record; data and data key both encrypted with AES-256-GCM |
| Additional authenticated data | edgeweir/envelope/v2, <table>.<column>, <record id>; a ciphertext moved to another row or column fails to decrypt |
| Format version | v2; v1 envelopes written by older versions (bound to the purpose only) are re-encrypted at console startup, and the read path rejects v1 |
| Copying settings and cloning | The password hashes and signing keys of access authentication, PURGE keys and S3 origin keys are decrypted in the console's memory only and encrypted again for the target site's new records (bound to the new record ids); previews, results and audit entries never contain them |
Storage
| Data | Storage | Location |
|---|---|---|
| Internal CA private key | Envelope-encrypted | pki_authority.private_key_envelope |
| Certificate private keys | Envelope-encrypted | certificate.private_key_envelope |
| ACME accounts | Envelope-encrypted | acme_account.account_envelope; the EAB key of a request in certificate.account_envelope |
| ACME DNS-01 credentials | Envelope-encrypted | dns_credential.credential_envelope |
| DNS steering provider credentials | Envelope-encrypted | platform_dns_provider.credential_envelope |
| S3 origin keys | Envelope-encrypted | origin_credential.secret_envelope |
| Site PURGE keys | Envelope-encrypted | site_secret.secret_envelope |
| Access authentication: Basic passwords and signed URL keys | Basic passwords only as salted PBKDF2-HMAC-SHA256 hashes (10000 iterations); hashes and signing keys envelope-encrypted together | site_auth_rule.secret_envelope |
| Alert channel configuration (webhook URL and bearer token, email recipients) | Envelope-encrypted | alert_channel.config_envelope |
| SMTP settings (including the password) | Envelope-encrypted | notification_smtp in system_setting |
| Setup token | Envelope-encrypted; SHA-256 kept for comparison | setup_token in system_setting |
| Challenge page signing keys | Envelope-encrypted | challenge_key.secret |
| TLS session ticket keys | Envelope-encrypted | session_ticket_key.secret |
Node extension secrets (secret: true, current and previous) | Envelope-encrypted; delivered only over the mTLS node channel | extension.secret_envelope |
| EAB HMAC key of the custom ACME directory | Envelope-encrypted | acme_directory in system_setting |
| Node enrollment tokens | SHA-256 | enrollment_token |
| Probe enrollment tokens | SHA-256 | probe_token |
| AccessKeys | Hash (better-auth) | apikey |
| User passwords | scrypt hash (better-auth) | account |
| TOTP secrets and backup codes | Encrypted with the session secret (better-auth) | two_factor |
| Session secret | Not stored, only an HMAC-SHA256 check value; after a master key rotation, the value derived from the old key is stored envelope-encrypted | auth_secret_check and auth_secret in system_setting |
| Master key | Not stored | Environment variable EDGEWEIR_MASTER_KEY, or the file named by EDGEWEIR_MASTER_KEY_FILE; during a rotation also EDGEWEIR_MASTER_KEY_PREVIOUS |
Session secret
better-auth's session secret signs session cookies and encrypts TOTP secrets and backup codes.
| Case | Behavior |
|---|---|
BETTER_AUTH_SECRET set (at least 32 characters) | That value is used |
BETTER_AUTH_SECRET unset | Derived from the master key with HKDF-SHA256: salt edgeweir/auth-secret/v1, info better-auth.secret, 32 bytes, base64url; independent of the envelope key-encryption key (salt edgeweir/kek/v1, info envelope) |
| Master key rotated, and the database ran with the secret derived from the old key | That secret stays: on the first start with EDGEWEIR_MASTER_KEY_PREVIOUS it is sealed with the current master key into auth_secret in system_setting and read from there from then on, also after EDGEWEIR_MASTER_KEY_PREVIOUS is removed; sessions and two-factor secrets are not affected |
The derived secret differs from the one the database was used with (for example BETTER_AUTH_SECRET removed from an existing deployment) | The console refuses to start |
| The explicit value changes | The console starts and logs a warning; existing sessions end and enrolled two-factor secrets can no longer be read |
Audit log
| Item | Behavior |
|---|---|
| Coverage | Writes through /rpc and /api/v1; setup; install command generation; node enrollment, certificate rotation, and deletion; probe token generation, enrollment, certificate renewal, and deletion; scheduling actions taking effect and recovering (system identity); successful and failed sign-ins, password changes, two-factor on and off, passkey add and delete, API key create and delete; account recovery on the server |
| Transactions | Edgeweir's own writes commit their audit entry in the same transaction; sign-ins and account changes completed by better-auth are committed by better-auth first and audited right after |
| Contents | No plain-text passwords, tokens, or keys |
| Source IP | The TCP peer; X-Forwarded-For and X-Real-IP are used only when the peer is in EDGEWEIR_TRUSTED_PROXIES |
| Changes | The application offers only queries; there is no interface to modify or delete audit entries |
Threats and controls
| Control | Threat |
|---|---|
| The console never stores SSH credentials; nodes join only through the one-time install command and enroll themselves | A compromised console uses SSH credentials to take over every node |
| Node private keys are generated on the node and never leave it; the console only issues certificates | A leaked console database is used to impersonate nodes |
| The install command pins the CA fingerprint, and the node checks it before sending the token; tokens are single-use, expire, and are stored as SHA-256 only | Man-in-the-middle on first contact; leaked or replayed tokens |
Node channel URLs only reach nodes over the authenticated mTLS channel; before switching, a node checks the new URL with the CA pinned at enrollment and its own certificate and checks the node ID the console recognized; the URL only decides which host the node connects to and which name it verifies, never which CA it trusts; nodes refuse URLs with credentials, a path, a query, or a scheme other than https, wss and ws | A forged or altered URL sending nodes to a third party, or out of the pinned CA's verification |
mTLS on every RPC except Enroll, with the client certificate serial equal to the stored current value (after a renewal also the replaced one, until the node first uses the new one); 30-day certificates with automatic rotation; disabling or deleting a node takes effect at once (a disabled node may only renew its certificate), and deletion revokes both serials | A retired node keeps pulling configuration |
Regional probe certificates come from the same internal CA (O=Edgeweir Probe) and the node channel tells them apart by organization: probe certificates can only call ProbeService, node certificates cannot enroll or renew probes, and only enabled nodes that also probe can report results; probe tokens are single-use, expire, and are stored as SHA-256 only; a disabled probe may only renew its certificate, and deleting a probe revokes it | Leaked probe credentials are used to impersonate a node and pull configuration and keys |
| Probe results are accepted only for the prober's current targets (node, address, port) and within valid ranges; an address counts as unreachable only by a strict majority of all probers; removals by scheduling rules stay under the mass removal protection | One faulty or compromised probe takes nodes out of DNS |
The node channel checks the client certificate before it reads a request body: without one only Enroll and EnrollProbe are served, up to 64 KiB; other requests are limited to 16 MiB after decompression; connections without traffic for 2 minutes are closed | Unauthenticated clients exhaust console memory with compressed requests or idle connections |
| Certificate private keys, S3 origin keys, and PURGE keys travel only over the mTLS channel to nodes of the cluster serving the referencing site, never inside NodeConfig | Nodes of other clusters or configuration snapshots leak keys |
PURGE keys stay inside the node agent: the data plane hands the URL and X-Purge-Key of a PURGE request to the agent over a local unix socket (0600), and the agent compares them in constant time; on each node 20 per second per site and client network (an IPv6 /64; counted in a shared dict of their own) and 20 accepted requests (right key) per second per site, so clients without the key only use up their own budget, and the console counts at most 120 tasks per site and minute under a per-site lock in the transaction that inserts the task; the console creates tasks only for URLs of a site that the node's cluster serves, that has PURGE on, and whose host belongs to it | The key enters nginx shared memory or logs; PURGE used to guess the key or flood purges; a node purging for other clusters or sites |
When Set-Cookie responses are cached, the origin layer moves the cookies into an internal header, the edge layer statically hides that header in every caching location, and only a request that actually went to the origin (MISS, EXPIRED, BYPASS) gets them back; hits, stale copies and background updates never carry cookies | The cache sends one visitor's session cookie to others |
| Revision receipts are sealed with the master key and bound to the node; a node reporting a revision above the console's latest must present a valid receipt, and only verified revisions count toward revision numbering | Unauthenticated reports manipulate revision numbering after a database restore |
| Envelope encryption of secrets with the master key kept out of the database; additional authenticated data binds table, column, and record id | Database backups or read-only SQL injection leak private keys and credentials; someone with database write access swaps ciphertexts between rows |
| Management actions are audited in the same transaction as the change | Abuse or mistakes cannot be traced |
/api/auth/* serves only the better-auth endpoints the console UI uses (no sign-up, admin, or api-key endpoints), everything else returns 404; AccessKeys are created and revoked only by a signed-in session through accessKeys.*; x-api-key is dropped on /api/auth/* and /rpc and works on /api/v1 only | better-auth plugin endpoints bypass audit and revisions (creating accounts, impersonating users, changing passwords); an API key turned into a session or issuing new keys |
/rpc requires the x-csrf-token header; responses carry the CSP default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; connect-src 'self'; frame-ancestors 'none' | Cross-site request forgery; the console embedded in a third-party page |
The client IP is the TCP peer, and forwarding headers are trusted only from EDGEWEIR_TRUSTED_PROXIES; sign-in and two-factor rate-limit counters live in PostgreSQL, shared by all instances and kept across restarts | Spoofed IPs bypass sign-in and two-factor rate limits; wrong IPs in the audit log |
install.sh and agent self-upgrades verify the cosign signature (certificate identity exactly the release workflow of the version being installed) and the SHA-256 before running anything; the console's /downloads mirror (EDGEWEIR_DOWNLOADS_DIR) is only a transport and returns 404 for files it does not hold | Tampered downloads or mirror |
Origins may not be special-purpose addresses (loopback, link-local, private, CGNAT, multicast, and so on) or localhost: the console refuses such IP literals, and nodes apply the same list to configured literals and to every DNS answer (packages/contract/src/addresses.ts); only the audited origin allow list can allow ranges; nodes send CDN-Loop (RFC 8586) upstream and answer 508 to requests that already carry their own ID | Origin fetches reach cloud metadata (169.254.169.254) or scan internal networks, or create loops |
Requests from the console to targets saved in the web UI (alert webhooks, SMTP servers, node release source, the connection check of the node channel URL) resolve the name once, reject special-purpose addresses, and connect to that address; EDGEWEIR_OUTBOUND_ALLOW_CIDRS allows specific ranges | The console's outbound requests are used to reach internal networks |
DNS providers with an entered address (PowerDNS, RFC 2136, Custom HTTP) are checked by the certificate helper on the address actually connected to; special-purpose addresses pass only inside EDGEWEIR_OUTBOUND_ALLOW_CIDRS; public addresses require HTTPS; redirects are not followed. Custom HTTP requests carry a timestamp and an HMAC-SHA256 signature; DNS provider failures come back as classified codes, never the provider's text | DNS provider settings are used to reach internal networks (including DNS rebinding), or credentials leak in cleartext or in error messages |
Pattern domains use the rule engine's regular expression subset only (no backreferences or lookaround), at most 256 characters and 10 per site, in a bounded shape: at most two repeating quantifiers (a fixed {n} does not count), alternatives and optional parts multiplying to at most 16, no comma outside {n,m}. The console (finding sites by Host for purges and prefetches) turns on V8's --enable-experimental-regexp-engine-on-excessive-backtracks (apps/console/src/server/lib/regexp-engine.ts), so V8's linear engine finishes a match that backtracks too much; on nodes the Go matcher (RE2) is linear, nginx's server_name sets no PCRE limit of its own and relies on the shape limits, and never matches a Host longer than 253 characters (each pattern name starts with (?!.{254})), and Lua matches with the PCRE limit LIMIT_MATCH=1000000; all of them match case-sensitively, and nodes refuse quotes, escaped backslashes and whitespace before rendering patterns into server_name | A pattern an operator wrote slows every request or the console, or injects nginx configuration |
| Internationalized domain names are converted by UTS #46 (with bidi and joiner checks) before they are stored; the console shows a label in Unicode only when it is in one script (or Latin with Han, kana, Bopomofo or Hangul), labels mixing scripts or holding invisible characters stay in Punycode, with the Punycode on hover | Look-alike (homograph) domains are mistaken for others (a look-alike label written entirely in another script is still shown in Unicode, see known limitations) |
| Each site has its own TLS session context, so sessions resume on the site that created them only; ticket keys are per cluster, rotate every 12 hours, and reach the cluster's nodes over the mTLS channel only, never in NodeConfig; TLS 1.3 early data is never accepted | A session of one site resumed on another (skipping the latter's client certificate requirement); replayed 0-RTT data; nodes of another cluster opening tickets |
| Basic password hashes and signed URL keys of access authentication travel only over the mTLS channel to nodes of the cluster serving the site, never in revisions, snapshots, audit entries or API answers (the UI writes them only); Basic compares the derived key in constant time, computes a hash for unknown users too and allows at most 10 failed verifications per site and client network in 10 seconds; signatures are computed with both keys and compared in constant time; authentication runs before the cache lookup, so cache hits are checked too; plain HTTP requests are redirected by the site's Force HTTPS before any credential is asked for | Passwords or keys leaking through the configuration, audit entries or logs; guessing credentials from whether a user exists or how long a comparison takes; online brute force of Basic passwords; reading cached content without authentication; credentials sent unencrypted |
Forward authentication subrequests go through the origin layer under the origin address policy and TLS verification, with only the forwarded request headers and the node's X-Original-*, X-Real-IP and X-Forwarded-For; copied response headers the answer lacks are removed from the request to the origin | Probing private networks through the authentication URL; the visitor's other headers reaching the service; visitors sending X-Auth-User themselves to pose as an authenticated user |
A site requiring client certificates refuses requests without a verified certificate before the site's logic, plain HTTP included (redirected when Redirect HTTP to HTTPS is on); visitors' own X-Client-Verify and X-Client-Cert-* request headers are removed on every site, so the values origins see only come from the node | Bypassing mutual TLS; forged client certificate details fooling origins that trust these headers |
| Only requests handed to the default site skip "the SNI must equal the Host"; the default site must be an enabled site of the cluster | A handshake with an unknown SNI is used to reach another site |
Access logs record no query strings, request headers, cookies or bodies by default, and Referers lose their query string and fragment; query strings, chosen request headers (never Authorization, Cookie, Proxy-Authorization) and the peer address are recorded only while the site turns them on, and the console stops keeping them once off; retention can be as short as 1 day; edgeweir-node accesslog collects only while someone views, reads only through the control socket, never enters the upload queue, and nodes write no local log files | Access logs leaking tokens, credentials or excess personal data; a live view that keeps collecting requests when nobody watches |
| A node collapses a site's purge markers into one site-level marker beyond its cap | Many purge tasks fill a node's purge store and degrade other sites on the node |
Image conversion runs in child processes of the agent: pure Go encoders (WebAssembly transpiled to Go) and the standard library's decoders, where an out-of-bounds access is a panic rather than memory corruption; a child has GOMAXPROCS=1, RLIMIT_DATA (its estimate plus 256 MiB beyond the data it already has), no file writes, at most 16 descriptors, no capabilities and no environment, is killed at the timeout and dies with the agent; concurrent conversions and the sum of their estimated memory are bounded, larger images keep their original; only nginx's user can connect to image.sock, which passes requests only to the origin layers the agent renders | Origin images visitors can influence take over a node through a decoder bug; large or many images exhaust a node's CPU and memory |
| The agent runs typed operations only and has no interface for arbitrary commands; the only code the console can bring to a node is a node extension signed with a publisher key the operator trusts (next row) | A compromised console runs arbitrary code on nodes |
Node extensions run only from packages signed (Ed25519 JWS) with a publisher key the operator added (none by default; adding and removing keys is audited); the console and the node each check the signature, digest, size, publisher and manifest before anything is stored or unpacked, archives may hold no links, native code or bytecode and are bounded in size and entries, and nodes fetch packages by digest over mTLS only; edgeweir-node run --extension-keys FILE makes a node accept only the keys in its local file, --no-extensions turns the mechanism off on that node, and the console's kill switch stops all extensions at once; every hook call runs under pcall with a time budget, repeated faults trip the extension per worker, failures fail open unless the operator chose closed; nothing is downloaded from or reported to the publisher | Tampered, unsigned or downgraded packages running on nodes; a console without key pinning pushing code to nodes; a faulty extension taking down every request |
Sidecars (extension version 1.1) run only from signed packages with the capability sidecar, as a user of their own (systemd DynamicUser or --sidecar-user), never as the agent's or nginx's user, with NoNewPrivileges, no capabilities, a read-only system, a seccomp denylist and cgroup limits on memory, tasks and CPU; they cannot read the node's state directory or connect to its control sockets, and reach site origins only through a socket nginx serves for sites that turn the extension on; nodes without that isolation refuse to start them (--sidecar-mode off refuses them always). Node listeners open only on ports the operator set, with a node-enforced address allow list. Extension secrets travel only over the node channel; per-site data items are fetched by digest over mTLS and readable only by the sidecar user and nginx | A sidecar escaping into the agent, nginx or node keys; a listener open to the internet; secrets in configuration revisions |
| Keyless-signed releases, SBOMs, SLSA provenance | Released programs differ from the source, or are poisoned |
Known limitations
| Limitation | Impact and handling |
|---|---|
install.sh is served by the console | Trust in the console (the operator's own server) is a precondition; for stronger assurance, download and review the script first, or compare it with the same version on GitHub |
| Compromised console | An attacker can push malicious configuration (for example, point sites to a malicious origin) but cannot make nodes run unsigned programs or obtain node private keys. With node extensions it can trust a key of its own and push signed Lua that runs in the nginx workers: start nodes with --extension-keys (only locally listed keys) or --no-extensions where that matters |
| Trusted extension code | An extension runs inside the nginx worker with the worker's privileges, in the request path of every site that turns it on: it can read and change those sites' requests and responses (cookies and credentials included), reach what the worker can reach (shared memory, sockets, files the worker may read, the network with http_client), and slow down or break requests. Its restricted environment is hygiene, not a sandbox. Trust a publisher key only if you would run that publisher's code on your edge, turn extensions on only for the sites that need them, and review the capabilities the console shows before installing |
| Sidecars | A sidecar runs the publisher's native code and, for function runtimes, code the site's managers upload; its sandbox protects the node, not the sites that turn it on: it sees their requests, can call any network address it may reach, and its isolation from other sites' functions is the runtime's own. Kernel vulnerabilities are outside what seccomp and a separate user stop. Trust a publisher with a sidecar as you would a native daemon on the node, and keep --sidecar-mode off on nodes that must not run native extension code |
| Forward authentication | With cached answers, answers are keyed by the forwarded request headers only, not by path or visitor address; with "allow when the service fails" requests pass without authentication while the service fails. Do not cache when the service decides by path or address, and do not allow on failure for protected content |
| Basic authentication | Credentials travel with every request and are safe over HTTPS only: turn on the site's Force HTTPS; visitors behind one address share the verification limit (10 in 10 seconds, 100 per /24 or /48), and sites and nodes have per-second verification budgets |
| The node channel's WebSocket entry | Upgrades are not authenticated (the TLS and mTLS inside the WebSocket are): at most 1024 connections at once, 64 per client address (an IPv6 /64) when EDGEWEIR_TRUSTED_PROXIES is set; connections that present no valid node certificate within 30 seconds are closed (without one they can only enroll), and connections idle for two minutes are closed; without trusted proxies every client behind a platform proxy shares one address, so there is no per-address limit and a steady stream of new unauthenticated connections can still fill the entry |
| Normalized path and the origin's path | Access authentication, access control, maintenance and the cache key decide on nginx's normalized path while the origin receives the raw path the visitor sent; a raw path that is ambiguous (an encoded /, \, ., % or ;, i.e. %2F, %5C, %2E, %25, %3B, a %u escape, a \, a ;, a #, a . or .. segment, or a leading //) is inside all of these scopes, no exemption applies to it and it is not cached; no exemption applies either to a raw path with // inside (the node merges slashes, the origin may keep the empty segment). A trailing . or space in a segment (which Windows / IIS drop, so /admin./x reaches /admin/x) is not ambiguous: with an IIS origin, refuse such paths with a site rule. The rule field http.request.uri.path is the normalized path as well: a rule that blocks a path should also check the raw http.request.uri, or the origin should refuse such paths |
| Hotlink protection and user agents | They rely on the Referer, Origin and User-Agent visitors send, which non-browser clients can forge; they stop embedding by other sites and common crawlers, not access: protect content with access authentication |
| Geo access | Accuracy depends on the node's GeoIP database; proxies, VPNs and outdated data mislead it, and requests in scope get 503 while the GeoIP service is unavailable |
| CORS | With credentials allowed, any allowed origin (subdomains *.a.com covers included) can read responses with the visitor's cookies: list fully trusted origins only. CORS only binds browsers; it does not stop direct requests |
| Site allow lists | Addresses on them skip the site's bans, block lists, geo, hotlink protection, user agents and challenges; editing a list changes every site that chose it |
| Rules reading request bodies | Only requests whose Content-Length is at most the site's rules body limit (1 MiB at most) are read; chunked requests, HTTP/2 and HTTP/3 requests without Content-Length and larger ones count as truncated and are not read, and rules see empty values. When blocking on body fields, also check http.request.body.truncated, or an attacker moves the payload into such a request. Form, multipart and JSON parsing may differ from the origin's framework (a repeated JSON key keeps its last value, multipart parsing stops at the first malformed part): body checks do not replace the origin's own validation |
| Bans by rules | The ban action and a rate limit's ban write automatic bans (source rule); too broad a condition bans legitimate visitors. Prefixes and durations are bounded and bans can be lifted from the ban list |
| Verified search engine crawlers | Nodes verify the visitor address by reverse and forward DNS through the node's resolver; a hijacked or untrusted resolver can let a fake crawler through. Verified crawlers skip Under Attack and CC challenges; challenge rules, bans and other checks still apply |
| CRS by path | Exclusions and overrides match the client's normalized path; an excluded rule does not run at all on that path, so keep the scope narrow (exact paths, excluded targets) |
| Credentials on the node | The node keeps its private key, the S3 origin and PURGE keys and the Basic password hashes and signing keys of access authentication (credentials.json), and site certificate private keys (certificates.json) in plain text with mode 0600 in its state directory (default /var/lib/edgeweir-node, mode 0700), so it keeps serving after a restart while the console is unreachable; root on the node can read them |
| TLS session ticket keys | The node keeps its cluster's ticket keys in plain text with mode 0600 in its state directory (session-ticket-keys.json and the key files nginx reads); root on the node can open sessions resumed with tickets while a key is in use (about 36 hours at most). Rotated-out keys are deleted from the node |
| Client certificates | Nodes do not check client certificates for revocation (CRL, OCSP): a revoked client certificate passes until it expires; replace the site's CA certificates to revoke at once. Client certificates cannot be combined with HTTP/3 |
| Custom ACME directory | The ACME directory an operator saves in system settings is not bounded by EDGEWEIR_OUTBOUND_ALLOW_CIDRS (private CAs usually live in private networks): the console reads it when saving (10 seconds, at most 1 MiB, no redirects) and the certificate helper connects to it when issuing. Only an operator who can change system settings can set it |
| Master key and database leaked together | Envelope encryption no longer protects the data; without BETTER_AUTH_SECRET, the leaked master key also allows forging sessions. Read it from a secret file with EDGEWEIR_MASTER_KEY_FILE (Master key file) or inject it through the orchestrator's secret mechanism, and keep it apart from database backups. After a leak, rotate the master key: rotation keeps the session secret, so a deployment without BETTER_AUTH_SECRET also sets a new one (every session ends, two-factor authentication must be enrolled again); when the database leaked too, replace the credentials stored in it |
| Setup token in the log | First-run setup needs the one-time setup token the console writes to its log at startup; anyone who can read the console log can complete setup. Restrict log access at the same level as the master key |
| Account recovery on the server | Anyone who can run commands in the console container (and so could read DATABASE_URL and change the database directly) can reset the account's password and turn two-factor authentication off with recover.js; a recovery signs out every session and is written to the audit log (account.recover), and neither the web UI nor HTTP offers recovery (Command line). Restrict server access at the same level as the master key |
| Credentials on a probe | A probe keeps its private key in plain text with mode 0600 in its state directory (default /var/lib/edgeweir-probe, mode 0700); root on the probe host can report results as that probe until it is deleted in the console |
| Health endpoint | Nodes answer GET /.edgeweir/health for any Host on every edge listener, and HTTPS handshakes with SNI health.edgeweir.invalid or without SNI get the node's self-signed certificate, so scanners can recognize Edgeweir nodes; probes do not verify that certificate, so a man in the middle on a probe's path can fake reachability, which affects scheduling but reaches no secret |
Node channel :8443 | Expose directly or pass through at layer 4 only; a reverse proxy that terminates TLS breaks mTLS (Ports, reverse proxy, and trusted proxies) |
| The node channel's WebSocket entry | /node-channel on the web port connects WebSockets to the node channel, and the handshake itself is not authenticated; the node channel's TLS runs inside the WebSocket with the same CA pinning, token, and mTLS checks as on :8443, and proxies in front of it only forward TLS records. Closed by default; it opens with EDGEWEIR_NODE_API_WEBSOCKET=true or once a wss:// or ws:// node channel URL was used (closable in system settings once no node or probe uses it), and is then reachable from the internet like :8443; browser requests with an Origin header are refused (The node channel's WebSocket entry) |
| Caching responses with Set-Cookie | With Cache responses with Set-Cookie on in a cache rule, the cached object on the node's disk keeps the fetched Set-Cookie lines (restored only for that one request); whoever reads the node's disk can read those cookies. Turn it on only for content whose body does not depend on the visitor (Set-Cookie) |
| Layer-4 forwarding | L4 app traffic does not pass the HTTP layer: WAF, rules, challenges, CC mitigation, site bans, and the global Block and Allow lists do not apply; only the app's own IP lists, the per-node connection limits, and kernel bans (kernel-ban-v1) do. Ports come only from the cluster's port pools (1024–65535), so nodes need no extra privileges. With Accept PROXY protocol on, the client address comes from the header: open that port to the load balancer only, or any client can claim another address and pass the allow lists (Layer-4 forwarding) |
| Client address of the nodes | The TCP peer by default; no request header is trusted. With a cluster's PROXY protocol source, any client that reaches a node's HTTP or HTTPS port directly can claim any address in the PROXY header, so open those ports to the load balancer only; with Trusted proxy header, only peers inside the trusted CIDRs name the visitor, so list only the proxies' own addresses. In both modes kernel bans match the TCP peer only (Client IP) |
| Scan protection | Counts by client IP (from the cluster's trusted mechanism) and bans the address on every site once triggered; allow lists and the cluster's trusted proxies are not counted, nodes' kernel bans never drop their cluster's trusted proxies, and a ban covering another cluster's trusted proxy or a node address is not shared with other nodes. Behind a load balancer without the matching client IP setting (PROXY protocol or trusted proxy header), the balancer's address is counted and banned. With the client IP from the PROXY protocol or a trusted header, forging a source address takes reaching the nodes' load balancer or a trusted proxy; lift a wrong ban under Bans |
| Look-alike domains | The console keeps labels that mix scripts or hold invisible characters in Punycode; a look-alike label written entirely in another script (say аррӏе.com in Cyrillic) is still shown in Unicode. Hover over an unfamiliar internationalized name to see its Punycode |
Verifying releases
All signatures are cosign keyless signatures: the certificate identity is the release workflow of the repository, and the issuer is the GitHub Actions OIDC service https://token.actions.githubusercontent.com.
| Tool | Purpose |
|---|---|
| cosign | Verify signatures |
| GitHub CLI | Verify provenance (gh attestation verify) |
Node packages (deb, rpm, tar.gz)
-
Download the package to install,
checksums.txt, andchecksums.txt.sigstore.jsonfrom edgeweir-node Releases. -
Verify that
checksums.txtwas signed by the edgeweir-node release workflow on av*tag:cosign verify-blob \ --bundle checksums.txt.sigstore.json \ --certificate-identity-regexp '^https://github\.com/marvinli001/edgeweir-node/\.github/workflows/release\.yml@refs/tags/v.*$' \ --certificate-oidc-issuer https://token.actions.githubusercontent.com \ checksums.txtExpected output:
Verified OK. -
Verify the downloaded packages against
checksums.txt(on macOS, useshasum -a 256 -c):sha256sum -c checksums.txt --ignore-missingExpected output:
OKfor every downloaded file. -
Verify the build provenance (optional):
gh attestation verify edgeweir-node_<version>_linux_amd64.tar.gz --repo marvinli001/edgeweir-node
Install only after steps 2 and 3 pass. install.sh runs the same checks before it executes anything it downloaded, and is stricter: the certificate identity must equal https://github.com/marvinli001/edgeweir-node/.github/workflows/release.yml@refs/tags/v<version> exactly; without cosign on the machine, it downloads cosign v3.1.3 and checks the SHA-256 pinned in the script first. The enrollment token travels only in the EDGEWEIR_TOKEN environment variable or --token-file, never on a command line.
Console image
The console image has no semantic version numbers: every master commit that passes CI is published as <YYYYMMDD>-<first 7 characters of the commit> (for example 20260929-a1b2c3d), and latest moves only while that commit is still the tip of master; the promote workflow points stable at the same digest as one dated tag, so the signature stays valid for it. The signing certificate identity is the release workflow on the master branch. Verify stable with the same commands (replace the tag with stable).
-
Verify the signature:
cosign verify ghcr.io/marvinli001/edgeweir:<YYYYMMDD>-<commit> \ --certificate-identity https://github.com/marvinli001/edgeweir/.github/workflows/release.yml@refs/heads/master \ --certificate-oidc-issuer https://token.actions.githubusercontent.comExpected result: exit code 0.
-
Verify the build provenance:
gh attestation verify oci://ghcr.io/marvinli001/edgeweir:<YYYYMMDD>-<commit> --repo marvinli001/edgeweir -
Pin the image by digest: set
EDGEWEIR_VERSION=<YYYYMMDD>-<commit>@sha256:<digest>in.envinstead of the tag alone. Upgrades and rollback: Versions, upgrades, and rollback.
The image label org.opencontainers.image.revision holds the full commit ID.
Rebuilding from source
| Artifact | Steps |
|---|---|
| Node | Check out the release tag and run the same goreleaser build as CI with the Go version pinned in go.mod; the SHA-256 of the binaries should match the release |
| Console image | Check out the commit in org.opencontainers.image.revision; scripts/image-version.sh prints the same version; build with the release workflow's parameters (command below) |
git checkout <commit>
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) docker buildx build \
--build-arg VERSION=$(scripts/image-version.sh) \
--build-arg REVISION=$(git rev-parse HEAD) \
-t edgeweir:rebuild .The console Dockerfile's apk add tini installs the version in the Alpine repository at build time, so the image is not guaranteed to be byte-for-byte identical.