Repository navigation
Description
Problem
ask_unlisted, released in v2.3.0, renders the ask as a copy of every route in each virtual host. Each copy carries one negated Origin matcher per listed origin and pattern.
Measured on 2 December 2026, on a file with 242 routes in each of three virtual hosts and 8 to 20 listed origins per environment, the render grew from 777 KB to 3.09 MB. Envoy then measured:
- allocated memory: 11.5 MiB before, 40.6 MiB after;
- physical heap at idle: 66.7 MiB before, 142.7 MiB after;
- start-up peak: 234.6 MiB.
A gateway with a 256 MiB hard limit and no swap cannot run that.
Goal
The same behaviour as v2.3.0, rendered without a route copy:
- a request whose
Originis in none of the environment's lists is asked of the configured check, before CORS, with the question header; - a listed origin, or a request with no
Originheader, is not asked; - a file without
ask_unlistedrenders exactly as v2.3.0 does.
Acceptance criteria
- A generator test in
internal/envoy, beside the generator's other tests: for a file withask_unlisted, the rendered route count of each virtual host equals the count for the same file without it, and the size grows by a bound that does not depend on the number of routes. The bound is stated in the test as a literal. - The existing conformance entries for
ask_unlisted(conformance/testdata/unlisted-origins.yaml) stay as they are and pass unchanged on the new render. One entry is added for a request with noOriginheader (not asked), if the entries have none. - The golden comparison for a file without the key stays byte-identical to v2.3.0's render.
Consumers
- Every file that sets
ask_unlisted:conformance/testdata/unlisted-origins.yamlis the only one that writes the key (git grep -n -E '^[[:space:]]*"?ask_unlisted"?[[:space:]]*[:=]' origin/master -- examples conformance internal/render/testdataprinted 1 line in 1 file at origin/master 25ef2d9). Its entries pass unchanged in the conformance battery thatRequiredruns. - The text that describes the route copy and changes with the fix:
docs/defaults.md(theask_unlisted:row),docs/portability.md(theorigins.<env>.ask_unlistedrow), and the comments ininternal/envoy/generate.go,internal/envoy/fragments/filter-cors.yamlandinternal/envoy/fragments/filter-rbac.yaml. The check isgit grep -n -i -E 'cop(y|ies) of (each|every|the) ?(route|environment)|copies of the routes|copy of each route' origin/master -- docs README.md internal conformance, which printed 8 lines in 7 files at origin/master 25ef2d9. Five of them describe this key's copy (the files above). The other three describe the nginx retry copies and stay as they are:docs/nginx.md, the retries row ofdocs/portability.md, andinternal/nginx/retries_test.go. - One gateway in this organisation waits for this fix before it adopts the key. With the key absent its render does not change.
Open tickets checked: gh search issues ask_unlisted --repo kitecorp/proxyfile printed 1 issue, #75, closed (the v2.3.0 change this ticket fixes). An export of all the repository's issues, grepped for ask_unlisted|route copy|copies every route, printed the same one. No open ticket asks for this.
Lane
FULL: the render decides which requests reach the auth check, so a mistake admits or refuses browsers wrongly. The behaviour is meant to stay as v2.3.0, and the conformance entries against a real Envoy prove it.
Activity
fix(envoy): an origin no list holds is asked by one check of its envi…
test(envoy): the origin check counts the questions it is asked, an ow…
fix(envoy): the CORS list of an environment that asks about an origin…
test(envoy): an http origin the check admits gets its allow-origin he…
test(envoy): an own host on another scheme or port is put to the chec…
fix(envoy): with ask_unlisted only the exact own origin is admitted u…
docs(origins): the admission list says that with ask_unlisted only th…
fix(envoy): ask_unlisted gates the check once per virtual host instea…
fix(envoy): ask_unlisted gates the check once per virtual host instea…
tudor-pop commentedon Dec 2, 2026
Released as v2.3.1: #79 merged as 5014e08 (the merged tree is the reviewed tree), and the release run passed with its 6 assets.
ask_unlistednow gates the check once per virtual host instead of copying every route. On a file with 242 routes in each of three hosts and 20 listed origins:Behaviour:
Originrequests are never asked.nullorigin gets no allow-origin header.The conformance scenario's 20 rows, on Envoy 1.40, assert how many times each request was asked.