Skip to content

export-webhook: userinfo as Basic (as 1.5.5), and an auth header 1.5.5 could not build is left out - #24

Merged
MattJackson merged 8 commits into
devfrom
lane-q128-sinks
Oct 18, 2026
Merged

MattJackson merged 8 commits into
devfrom
lane-q128-sinks

Conversation

@MattJackson

Copy link
Copy Markdown
Contributor

Carries #19 (a URL's userinfo sent as authorization: Basic, as 1.5.5's reqwest 0.12 sent it; the commit busbar dev pins today), merged with dev, and audit export-webhook #4:

1.5.5 added the configured auth header only when HeaderName::from_bytes and HeaderValue::from_str took it, and POSTed the line without it otherwise; the sink pushed any bytes and every line was dropped. Now the header is left out exactly where 1.5.5 left it out (THE DESIGN §2: "A port keeps 1.5.5's surface ... wire bytes ... the default is 1.5.5's behaviour").

RED run (test-only commit a07f78f): 39001830681, failing an_auth_header_1_5_5_could_not_build_is_left_out_and_the_line_still_sent. GREEN run: 39002692092 (every test and the conformance suite green; the job is red only at cargo-deny's advisories step, rustls RUSTSEC-2026-0346..0349 in this repo's lock at its busbar ref, unchanged by this PR).

…, as 1.5.5's reqwest 0.12 sent it

Audit export-webhook #1 (HIGH), ARCHITECT ruling (c). 1.5.5 POSTed through reqwest 0.12, whose
RequestBuilder::new (extract_authority) took the URL's username and password off the URL,
percent-decoded each (a username that is not UTF-8 sends nothing, a password that is not is left
out) and appended basic_auth: 'Basic ' + padded standard base64 of '{user}:' then the password.
The sink now builds that field from its own url setting and sends it first on every POST, then
content-type, then the configured auth header, appended as http::HeaderMap appends: a configured
header also named Authorization is sent too, after the userinfo's, as 1.5.5 sent both. The host's
connector drops the userinfo from the target the url setting gives the need (busbar, same audit
row). Log masking unchanged.

Parity: a_userinfo_in_the_url_is_sent_as_basic_as_1_5_5_sent_it (reqwest's decoding and encoding
cases, RFC 4648 vectors), the_userinfo_field_rides_beside_a_configured_auth_header_as_in_1_5_5.
…t out and the line still sent

Audit export-webhook #4. Test only; it fails on this tree: an invalid header name or a value with a
control byte is pushed as raw bytes, the host refuses the request, and every line is dropped. 1.5.5
skipped the header and delivered (THE DESIGN §2: "the default is 1.5.5's behaviour").
… the line still sent

Audit export-webhook #4. 1.5.5 added the configured header only when HeaderName::from_bytes (1 to
65535 RFC 9110 token bytes) and HeaderValue::from_str (no control byte but tab, no DEL) took it, and
POSTed the line without it otherwise; the sink pushed any bytes, the host refused the request, and
every line was dropped. THE DESIGN §2: "A port keeps 1.5.5's surface ... wire bytes ... the default
is 1.5.5's behaviour". RED: an_auth_header_1_5_5_could_not_build_is_left_out_and_the_line_still_sent.
…072 point at the warn lines, not the shed counter
…ader.value is marked x-busbar-secret: the release signs it in, and busbar resolves a reference there at open (Q128 export-webhook M2)
@MattJackson
MattJackson enabled auto-merge October 18, 2026 18:30
@MattJackson
MattJackson merged commit 6476656 into dev Oct 18, 2026
5 checks passed
@MattJackson
MattJackson deleted the lane-q128-sinks branch October 18, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant