Edgeweir
Access control

Access control

Access authentication (Basic, forward, signed URLs A–D), access control (site lists, geo, CORS, hotlink, UA, WebSocket, headers), encoded paths, IP check.

Concepts

TermDefinition
Authentication ruleOne access authentication setting of a site: kind, scope and the kind's settings. At most 16 per site, matched in order.
ScopeWhich requests a rule checks: domains, path prefixes, extensions and excluded path prefixes; all empty means every request.
Basic authenticationThe browser asks for a user name and password (RFC 7617).
Forward authenticationThe node sends some of the request's headers to an authentication service and lets the request through or refuses it by the answer.
Signed URLThe link carries a timestamp and a signature that the node checks with a key, with a validity; used for paid or time-limited downloads and videos.
SignatureA lowercase hexadecimal md5 digest (32 characters) of the path, the timestamp and the key.
Site listsIP lists a site chooses: addresses on its block lists get 403 on that site; addresses on its allow lists skip some of its checks.
Access controlThe settings of the sections "Site lists" to "Security headers", each card with its own switch and Save.

Except for WebSocket origins, these checks run before the rule phases and the cache lookup, and apply to cache hits too; CORS and security headers are added to responses.

Add a rule

  1. Open Sites → (site) → Access control and click "Add rule" on the "Access authentication" card.
  2. Choose the "Type" ("Basic", "Forward authentication", "Signed URL A" to "Signed URL D"), fill in the scope and the kind's settings as below, then click "Done".
  3. Order the rules with "Move up" and "Move down"; turn rules on and off with their "Enabled" switch.
  4. Click "Save". The console publishes a configuration revision (reason "Access authentication of {site} updated"); nodes hot-update without an nginx reload.

While an active node of the cluster lacks the capability access-auth-v1, the card shows "Some nodes in the cluster do not support it"; a site without saved rules cannot add any, while saved rules can still be changed or removed.

Scope and selection

FieldValuesMatch
Domains (none: all)Any of the site's domains; others answer AUTH_DOMAIN_UNKNOWNEach domain matches the request's Host as written: a.com exactly, *.a.com one label, .a.com any subdomain, ~pattern the whole host
Path prefixes (one per line)Starting with /, at most 32, each ≤ 1024 bytes, without whitespace, ?, # or control charactersThe path starts with one of them, ASCII case ignored (origins such as Express route /ADMIN/ to /admin/ by default); empty means any
ExtensionsSeparated by commas or spaces, at most 64, 1–16 lowercase letters or digits (a leading . is dropped)The last path segment's extension (as the rule field http.request.uri.path.extension, lowercase); empty means any
Excluded path prefixesAs path prefixesPaths starting with one of them are not checked; compared byte for byte
  • The path is nginx's normalized path (percent-decoded, as the rule field http.request.uri.path). Signed URLs of kinds B and C are matched by the path without their two signature segments.
  • The origin receives the raw path the visitor sent. When it holds an encoded /, \, ., % or ; (%2F, %5C, %2E, %25, %3B, in either case), a %u escape, a \, a ;, a #, or a . or .. segment, or starts with //, the origin may route it elsewhere than the normalized path (/admin/..%2Fx is /x on the node, but under /admin/ at a Go ServeMux origin). Such a request:
    • is inside every rule's path prefixes and extensions, no excluded prefix applies to it, and it is not cached;
    • gets 400 (auth-path-ambiguous) when the domains of more than one rule cover the Host, since which rule checks it cannot be told;
    • gets 400 as well when the single rule is forward authentication, without asking the service (it decides on the path it is given, which the origin may read otherwise).
  • Ordinary URLs can hold these markers too (100%25.pdf, ;jsessionid=); paths whose origin reads %2F or ; as they are can be listed as encoded path exceptions.
  • No excluded prefix applies to a raw path with // inside (the node merges slashes, while an origin that keeps the empty segment may hand /admin//public/x to its /admin/ handler); its scope and caching still follow the merged path.
  • The first enabled rule whose scope the request matches decides; later rules are not looked at. Disabled rules are not sent to nodes. Path prefixes ignore case: with an origin that does not (S3, Go, Django), /TEAM/x matches an earlier /team/ rule while the origin treats it as another resource, so put the stricter rule first.
  • The identity headers rules set (Basic's X-Auth-User, forward authentication's "Response headers copied to the origin") are removed from the request before the rule is picked: a visitor's own values neither reach the origin nor show in the rules' http.request.headers.*. Those of disabled and deleted rules are removed as well, from every request of the site (the console keeps the header names a site has used, at most 64 no longer in use, the oldest dropped first; nodes 1.1.0 and later, earlier nodes remove those of the enabled rules only).
  • Once the origin no longer trusts them, click "Stop removing" on the "Headers of former rules still removed" line at the bottom of the "Access authentication" card and confirm: a new configuration revision is published and site.auth_identity_forget audited; headers the current rules (disabled ones included) set are not affected. The button is disabled while there are unsaved changes.
  • Domains removed from the site are left out of scopes when they are sent to nodes; when that leaves a scope without domains, the rule covers every domain of the site (more requests are authenticated, never fewer).

Order

OrderStep
1The probes' health endpoint, CDN-Loop, the node certificates' HTTP-01, the site by Host, SNI check, client certificates, dynamic bans (global bans, and site bans for addresses not on the site's allow lists; addresses on a global allow list and trusted proxies are never banned), the PURGE method
2Identity headers removed and the authentication rule chosen; signed URLs are parsed and their signature removed (maintenance, CC, the rules, the cache key, purges and the origin then see the URI without it)
3Maintenance, CC counting, the reserved prefix /.edgeweir/
4The global allow and block lists
5Site block lists
6Geo access
7CORS preflights answered (before authentication: browsers send preflights without credentials)
8Hotlink protection
9User agents
10Authentication: a plain HTTP request the site's Force HTTPS redirects is redirected first (with its URL and signature), so credentials never travel unencrypted; then the kind's check
11Rule phases, CC bans of single clients, Under Attack and CC challenges, WebSocket origins, cache lookup and the origin
12Responses: CORS headers, security headers, then the rules of the response-transform and compression phases (rules may change or remove both)
  • ACME HTTP-01 requests, the reserved prefix /.edgeweir/ and the node's local prefetch requests are not authenticated and skip steps 5–9; local prefetch requests skip the WebSocket origin check. A prefetched signed URL loses its signature too and fills the same cached object; prefetch responses get the headers as usual.
  • Config rules that override Force HTTPS run after authentication and do not affect the redirect of step 10.
  • Access control (geo, hotlink, user agents) and maintenance mode decide on the normalized path as well; for an ambiguous raw path (see Scope and selection) or one with // inside, their excluded prefixes, the hotlink redirect target's exemption and maintenance mode's allowed paths do not apply.

Basic authentication

FieldValuesDefault
Realm1–64 characters without ", \ or control characters; sent in WWW-AuthenticateThe site's name (without ", \ and control characters; Restricted when that is empty)
Users1–100, no user name twice. User names 1–64 printable ASCII characters without spaces or :; passwords 8–128 characters without control charactersOne
Keep Authorization towards the originOn / offOff (removed)
Send X-Auth-User to the originOn / off; when on it always replaces the visitor's own header of that nameOff
ItemBehavior
PasswordsOnly salted hashes are stored: PBKDF2-HMAC-SHA256, 16-byte random salt, 10000 iterations, envelope-encrypted, delivered over the node channel; the UI and the API return user names only, and password fields show "Saved; leave empty to keep it"
ChangesAn existing user's empty password keeps it; new and renamed users need a password ("User {user} needs a password")
Refusal401, WWW-Authenticate: Basic realm="…", charset="UTF-8", X-Edgeweir-Error: auth-required, with the site's 401 error page (else its "Other 4xx" page, else the built-in page). A 401 page set to redirect is replaced by the "Other 4xx" page or the built-in page; the status stays 401 (browsers ask for credentials on a 401 only)
AllowedBy default Authorization is removed from the request to the origin and the request is cached as usual; when kept, the usual rule applies: requests with Authorization are cached only when a cache rule allows it
Node cachesSuccesses are shared by all workers of the node for 60 s, failures kept per worker for 10 s; keyed by the decoded user name and password (SHA-256) and the secret's version, so other spellings of the Basic scheme (case, spaces) share one result; changing a password or removing a user ends old results at once
Unknown usersCost one hash of 10000 iterations as well, as long as a known user
LimitsHashing holds the node's worker, so every verification counts before it hashes (results kept do not): per site, 10 in 10 seconds for one client network (an IPv4 address or an IPv6 /64), 100 in 10 seconds for its wider network (IPv4 /24, IPv6 /48), 20 per second per site on a node and 50 per second per node; beyond them 429 (auth-rate-limited, with Retry-After) without hashing. Successful verifications and attempts the site's or the node's limit refuses do not count against the client's networks

Check:

curl -sI -H 'Host: www.example.com' http://<node IP>/admin/
curl -sI -u alice:<password> -H 'Host: www.example.com' http://<node IP>/admin/

The first answers 401 with WWW-Authenticate, the second 200.

Forward authentication

FieldValuesDefault
Authentication URLAn http:// or https:// URL, ≤ 2048 characters, host name or IP, port 1–65535, no user information, fragment, spaces or \; stored in plain text and shown in the UI and the API, so put no token in its query string and let the forwarded request headers carry credentials. A special-purpose host address outside the origin allow list answers ORIGIN_ADDRESS_FORBIDDEN on save—
MethodGET / HEADGET
Timeout (s)0.1–105
Forwarded request headersThe visitor's header names, comma-separated, at most 16, each ≤ 64 characters; not host, connection, upgrade, te, trailer, transfer-encoding, content-length, keep-alive, proxy-connection, x-original-uri, x-original-method, x-original-host, x-real-ip, x-forwarded-for or x-edgeweir-*authorization, cookie
Response headers copied to the originHeader names of the service's answer, at most 8; not protected headers (as in header rules)Empty
Cache answers (s, 0 off)0–3000
Pass redirects onOn / offOff
Allow when the service failsOn / offOff

The request the node sends to the service:

ItemContent
PathThrough the node's origin layer: the origin address policy (special-purpose addresses outside the origin allow list are refused), DNS resolution and TLS certificate verification as for origins, one try with the rule's timeout
HeadersThe visitor's headers on the forwarded list, and the node's own X-Original-URI (the visitor's original request URI, signature and query included), X-Original-Method, X-Original-Host, X-Original-URL (<scheme>://<Host><original URI>), X-Forwarded-Method, X-Forwarded-Proto, X-Forwarded-Host, X-Forwarded-Uri (the names services such as Authelia read), X-Real-IP and X-Forwarded-For (both just the visitor's IP, as ip.src) and CDN-Loop; these never carry the visitor's own values, also when they are on the forwarded list; no other header
BodyNone
AnswerWhat the node does
2xxLets the request through; the copied response headers the answer carries are set on the request to the origin, the ones it lacks are removed from it (visitors cannot send their own)
401, 403Passed on: status, WWW-Authenticate, Content-Type and body (the site's error page when the body is over 64 KiB), Cache-Control: no-store, X-Edgeweir-Error: auth-denied
3xxWith "Pass redirects on": status and Location (login redirects), with Cache-Control: no-store and X-Edgeweir-Error: auth-denied; otherwise as other 4xx
Other 4xx403 (error page, auth-denied)
5xx, connection failures, timeouts, refused addressesThe service is unavailable: 503 (error page, auth-unavailable); with "Allow when the service fails" the request continues without authentication, and the "Response headers copied to the origin" are removed from the origin request (visitors cannot send their own). At most one NOTICE nginx error log line per rule and node every 60 seconds (site ID, rule ID and status)

Cached answers are keyed by the rule, the authentication URL and the forwarded request headers (names and values) only, not by path or visitor IP. Do not cache answers when the service decides by path or IP. Only 2xx, 401 and 403 answers are cached.

Signed URLs A–D

KindURLSignature
Apath?sign=timestamp-rand-signaturemd5(path@timestamp@rand@key)
B/timestamp/signature/pathmd5(path@timestamp@key)
C/signature/timestamp/pathmd5(path@timestamp@key)
Dpath?sign=signature&t=timestampmd5(path@timestamp@key)
FieldValuesDefault
Primary key16–128 printable ASCII characters (no spaces); "Generate" makes 32 letters and digits in the browser; required for a new rule ("A signing key is required")—
Backup keyAs the primary key; both are accepted while rotating; "Remove backup key" removes itNone
Validity (s)1–315360001800
Clock skew allowed (s)0–600300
Signature parameter (A, D)1–32 letters, digits, _ or -sign
Time parameter (D)As above, not the signature parametert
ItemBehavior
PathThe visitor's raw path: the request line's part before ?, percent-encoding as sent; for B and C the part after the two segments (it must start with /)
TimestampDecimal Unix seconds (1–12 digits); valid from timestamp − skew to timestamp + validity + skew
Signature, randThe signature is 32 lowercase hexadecimal characters; rand (A) 1–64 letters or digits
ParametersThe first of several parameters of one name counts; all of them are removed; values are not decoded
ComparisonBoth keys are computed and compared with the signature in constant time
RemovalA and D lose their signature parameters (other parameters keep their order); B and C their two segments. The cache key, purges, rules and the origin see the URI without the signature, so different signatures of one object share its cached copy
B and C normalizationnginx's normalized path must start with the same two segments (/1661824870/<signature>/a/../b normalizes to /1661824870/<signature>/b, /b once removed); otherwise there is no signature
Refusal403 with the site's error page: a missing, malformed or wrong signature is auth-denied, an expired one or a timestamp ahead auth-expired
KeysEnvelope-encrypted, delivered over the node channel; the UI and the API only tell whether a backup key is set. A generated key shows once ("Shown once; copy it before saving")

Example: key 123456, timestamp 1661824870, rand c6d1a57067b21f7b, path /images/test.jpg:

A  /images/test.jpg?sign=1661824870-c6d1a57067b21f7b-0baac47b6c2ad519bb1bfe7babff37a3
B  /1661824870/64bf8671521f2a61a3b64691fde82729/images/test.jpg
C  /64bf8671521f2a61a3b64691fde82729/1661824870/images/test.jpg
D  /images/test.jpg?sign=64bf8671521f2a61a3b64691fde82729&t=1661824870

Signing in your own application (D):

ts=$(date +%s); path=/images/test.jpg
sign=$(printf '%s@%s@%s' "$path" "$ts" "$KEY" | openssl md5 | awk '{print $NF}')
echo "https://www.example.com${path}?sign=${sign}&t=${ts}"

Sign a URL in the console

  1. Click the link icon "Sign a URL" next to a saved signed URL rule (disabled while there are unsaved changes: save first).
  2. Fill in "Path or URL": a path starting with /, or an http(s) URL of one of the site's domains (≤ 4096 characters, a query allowed); and "Valid for (s)" (1 second up to the rule's validity, the rule's validity by default).
  3. Click "Sign". The console computes the signed URL with the rule's primary key and shows it with "Expires {time}"; nothing is stored or sent to nodes. For a link that expires after P seconds the console takes the timestamp now − (the rule's validity − P); kind A gets a random rand of 16 hexadecimal digits.
ErrorCause
"Enter a path starting with / or an http(s) URL of this site"The URL's host is not a domain of the site, or it has user information or another scheme than http(s)
"Validity cannot exceed the rule's {max} seconds"The validity is longer than the rule's
"Only URL authentication rules sign URLs"The rule is not a signed URL rule

Each signed URL is audited as site.auth_sign_url (rule, path and expiry, never the signature).

The expiry shown leaves out the rule's clock skew: nodes still accept the link for that many seconds after it. A link given out cannot be revoked on its own: replace the key that signed it, without keeping the old key as the backup key.

Site lists

  1. Create the lists first on the "IP lists" tab of Access control → IP lists & bans (of any kind: "Block", "Allow" or "Referenced by rules"; see IP lists).
  2. Open Sites → (site) → Access control, tick "Site block lists" and "Site allow lists" (at most 16 each; a list ticked on one side cannot be ticked on the other) on the "Site lists" card and click "Save".
ItemBehavior
Site block listsA client address (ip.src) on any of them gets 403 (X-Edgeweir-Error: ip-blocked) on this site only; addresses on a global allow list or on the site's allow lists excepted
Site allow listsSkip the site's block lists, the site's bans (CC bans of single clients included) and greylist entries, geo, hotlink protection, user agents, and Under Attack and CC challenges
Not skippedGlobal block lists, global bans, CORS, WebSocket origins, authentication, rules and maintenance
One listCannot be both a site block and allow list ("A list cannot be both a site block and allow list: …")
List changesWhen a list's entries change, every site that chose it follows
Deleting a listA list a site chose cannot be deleted: "The IP list is used by …" names the site

Geo access

Turn on "Enabled" on the "Geo access" card, choose the "Mode", fill in the lists (countries, subdivisions and ASNs separated by commas or spaces, path prefixes one per line) and click "Save".

FieldValuesDefault
Mode"Deny listed": clients matching the lists get 403; "Allow listed only": clients not matching them get 403Deny listed
Countries (ISO codes)ISO 3166-1 alpha-2 codes (stored uppercase), at most 256Empty
Subdivisionscountry-subdivision, the subdivision as ip.geoip.subdivision reads it (the City MMDB code, else its English name, ≤ 64 bytes), e.g. US-CA; compared ASCII case-insensitively; at most 256Empty
ASNs1–4294967295, at most 256Empty
Path prefixesOne per line, at most 32; ASCII case ignored (/ADMIN/ is under /admin/); empty: every pathEmpty
Excluded path prefixesPaths starting with one of them are not checked, at most 32; compared byte for byteEmpty

While on, at least one country, subdivision or ASN is required.

ItemBehavior
MatchThe country is listed, country-subdivision is listed, or the ASN is listed
No recordAn address the GeoIP data does not know (no country, ASN 0) matches nothing: "Allow listed only" answers 403
Denied403 with the site's 403 error page, X-Edgeweir-Error: geo-denied
GeoIP unavailable503 (X-Edgeweir-Error: policy-unavailable), as for rules; only requests in scope look GeoIP up
DataThe node's local GeoIP data, see GeoIP databases; subdivisions need a City MMDB

CORS

Turn on "Enabled" on the "CORS" card, fill in "Allowed origins" and the rest, and click "Save".

FieldValuesDefault
Allowed originshttps://a.com, https://a.com:8443, https://*.a.com (one label below) or * alone, one per line, at most 100; saved with lowercase scheme and host and without the default portEmpty (at least one while on)
Allow credentialsResponses carry Access-Control-Allow-Credentials: true; origins cannot be * ("With credentials, origins cannot be *")Off
Allowed methods1–16, separated by commas or spaces, sent in this orderGET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS
Allowed request headers"List" ("Header names", at most 64, separated by commas or spaces), or "Echo the preflight's headers" (the preflight's Access-Control-Request-Headers)List, empty
Exposed headersAt most 64Empty
Max-Age (s)0–86400600
Preflights go to the originPreflights go to the origin as usual instead of being answered at the edge; for an allowed origin its answer gets the full preflight headers too (methods, request headers, Max-Age and Vary), unless the origin's CORS headers are kept and it sent Access-Control-Allow-OriginOff
Keep the origin's CORS headersWhen the origin's response has Access-Control-Allow-Origin, no Access-Control-* header is changedOff
Path prefixesAt most 32; compared byte for byte (case matters); empty: every pathEmpty
ItemBehavior
Origin matchThe request's Origin, normalized (lowercase, no default port), against the list; *.a.com matches one label below a.com only; null and origins that cannot be parsed match nothing but *
Access-Control-Allow-Origin* when the list has * and credentials are off, else the request's Origin
PreflightsOPTIONS with Origin and Access-Control-Request-Method: for an allowed origin the node answers 204 itself with Access-Control-Allow-Origin (and credentials), Access-Control-Allow-Methods, Access-Control-Allow-Headers, Access-Control-Max-Age, Vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers and Cache-Control: no-store, without asking the origin; other origins get 403 (X-Edgeweir-Error: cors-origin-denied). Addresses on the site's allow lists are checked too
Other responsesCache hits, origin responses and responses the node makes (error pages, redirects): the origin's Access-Control-* headers are removed by default; a request with an allowed Origin gets Access-Control-Allow-Origin (and credentials) and Access-Control-Expose-Headers
VaryResponses in scope always get Origin in Vary (unless it has Origin or * already), also for requests without Origin; cached objects are not split by Origin
Ambiguous pathsA request whose raw path is ambiguous (see Scope and selection) is outside the CORS scope: preflights are not answered at the edge and every Access-Control-* header of the response is removed
RulesResponse header rules run after CORS and may change these headers

Turn on "Enabled" on the "Hotlink protection" card, adjust the sources and scope, and click "Save".

FieldValuesDefault
Allow no refererRequests without Referer (and without Origin when it is checked) passOn
Allow the site's domainsA Referer whose host this site serves (exact, wildcard, suffix and pattern domains) passesOn
Allowed sourcesa.com (exact), *.a.com (one label below), .a.com (any depth below, not a.com) or * alone (any host), one per line, at most 200Empty
Denied sourcesThe same forms, at most 200; a match is refused, before allowed sources and the site's domainsEmpty
Check Origin tooA request's Origin is checked the same wayOff
ExtensionsAt most 64, separated by commas or spacesCommon image, audio, video and download types (jpg, png, webp, mp4, m3u8, zip, apk, pdf and others, 49)
Path prefixesAt most 32; ASCII case ignoredEmpty
Excluded path prefixesAt most 32; compared byte for byteEmpty
Action"Answer 403" (error page) or "302 redirect" to "Redirect to" (a site path or an http(s) URL, at most 2048 characters; a site path without //, . or .. segments, ; and %)Answer 403
ItemBehavior
ScopeEvery request when extensions and path prefixes are both empty; else an extension in the list or a path under a prefix; minus the excluded prefixes
ParsingOnly http:// and https:// URLs: their host (lowercase, without user, port and a trailing .); a Referer that cannot be parsed (android-app://…, Origin: null) is not allowed, even with "Allow no referer" on
DecisionEvery value present must be allowed: denied sources first, then the site's domains and the allowed sources
Refused403, X-Edgeweir-Error: hotlink-denied; or a 302 with Cache-Control: no-store and the same X-Edgeweir-Error
Redirect targetA request for a target that is a site path is not checked itself; a full URL of this site in scope would redirect in a loop: exclude its path. Nodes cannot exempt a site path with //, a dot segment, ; or a percent-escape (the redirect would loop): such targets cannot be saved, and one saved earlier answers 403 instead
LimitsVisitors and browsers can drop Referer (e.g. Referrer-Policy: no-referrer); turn "Allow no referer" off to refuse them

User agents

Click "Add rule" on the "User agents" card, fill in "Pattern" and choose the "Action" ("Allow" or "Deny"), reorder with "Move up" and "Move down", and click "Save". Without rules nothing is checked.

FieldValues
PatternLike the rule operator wildcard: the whole value, * any bytes (at most 8), \* and \\ literals, any other \ invalid; ASCII case-insensitive; at most 512 printable ASCII characters; an empty pattern (listed as "(no user agent)") matches an empty or missing User-Agent
RulesAt most 200, in their order
Path prefixes, excluded path prefixesAt most 32 each; path prefixes ignore ASCII case, excluded ones are compared byte for byte
ItemBehavior
DecisionA matching "Allow" entry lets the request through without looking at "Deny" entries; else a matching "Deny" entry answers 403 (X-Edgeweir-Error: ua-denied)
SubstringsWrite *word*, e.g. *curl*
Only listed user agentsAdd a "Deny" entry *
Several User-Agent headersMatched joined with , , like http.user_agent

WebSocket origins and idle timeout

On the "WebSocket" card choose "Any origin" or "Listed origins only" under "Origins" and fill in "Allowed origins", adjust "Idle timeout (s)" and click "Save". The site's WebSocket switch is on the Origins tab, see WebSocket.

FieldValuesDefault
OriginsAny origin, or a list (the CORS forms without * alone, one per line, at most 100, at least one)Any origin
Idle timeout (s)60–864003600
ItemBehavior
RefusedAn upgrade without Origin, with an Origin that cannot be parsed or is not listed gets 403 (X-Edgeweir-Error: websocket-origin-denied); site allow lists do not skip it
Idle timeoutAn upgraded connection closes after being idle this long; config rules' origin send and read timeouts still win

Security headers

Turn on what is needed on the "Security headers" card and click "Save".

FieldResponse header
X-Content-Type-Options: nosniffX-Content-Type-Options: nosniff
X-Frame-OptionsNot set / DENY / SAMEORIGIN
Referrer-PolicyNot set, or no-referrer, no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url
Permissions-PolicyThe value (at most 1024 printable ASCII characters, spaces included); empty: not set
Hide ServerRemoves the Server header
Remove X-Powered-ByRemoves the origin's X-Powered-By

The headers replace the origin's headers of the same name on cache hits, origin responses and responses the node makes. Rules of the response-transform phase run afterwards: a rule that sets or removes one of these headers wins.

Encoded path exceptions

When the origin reads %2F or ; path parameters as they are (object storage keys, matrix parameter APIs, Java's ;jsessionid=), such requests are ambiguous by default: inside every authentication and access control scope, no excluded prefix applies, not cached. On the "Encoded path exceptions" card click "Add prefix", fill in "Raw path prefix", turn on "Allow %2F" and / or "Allow ; parameters", and click "Save".

FieldMeaning
Raw path prefixCompared bytewise with the raw path the visitor sent (case-sensitive, nothing decoded); starts with /, at most 256 bytes of printable ASCII, without %, ;, \, #, ?, spaces, // or . and .. segments; / covers the whole site. At most 32, no prefix twice
Allow %2FEncoded slashes (either case) no longer make the path ambiguous; on for a new row
Allow ; parameters; parameters in path segments no longer make the path ambiguous

Each row needs at least one of them on.

BehaviourMeaning
Still ambiguousWith %2F read as / and every segment's parameters from ; on removed, a path with any other marker stays ambiguous: ..%2F, ..;, %2E, %25 (double encoding), %5C, %3B, \, #, . and .. segments, a leading //
ScopesCompared in every way the origin may read the path: decoded, with %2F kept inside its segment, and either without ; parameters. Scopes that add a check (authentication rules, geo, hotlink, user agents) apply when any reading is in them; excluded and exception prefixes, maintenance's allowed paths, WAF exclusions and CORS only when every reading is
Authentication rulesReadings that select different authentication rules get 400 (auth-path-ambiguous); otherwise the selected rule checks the request. For example /admin;x/secret is inside an /admin/ rule through the reading without parameters
CacheCached by the cache rules; a path with %2F gets a cache key that keeps it (apart from /), while cache rules and purges still match the decoded path, so purging /a/b also purges /a%2Fb
// insideExcluded prefixes still do not apply

An exception only relaxes the characters it turns on under its prefix: outside the prefix, or for characters left off, paths stay ambiguous.

IP check

EntrySite
Sites → (site) → Access control, the "IP check" cardThat site
Access control → IP lists & bans, "IP check" at the top right"Site" optional, "No site" by default

Fill in "IP address" and click "Check".

ResultContent
Outcome (with a site)The first step in the order above that decides: "Banned on every site", "Banned on this site", "Blocked by a block list", "Blocked by a site block list", "Allowed" (an exemption by a global or site allow list, marked "Allow list" or "Site allow lists") or "No list or ban applies" (geo, hotlink and the rest still apply). Addresses on a global allow list and trusted proxies are never reported as banned
Matching listsEvery IP list holding the address, the matching entries, the list's kind, and whether it is one of the site's block or allow lists ("Site block", "Site allow")
Active bansActive bans covering the address (with a site: global bans and that site's)
ClustersEach cluster's client address mode ("Direct", "PROXY protocol", "Trusted proxy header"; with a site: its cluster's), and whether the address is a "Trusted proxy" (trusted proxy header mode) or a "Node address"

An IPv4-mapped IPv6 address (::ffff:a.b.c.d) is checked as the IPv4 address, like nodes do; anything but an IP address answers "Invalid IP address". The console has no GeoIP database, so the IP check does not evaluate geo access ("GeoIP is not checked").

Failure counts and error codes

Requests authentication refused (400, 401, 403, 429, 503 and the 3xx forward authentication passes on, a browser's first request without credentials included) are counted per site and minute; the "Authentication failures" card of the site's Attacks tab shows the count over the chosen range (GET /sites/{id}/auth-rules/failures). Requests let through (also when the service fails) and Force HTTPS redirects are not counted. While an active node of the cluster lacks access-auth-v1 the card shows "Some nodes in the cluster do not report authentication failures".

Access log lines record the block reason "Access authentication" with the rule ID (auth-unavailable excepted).

X-Edgeweir-ErrorStatusCause
auth-required401Basic: no or wrong credentials
auth-denied403 (forward authentication also 401 or 3xx)A missing or wrong signature; forward authentication refused
auth-expired403An expired signature or a timestamp ahead
auth-rate-limited429Basic verification limit
auth-path-ambiguous400An ambiguous raw path on a Host with more than one authentication rule, or whose one rule is forward authentication; or the readings of a path under an encoded path exception select different rules
auth-unavailable503The authentication service is unavailable

Access control refusals do not count as authentication failures:

X-Edgeweir-ErrorStatusCauseBlock reason in access logs
ip-blocked403A site block listBlock list
geo-denied403Geo accessRegion restriction
cors-origin-denied403A CORS preflight from an origin not allowedCORS origin
hotlink-denied403 or 302Hotlink protectionHotlink protection
ua-denied403User agentsUser-Agent list
websocket-origin-denied403WebSocket originsWebSocket origin

Security and audit

ItemBehavior
StoragePassword hashes and signing keys are envelope-encrypted with EDGEWEIR_MASTER_KEY (bound to their rule) and sealed again when the master key rotates
DeliveryOnly to nodes of the site's cluster, over the mTLS node channel; nodes keep them in their state directory (credentials.json, 0600); configuration revisions carry references only
Never inConfiguration revisions, snapshots, audit entries, logs and API answers
Auditsite.auth_update (Access authentication updated): each rule's ID, kind and state before and after, and after the change its number of users or keys and whether its secret changed (no user names or credentials); site.auth_identity_forget (Identity headers let through): the header names; site.auth_sign_url (Signed URL generated); site.access_control_update (Access control updated): which parts changed with their switches and entry counts before and after (not the sources, patterns or other list contents)
Revision reasons"Access authentication of {site} updated", "Access control of {site} updated"

Node requirements

ItemRequirement
Authentication rulesNode capability access-auth-v1 (while a rule is enabled); while an active node of the cluster lacks it the UI cannot add a site's first rule, publishes by service accounts and background jobs answer NODE_CAPABILITY_REQUIRED, and nodes without it keep their last-known-good configuration
Hot updatesRules, users and keys are hot-updated; upgrading a node to a version with the capability adds one shared dictionary and one internal location to its nginx configuration (one structural reload that keeps open connections)
Identity headersRemoving those of disabled and deleted rules needs nodes 1.1.0 or later
Access controlNode capability access-control-v1 (any part on or a site list chosen); geo access with countries or subdivisions also needs geoip-city-v1, with subdivisions the console also checks geoip-subdivision-v1, with ASNs geoip-asn-v1. While an active node of the cluster lacks it the cards show "Some nodes in the cluster do not support it" and parts that are off cannot be turned on; publishes by service accounts and background jobs answer NODE_CAPABILITY_REQUIRED. A site with no part on and no site list chosen carries no access control in its configuration
Access control updatesEvery setting is hot-updated without an nginx reload; upgrading a node to a version with the capability raises the timeouts of the edge layer's hop to the origin layer to 86400 seconds for longer WebSocket idle timeouts (one structural reload that keeps open connections)
Encoded path exceptionsNode capability encoded-path-exemptions-v1; never holds a publish: nodes without it keep treating such paths as ambiguous. While an active node of the cluster lacks it the card shows "Some nodes in the cluster do not support it" and a site without exceptions cannot add any

API

MethodPathPurpose
GET/sites/{id}/auth-rulesThe rules (no password hashes or keys) and formerIdentityHeaders
PUT/sites/{id}/auth-rulesReplaces them; rules with an id keep their passwords and keys, see API
POST/sites/{id}/auth-rules/forget-identity-headersStops removing the former identity headers in names
POST/sites/{id}/auth-rules/{ruleId}/signSigns a URL (url, validitySeconds)
GET/sites/{id}/auth-rules/failuresRefused requests (range, 24h by default) and the nodes that do not count them
GET/sites/{id}/access-controlEvery access control setting
PATCH/sites/{id}/access-controlChanges the parts in the request only (siteLists, hotlink, userAgents, cors, geo, websocket, securityHeaders, encodedPaths), see API
GET/ip-check?ip=…&siteId=…The IP check

Changes may carry expectedUpdatedAt and are refused when the settings changed since they were read. Read-only AccessKeys and the demo account can call the GET ones only; service accounts none of them (SERVICE_ACCOUNT_FORBIDDEN).

Troubleshooting

SymptomCauseFix
Every request is 401 / 403The rule's secret did not reach the node (node log access authentication rule … unavailable; its requests are refused) or the scope is too wideCheck that the node is online and recent enough; narrow the scope or reorder the rules
A correct signature gets 403 auth-expiredThe clocks of the node and the signer differ, or the timestamp is in millisecondsSync the clocks, use seconds; allow more clock skew
A correct signature gets 403 auth-deniedThe signed path differs from the one visitors request (an unencoded non-ASCII path, or other percent-encoding case); wrong parameter namesSign the percent-encoded path visitors send; check the parameter names
The browser does not ask for credentialsAnother authentication rule matched first, or the request is outside the Basic rule's scopeCheck the rules' order and scopes
Forward authentication always answers 503The URL is a private address outside the origin allow list, DNS fails or the service times outAdd the network to the origin allow list in the system settings; check the URL and the timeout
Asked to sign in again after signing inA 401 answer is cachedCache answers for less time, or not at all
400 auth-path-ambiguousThe raw path holds an encoded /, a ; or another markerAdd an encoded path exception when the origin reads such paths as they are
"A list cannot be both a site block and allow list: …"The same list on both sidesRemove it from one side
"With credentials, origins cannot be *"CORS allows credentials and lists *List the origins, or turn credentials off
The browser reports a CORS error; no Access-Control-Allow-OriginThe request's Origin is not allowed (*.a.com matches neither a.com nor deeper names) or the path is out of scopeAdd the origin or adjust the path prefixes
Images on the site's own pages get 403 hotlink-deniedThe page's host is neither served by this site nor allowed, or the page sends Referrer-Policy: no-referrer while "Allow no referer" is offAllow the page's domain; turn "Allow no referer" on
Every request 503 policy-unavailableGeo access is on and the node's GeoIP is unavailableCheck the node's GeoIP setup, see GeoIP databases
WebSocket connections get 403 websocket-origin-deniedThe origin is not listed, or the client sends no OriginAdd the origin; have non-browser clients send an allowed Origin
A security header is missing or differentA response-transform rule changed or removed itCheck the site's and the global rules
Edit on GitHub

On this page