Skip to content

fix(server): send push credentials of any authentication scheme - #448

Merged
muscariello merged 1 commit into
stack/08-list-tasks-include-artifactsfrom
stack/09-push-any-auth-scheme
Nov 2, 2026
Merged

muscariello merged 1 commit into
stack/08-list-tasks-include-artifactsfrom
stack/09-push-any-auth-scheme

Conversation

@muscariello

Copy link
Copy Markdown
Member

Fixes #419. Replaces #420. Stacked on #447: review only the last commit.

Cause: HttpPushSender sent an Authorization header only for Bearer and Basic and silently dropped the credentials of every other scheme. §4.3.3 requires the agent to include the configured credentials.

Fix: any scheme is sent as <scheme> <credentials>; bearer and basic keep their canonical spelling. Because the scheme now opens the header, one that is empty or contains whitespace or control characters is rejected with InvalidParams, next to the existing CR/LF check on the credentials.

Review focus: this changes what the server puts in a header sent to a client-chosen URL. The credentials still come only from the client's own push config, and URL validation is untouched. The new comment says "single token (RFC 9110)", but the check is looser than the RFC token rule: it rejects whitespace and control characters only.

Tests: a local webhook records Authorization for bearer, Basic and DPoP; a second test rejects "", "Bearer x" and a CR/LF scheme. They replace a test that asserted only Ok against a closed port.

Unproven: the failure on main was not run locally. CI is the check.

@codecov

codecov Bot commented Nov 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@muscariello
muscariello force-pushed the stack/09-push-any-auth-scheme branch 2 times, most recently from 205ea97 to fc3fe17 Compare November 2, 2026 12:02
HttpPushSender sent an Authorization header only for Bearer and Basic and
silently dropped every other scheme, so a webhook expecting e.g. DPoP got
an unauthenticated request. Section 4.3.3 says the agent MUST include the
credentials of TaskPushNotificationConfig.authentication. Any scheme is now
sent as "<scheme> <credentials>"; Bearer and Basic keep their canonical
spelling, and a scheme that is not a single token is rejected like CR/LF in
the credentials.

Signed-off-by: gulldan <[email protected]>
@muscariello
muscariello force-pushed the stack/09-push-any-auth-scheme branch from fc3fe17 to 7d468f5 Compare November 2, 2026 14:28
@muscariello
muscariello removed this pull request from stack #442 November 2, 2026 15:00
@muscariello
muscariello added this pull request to stack #456 November 2, 2026 15:01
@muscariello
muscariello added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 8119d37 Nov 2, 2026
43 of 45 checks passed
@muscariello
muscariello deleted the stack/09-push-any-auth-scheme branch November 2, 2026 17:44
@github-actions github-actions Bot mentioned this pull request Nov 2, 2026
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.

[Bug]: push notifications drop the credentials of any scheme other than Bearer and Basic

3 participants