Skip to content

fix(watch): order repeated event filters for SigV4 verification - #399

Merged
houseme merged 1 commit into
mainfrom
overtrue/fix-watch-event-signing
Nov 2, 2026
Merged

houseme merged 1 commit into
mainfrom
overtrue/fix-watch-event-signing

Conversation

@overtrue

@overtrue overtrue commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Closes #392.

The default put,delete,get filters are sent as repeated events query parameters in that order. The AWS signer sorts encoded values, while RustFS's verifier preserves their wire order. The resulting canonical-query mismatch causes SignatureDoesNotMatch even with valid credentials.

Sort the encoded event values before building the URL. This keeps every requested filter and aligns both bucket and root watch requests with the signed order. Add a regression for the three default events at both scopes.

Validation: the new regression fails on main. An independent HTTP/SigV4 probe also reproduces exit code 4 before the fix; afterward it validates the signature and receives an object event, then deliberately interrupts the stream. cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, and cargo test --workspace pass with Rust 1.99.0 (1,954 passed; 2 existing ignored tests).

Signed-off-by: overtrue <anzhengchao@gmail.com>
@houseme
houseme merged commit 0e71546 into main Nov 2, 2026
17 checks passed
@houseme
houseme deleted the overtrue/fix-watch-event-signing branch November 2, 2026 17:04
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.

rc watch always faild with 403

2 participants