Repository navigation
Settings refusals: VIP covers 0.0.0.0/8, blank username-domain list refuses, public-origin, backup and DR path and sibling refusals quote no value (BACKLOG #5132 #5131 #5109 #5110 #5111) - #3560
Conversation
…ACKLOG #5132) _vip_address_problems tested ip.is_unspecified, which is true for 0.0.0.0 alone, so 0.1.2.3 loaded as a floating address that no host can bind. The check now refuses the whole "this network" block (RFC 1122, section 3.2.1). Tests add 0.0.0.0, 0.1.2.3 and 0.255.255.254. Verified-by: tests
…BACKLOG #5132) CONFIGURATION.md said an unspecified address is refused; the check now refuses the whole 0.0.0.0/8 block, which is wider. Proposed PR title: [cluster.vip] refuses every address in 0.0.0.0/8 (BACKLOG #5132) Proposed vault banner: CLOSED by engine PR <N>: _vip_address_problems refuses all of 0.0.0.0/8, with tests for 0.0.0.0, 0.1.2.3 and 0.255.255.254; CONFIGURATION.md names the block. Verified-by: none
…lock (BACKLOG #5132) Review round 1. The check now calls netaddr.not_a_host_address, the existing helper for 0.0.0.0/8, multicast and reserved, rather than a second copy of the block. The refusal names 0.0.0.0/8, so 0.1.2.3 is no longer refused as "unspecified". The comment's reason was false (Linux can bind most of the block); the reason is that the block is not valid as a destination. A boundary test shows the first address past the block still loads. Verified-by: tests
…CKLOG #5132) Review round 1. CONFIGURATION.md's list read "is in ... loopback"; ADR 0056's still said "unspecified". Both now name the block. The CHANGELOG records the tightening, since 0.5.3 loads such an address. Proposed PR title: [cluster.vip] refuses every address in 0.0.0.0/8 (BACKLOG #5132) Proposed vault banner: CLOSED by engine PR <N>: _vip_address_problems refuses all of 0.0.0.0/8 through netaddr.not_a_host_address, with tests for 0.0.0.0, 0.1.2.3, 0.255.255.254 and a boundary control. Verified-by: none
Review round 2. The check no longer leans on netaddr's helper, whose "at least" blocks serve the navigation lists and could narrow under the VIP unseen. Each class is tested explicitly, 0.0.0.0/8 by its first octet, and the refusal names the one that fired. Tests match each reason, escape the 0.0.0.0/8 pattern, and the boundary control is now 1.0.0.0 itself, as a /32. Verified-by: tests
…CKLOG #5132) Review round 2. ADRs are append-only history, so the ratified bullet keeps its words and carries a dated amendment note instead of being rewritten. Proposed PR title: [cluster.vip] refuses every address in 0.0.0.0/8 (BACKLOG #5132) Proposed vault banner: CLOSED by engine PR <N>: _vip_address_problems refuses all of 0.0.0.0/8 and names the reason that fired, with tests for 0.0.0.0, 0.1.2.3, 0.255.255.254 and a 1.0.0.0 boundary control. Verified-by: none
…orms (BACKLOG #5131) A blank MEFOR_AUTH_OIDC_ALLOWED_USERNAME_DOMAINS over a real TOML list loaded as the empty default, so the UPN suffix check moved to [auth].ad_domain with no output; the same blanks as a TOML list disabled that fallback instead. The setting now has its own claim-compared list validator: both forms are stripped with blanks dropped, and a value that names something but holds only blanks is refused at load, without quoting it. The unset default still falls back to ad_domain. Step 1 took the refusal arm, so no ruling is owed. Verified-by: tests
…ACKLOG #5131) CONFIGURATION.md described the old split, a TOML list of blanks refusing while the env form fell back. It now states the refusal in both forms. Proposed PR title: [auth] oidc_allowed_username_domains of only blanks refuses in both forms (BACKLOG #5131) Proposed vault banner: CLOSED by engine PR <N>: a blanks-only value refuses at load as a TOML list and as the env string, and the setting moved to its own claim-compared list validator; tests pin both forms, the row's env-over-TOML case and the default fallback. Verified-by: none
…he type check (BACKLOG #5131) Review round 1. The refusal stopped an engine with OIDC off over a setting nothing reads, unlike the sibling lists; it now fires only with oidc_enabled, and loads as empty otherwise. It runs after the type check, so a set or other iterable pydantic coerces is caught too. The message names the variable, since the TOML file holds a real suffix, and says the fallback needs the setting unset in both places. Tests pin an explicit empty list and OIDC off. Verified-by: tests
…nset (BACKLOG #5131) Review round 1. CONFIGURATION.md said "Empty falls back" beside a refusal of an empty variable; it now says unset or an explicit empty list falls back, and scopes the refusal to oidc_enabled. The CHANGELOG says the same and notes TOML entries are now stripped. Proposed PR title: [auth] oidc_allowed_username_domains of only blanks refuses in both forms (BACKLOG #5131) Proposed vault banner: CLOSED by engine PR <N>: with OIDC on, a blanks-only value refuses at load as a TOML list and as the env string, and the setting has its own claim-compared list validator; tests pin both forms, the row's env-over-TOML case, OIDC off and the fallback. Verified-by: none
…e claim-list helper (BACKLOG #5131) Review round 2. The claim check reads the list only with OIDC on and the suffix stripped, so the refusal now needs both; with strip off a blank template variable loads as empty. The strip and blank drop go through _normalise_claim_value_list, whose docstring names this field. The message no longer asserts an env variable the site may not have set. A test pins the field order the refusal depends on, and the field and property comments match. The tab case is written as an escape. Verified-by: tests
…med (BACKLOG #5131) Review round 2. CONFIGURATION.md and the CHANGELOG scope the refusal to OIDC and stripping both on, and say an explicit empty list in the file falls back. The CHANGELOG drops a sentence that changed nothing an operator does. Proposed PR title: [auth] oidc_allowed_username_domains of only blanks refuses in both forms (BACKLOG #5131) Proposed vault banner: CLOSED by engine PR <N>: with OIDC and stripping on, a blanks-only value refuses at load as a TOML list and as the env string, and the setting has its own claim-compared list validator; tests pin both forms, the row's env-over-TOML case, the not-read cases and the fallback. Verified-by: none
…alue (BACKLOG #5109) _normalize_public_origin let urlsplit's ValueError through, and its message can quote the netloc, userinfo included; it is now replaced, with no chained cause. The IP-literal refusal quoted the whole origin, which may keep userinfo; the oidc_allowed_endpoints refusal quoted the host, which urlsplit reads from the value. Both now name the setting only. input_hiding.py's "names at least the ones known" read as a census; it now says the list is examples. Canary tests cover each. Proposed PR title: Public origin and OIDC host refusals quote no part of the value (BACKLOG #5109) Proposed vault banner: CLOSED by engine PR <N>: _normalize_public_origin guards urlsplit, the IP-literal and oidc_allowed_endpoints refusals name the setting and quote nothing, with a canary test per field; the input_hiding.py sentence names what it covers. The OIDC loop's bare urlsplit stays #4783's. Verified-by: tests
…ies case-folded (BACKLOG #5109) Review round 1. `from None` left urlsplit's error, which quotes the netloc, on __context__ of the error pydantic keeps in ctx, and it failed test_from_none_is_not_redaction; the refusal is now raised after the handler ends. The canaries were upper case while the origin and host are lower-cased before a refusal could quote them, so they could not fire; they are lower case, compared case-folded, and the kept error's chain is read too. The OIDC refusal shows the allow-list again, the operator's own host names. The IP-literal comment's second reason could not occur there and is gone. Verified-by: tests
…ACKLOG #5109) Review round 1: the sibling refusal changes in [Unreleased] each have an entry, and this one changes security-relevant output. Proposed PR title: Public origin and OIDC host refusals quote no part of the value (BACKLOG #5109) Proposed vault banner: CLOSED by engine PR <N>: _normalize_public_origin refuses an unparsable origin after its handler ends, the IP-literal and oidc_allowed_endpoints refusals quote no part of the value, with a canary test per field; the input_hiding.py sentence names what it covers. The OIDC loop's bare urlsplit stays #4783's. Verified-by: none
… uncached (BACKLOG #5109) Review round 2. An oidc_allowed_endpoints entry is not checked to be a host, so a pasted URL there could hold a password; the refusal now quotes neither, and says the host is read in lower case and compared exactly, which the dropped host used to show. The public-origin split is uncached (#5287) and its refusal names likely causes. Tests add the load_settings path, a second canary in the allow-list, and a positive control proving the renderer reaches a kept error's __context__. Verified-by: tests
…LOG #5109) Review round 2 follows the code change. Proposed PR title: Public origin and OIDC allow-list refusals quote no part of the value (BACKLOG #5109) Proposed vault banner: CLOSED by engine PR <N>: _normalize_public_origin refuses an unparsable origin after its handler ends, and the IP-literal and oidc_allowed_endpoints refusals quote no part of the value, with a canary test per field and a load_settings case; the input_hiding.py sentence names what it covers. The OIDC loop's bare urlsplit stays #4783's. Verified-by: none
…stination (BACKLOG #5110) _looks_like_url reads one spelling, so x://u:pw@h, KEY:pw://h, s3:bucket?sig= and 1s://... loaded as paths at [backup].destination, [dr].seed_archive and [dr].restore_token. _is_local_or_unc_path adds a positive check: no URL, and a ':' only after a leading drive letter (after any \\?\ prefix). The DR runner's INFO start line and its not-writable WARNING read BackupSettings.destination_for_log, which shows a path and withholds anything else, and the WARNING names the OSError by strerror, since its own text quotes the path. Tests carry the four values, path controls and both log lines. The seed_dir render test now reaches _seed_dir_absolute with a colon-free value. Verified-by: tests
… #5110) The CONFIGURATION.md rows that describe _looks_like_url are left to open PR 3528, which rewrites them; the wording they need is in the Builder's report. Proposed PR title: [backup]/[dr] path settings checked positively; DR runner logs no URL destination (BACKLOG #5110) Proposed vault banner: CLOSED by engine PR <N>: destination, seed_archive and restore_token take a positive local-or-UNC shape check, with the four reported values as tests; the DR runner's INFO and WARNING lines log destination_for_log. CONFIGURATION.md rows owed after PR 3528 lands. Verified-by: none
…info and a query (BACKLOG #5110) Review round 1. x://token@h/x and C:/c?sig=... still loaded; the check now refuses an '@' in the segment after a drive letter's '//' and any character Win32 refuses in a path, read after the \\?\ or \\.\ prefix in either slash spelling, which it now strips by matched length. The WARNING keeps the OSError's class and code, without its filename. The new values join _CREDENTIAL_URLS, so all four path fields and every rendering are checked; the runner test patches mkdir for its own path only. Verified-by: tests
…LOG #5110) Review round 1. The entry omitted [dr].seed_dir, and said the runner no longer logs such a destination at all; only its startup lines changed. The CONFIGURATION.md rows that describe _looks_like_url are left to open PR 3528; the wording they need is in the Builder's report. Proposed PR title: [backup]/[dr] path settings checked positively; DR runner startup lines log no URL destination (BACKLOG #5110) Proposed vault banner: CLOSED by engine PR <N>: destination, seed_archive, seed_dir and restore_token take a positive local-or-UNC shape check, with the four reported values among the tested shapes; the DR runner's startup INFO and WARNING lines log destination_for_log. CONFIGURATION.md rows owed after PR 3528 lands. Verified-by: none
…states every rule (BACKLOG #5110) Review round 2. A NUL loaded and then failed the runner's mkdir with an uncaught ValueError; the C0 controls are now refused. The userinfo rule takes two or more slashes, and the \\?\ and \\.\ prefixes match in every slash spelling. Each refusal now states the whole rule, one fixed text. The WARNING keeps a WinError code. Tests add NUL, three slashes, the mixed prefixes, seed_dir controls and a WinError case. Verified-by: tests
…5110) Review round 2. changelog.d/README.md says a pull request adds a fragment and does not edit CHANGELOG.md; this branch's entry moves to changelog.d/5110.security.md and names the control-character and prefix rules. The CONFIGURATION.md rows that describe _looks_like_url are left to open PR 3528; the wording they need is in the Builder's report. Proposed PR title: [backup]/[dr] path settings checked positively; DR runner startup lines log no URL destination (BACKLOG #5110) Proposed vault banner: CLOSED by engine PR <N>: destination, seed_archive, seed_dir and restore_token take a positive local-or-UNC shape check, with the four reported values among the tested shapes; the DR runner's startup INFO and WARNING lines log destination_for_log. CONFIGURATION.md rows owed after PR 3528 lands. Verified-by: none
…alue (BACKLOG #5111) One shared helper, urlscreen.setting_must_be, writes the refusal for the eight "got scheme" sites (ai_broker, dicomweb, fhir twice, rest twice, smart, soap), [backup].schedule_at and snapshot_method, and the same shape found beside them: [retention].vacuum_at, and the load-time CRL and [store].ssl_root_cert path refusals, which quoted a value not yet shown to be a path. harden_crl_check's missing-file refusal names the setting alone; crl_label keeps quoting a path, with a line saying why that is safe (the file was there). ai_broker.py and rest.py import the helper at the refusal, to keep their hunks to those lines. Verified-by: tests
… (BACKLOG #5111) Proposed PR title: Sibling refusals name the setting and what it accepts, and quote no value (BACKLOG #5111) Proposed vault banner: CLOSED by engine PR <N>: urlscreen.setting_must_be writes the eight got-scheme refusals, schedule_at, snapshot_method, vacuum_at and the load-time CRL and ssl_root_cert path refusals, with a canary test per refusal; crl_label carries the line saying why a path it quotes is safe. Verified-by: none
…es no scheme (BACKLOG #5111) Review round 1. The REST, SOAP, FHIR and DICOMweb scheme refusals now name the destination, since without the scheme nothing else told the operator which one failed. The api client's base-URL refusal quoted the scheme, which is a user name when '//' is missing; it no longer does. harden_crl_check's missing-file refusal leads with the setting, as its docstring says. setting_must_be's and crl_label's docstrings no longer claim more than holds. test_hop_refusal_revocation's pin moves to the new text; tests add oauth2_token_url and the api client. Verified-by: tests
…t (BACKLOG #5111) Review round 1 follows the code change. Proposed PR title: Sibling refusals name the setting and what it accepts, and quote no value (BACKLOG #5111) Proposed vault banner: CLOSED by engine PR <N>: urlscreen.setting_must_be writes the eight got-scheme refusals, schedule_at, snapshot_method, vacuum_at and the load-time CRL and ssl_root_cert path refusals, the API client's base-URL refusal no longer quotes its scheme, with a canary test per refusal; crl_label says when a path it quotes is safe. Verified-by: none
…#5111) Review round 2. The REST, SOAP, FHIR and DICOMweb scheme refusals lead with hop_name_prefix(config.name), as their neighbours do, in place of an ad-hoc label; the SMART/OAuth2 token-URL and proxy_url scheme refusals now name their connection too. harden_crl_check's setting-named refusal says the path does not exist or is not a file, which is true of a directory. The settings docstrings no longer say "A path, not a secret". test_api_tls_client_trust pins the new load-time CRL text, and test_cli_offline_resolution swaps its public-address NFKC case, whose refusal stopped quoting the value under #5109, for an [update_check].mode case that still quotes. Verified-by: tests
…#5111) Review round 2: the fragment no longer says every refusal names what the setting accepts or that every destination refusal names the destination. Proposed PR title: Sibling refusals name the setting and what it accepts, and quote no value (BACKLOG #5111) Proposed vault banner: CLOSED by engine PR <N>: urlscreen.setting_must_be writes the eight got-scheme refusals, schedule_at, snapshot_method, vacuum_at and the load-time CRL and ssl_root_cert path refusals; the scheme refusals of destinations, token URLs and proxy_url name their connection; the API client's base-URL refusal quotes no scheme; a canary test per refusal. Verified-by: none
… #5110) The [backup].destination path-shape check refuses a "?" on every platform, as the 5110 changelog fragment states, so the POSIX-only "?" case of test_backup_verify_and_restore_count_the_real_snapshot_under_hazard_paths failed to build its BackupSettings on CI test shard 3 (ubuntu). On origin/main the same destination loads. No snapshot is staged in the destination, so the "?" case now writes its archive to a hazard-free directory; the data, OS temp and restore directories keep the hazard, and "#" and "%41" keep it in the destination too. The refusal stays. Verified-by: tests
|
CI fix pushed: head 1039ab1 (fast-forward from 73cac06).
|
Brings PR 3560 up to date with main. One conflict, CHANGELOG.md Unreleased: the branch's #5132, #5131 and #5109 entries and main's #6600 entry were added at the same point; both are kept, branch first. settings.py, tls_policy.py and CONFIGURATION.md merged cleanly. Verified-by: tests
…read (BACKLOG #5110, #5111) Comment and docstring text only; no behaviour changes. - _looks_like_url: says it detects one shape and that the settings refuse through _is_local_or_unc_path (#5110). - seed_dir comment and settings_error_detail: name _is_local_or_unc_path, not _looks_like_url. - _refuse_a_missing_crl_file: harden_crl_check no longer hard-codes a "[tls] crl file" prefix (#5111); the load check's point is refusing at load, led by the setting. - tls_policy _naming_the_ca_setting: a missing CRL is refused by setting without its path (#5111); only refusals on a file that is there quote it. - test_security_cli docstring names _is_local_or_unc_path. Verified-by: tests Verified-by: code-review xhigh
…sals (BACKLOG #5110) The rows merged from main (#5116) said the check was _looks_like_url and that my_s3:// and 1s:// load as a path. #5110 replaced that gate with _is_local_or_unc_path, which refuses both. The backup destination row now names that check and its refusals with their remedy, and the three [dr] path rows point to it. Proposed PR title: [backup]/[dr] paths checked positively; refusals name the setting and quote no value (BACKLOG #5110, #5111) Proposed vault banner: #5110 built on PR 3560, docs follow-up included. Verified-by: tests Verified-by: code-review xhigh
…ell (BACKLOG #5110) Prose only; no behaviour changes. - Escape the pipe in the destination row's code span, which split the table cell and dropped the rest of the row on render. - Say a two-or-more-character scheme is refused, and that a one-letter scheme (s://, x://) with none of the refused shapes still loads as a path, in the destination row, the three [dr] rows and the _looks_like_url docstring. - Name C0 control characters, not every control character. - Replace the C:// sentence, which was false both ways. - The remedy names the file itself for a [dr] key that takes a file. Verified-by: tests Verified-by: code-review xhigh
|
Merge of main and doc corrections pushed. Head is 6b0e120. Commits after 1039ab1:
No behaviour changed after a7f17a5. QA:
Checks on 6b0e120: 13 doc/settings/backup files, 1732 passed and 91 skipped; ruff; the four mypy legs. The earlier merge head had 2094 passed across 19 files. Text rounds stop here; the Manager's call. Open findings for the Lander to classify:
Also from the merge review: the #5109 OIDC endpoint loop (settings.py ~4975) still calls the cached urlsplit, so its NFKC error can quote userinfo. Not reached end to end. The #5132, #5131 and #5109 CHANGELOG bullets are direct edits rather than changelog.d fragments. |
|
Lander (session heuristic-kepler, account 7): held at 6b0e120 for four text fixes; no behaviour change is asked for. Your QA lines are the review proof. A fresh-context reviewer I started ran one probe (32 path inputs, 7 VIP addresses, 5 public origins, 14 username-domain cases) at this head and at main 89f5b5e: the head never accepts an input main refused, and no head refusal text quotes a token or userinfo. So there is nothing worse than main here, and the tightenings are accepted. What holds the merge is text this PR adds or rewrites that promises a refusal the code does not give. You said text rounds stop with you, so a Lander repair Builder is applying these now (repair 1 of 2). What is wrong (each measured):
Fix. These four edits and nothing else.
Queued for filing under R2, none holding the merge: the padded-destination behaviour itself (same on main; the runner uses the unstripped value); the unqualified "a URL is rejected" comments this PR does not touch (settings.py near 8122, 8130, 8140, ADR 0049, the ASVS phase-0 doc); the |
…RL or control character The changelog fragment, CONFIGURATION.md and the settings comment now say a one-letter scheme loads and a leading or trailing control character stripped before the screen is not refused by it. Verified-by: tests
… example beside its rule The changelog fragment and CONFIGURATION.md row now say C0 control character and attach the ?sig= example to the rule that refuses it. Verified-by: tests
|
Lander (session heuristic-kepler, account 7): both Lander repairs are used (8cd99fb, 9f54f62); text only, no code. The review of the first repair (fork ada322af1ba36860d, round-d04e7a15c9, Also queued for filing under R2: a TAB- or LF-padded Pinned head for the merge: 9f54f62. I enqueue once every required context is green on it. Undo: revert the squash commit. |
|
Lander: the decision record named above is d20261202T140629267-2332cf. |
BACKLOG #5132, #5131, #5109, #5110 and #5111 (batch 20055, the config/settings.py chain). All five change security controls.
Why one PR and not five. The rows were built as a stack, 5132 -> 5131 -> 5109 -> 5110 -> 5111, all in
config/settings.pyand its neighbours. Branches 5109 and 5110 are each red ontests/test_cli_offline_resolution.py, threepublic-address-nfkc-*cases. #5109 stopped quoting the value in that refusal, so the test's control could no longer fire. The fix, commit 3505444, which swaps in an[update_check].modecase, exists only on 5111. Per-row PRs would put two red PRs in the queue, and moving the fix would need a force-push of stacked branches. So the stack lands as one unit; each row keeps its own commits. Manager decision d20261202T075015447-e29f6a (adversarial review affirmed). The head merges clean with main.Rows
_vip_address_problemsrefuses all of 0.0.0.0/8, with a /8 boundary testoidc_allowed_username_domainsthat normalises to empty refuses (OIDC on, strip_domain on) instead of falling back to ad_domain_normalize_public_originguards its split and refuses without quoting the value; the IP-literal andoidc_allowed_endpointsrefusals quote no host_is_local_or_unc_pathgates the backup destination, the DR seed paths and the restore token path; two runner log lines showdestination_for_logurlscreen.setting_must_be); destination, token-URL and proxy scheme refusals name their connectionBehaviour changes, fail-closed and by design:
:or one of<>"|?*is now refused.QA. Level xhigh, Rounds 2 + 1 unrepaired for each row. Tag:
xhigh effort -> 10 inline angles -> dedup (no verify) -> sweep -> <=15 findings, read withreview_tag.py --ascii.Checks:
test_hop_url_with_no_host_is_refused.py(64 passed);Refusals, all corrected acts:
Open findings, for you to route. These change behaviour:
//, says "another scheme" where none was written;soap_versionrefusal still prints the raw value;_peer_labelin wiring.py still prints an arbitrary scheme, and static_credentials passes a refused proxy_url to it;[ai].provider, event_type, control_action, secret_rotation. The new offline-resolution test case depends on update_check.mode quoting._ensure_destination's BackupError and the storage_threshold alert still carry the raw destination;[backup].destinationdoes not refuse a value padded with a control character;//token@hostpasses the check, and C1 controls are not refused.Open findings that change no behaviour:
_PATH_SHAPE_RULE's text misdescribes the@rule.://reason)."\t"was meant, and the #5131 commit message wrongly says it was fixed. Another test file holds a literal U+FF03 character.Owed after PR 3528 merges. The CONFIGURATION.md rows for
[backup].destination,[dr].seed_archive,[dr].seed_dirand the restore token path (~3469, ~3506-3508) should state the local-or-UNC rule and what is refused.Ledger. Proposed banners: each row CLOSED by this PR, as in the table above.