Repository navigation
test(conformance): reject unseparated auth-params and non-token values (mppx#1349) - #403
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
… an empty extension value
|
Revised: removed the new version gate on unescaped_quotes_in_description (whether strict parsers keep accepting it is a separate open decision), and moved error_empty_unquoted_value to an empty extension param (ext=,) so the required-realm check cannot make it pass by itself. The four new vectors pass against the mpp-rs, pympp and mpp-go fix branches, and mppx 0.22.1 rejects the ext= case. |
There was a problem hiding this comment.
Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.
Apart from the inline finding, I also checked the typescript >=0.22.0 gate, which differs from the > gates on nearby vectors. It works: matches_constraint in conformance/scripts/version_constraints.py parses gates with npm-style NpmSpec, which accepts >=. The four new vector names are unique within vectors/. I didn't confirm that each adapter SDK rejects these inputs at the gated versions, because their parsers aren't in this checkout and nothing was run.
Extended reasoning...
The change adds four parse_error vectors to conformance/vectors/www-authenticate.json and does not touch auth, crypto or data-exposure code. The >= gate was checked by reading the harness's constraint parser, which accepts npm-style operators. Whether each SDK rejects these inputs can't be settled by reading this repository.
There was a problem hiding this comment.
LGTM. The latest commit moves the unseparated token onto an extension param after all the required params, which resolves my earlier comment. Each of the four vectors now fails only on the rule it names.
What was reviewed:
- Wire strings: id, realm, method, intent and request are valid in every case, so a lenient parser would accept them. Only the comma check or the token check can reject them. In JSON,
realm=api\\v1decodes to a single backslash on the wire. - sdkVersions gating: each range starts above the current pins (mppx 0.21.1, pympp 0.26.0, mpp-go v0.9.1, mpp-rs 0.21.0), so the pinned suites skip these vectors. None of the four names appears elsewhere in the file.
- Not done: AGENTS.md asks that the affected adapters and the full suite pass. That needs a run, and none was run in this review.
Extended reasoning...
The change adds four negative parse_error vectors to conformance/vectors/www-authenticate.json. It is test data only, with no adapter, schema or SDK code, and touches no security-sensitive surface. The ranges match the pins in the adapter manifests, so no current suite runs the new cases. My earlier inline concern about the missing-comma vector is addressed by commit 8a579e7. No CODEOWNERS or OWNERS file covers the path.
Motivation
mppx#1349 makes
Challenge.deserializefollow the auth-param list grammar: auth-params must be separated byOWS "," OWS, and an unquoted value must be a token (token = 1*tchar, RFC 9110). The suite already covers quoted values without commas and text after a closing quote; it has no case for unquoted (token) values.Summary
Adds four
parse_errorvectors tovectors/www-authenticate.json, mirroring the mppx tests:error_unquoted_value_without_comma:method=tempo realm="api.example.com"error_unquoted_value_with_slash:realm=api/v1error_unquoted_value_with_backslash:realm=api\v1error_empty_unquoted_value:ext=,(an extension param, so the required-realm check cannot mask it)unescaped_quotes_in_descriptionis left unchanged: whether strict parsers keep accepting it is an open maintainer decision, tracked separately.Key design considerations
sdkVersionsandadapters(typescript, rust, python, go): typescript>=0.22.0(the first mppx release with #1349); rust>0.22.0, python>0.26.0, go>0.10.1, since their fixes are not released yet. The new cases start running as each pin moves past those versions.Verification:
make test-typescriptpasses on the pinned mppx 0.21.1 and on mppx 0.22.1 for the new cases; the new cases pass against the SDK fix branches viamake use-local-sdk+make test-sdkfor Rust, Python and Go; pinned Rust, Python and Go suites still pass.SDK fixes: tempoxyz/mpp-rs#758 · tempoxyz/pympp#464 · tempoxyz/mpp-go#342
Propagated from wevm/mppx#1349 (8a31e2d6083b741bfa2c5492cd1d317cdf931a23) by Agricola.