Skip to content

test(conformance): reject unseparated auth-params and non-token values (mppx#1349) - #403

Merged
brendanjryan merged 3 commits into
mainfrom
agricola/mppx-1349
Nov 29, 2026
Merged

brendanjryan merged 3 commits into
mainfrom
agricola/mppx-1349

Conversation

@brendanjryan

@brendanjryan brendanjryan commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Source: wevm/mppx#1349 (merge commit 8a31e2d)

Motivation

mppx#1349 makes Challenge.deserialize follow the auth-param list grammar: auth-params must be separated by OWS "," 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_error vectors to vectors/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/v1
  • error_unquoted_value_with_backslash: realm=api\v1
  • error_empty_unquoted_value: ext=, (an extension param, so the required-realm check cannot mask it)

unescaped_quotes_in_description is left unchanged: whether strict parsers keep accepting it is an open maintainer decision, tracked separately.

Key design considerations

  • Gated with sdkVersions and adapters (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.
  • No adapter or ABI changes.

Verification: make test-typescript passes 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 via make use-local-sdk + make test-sdk for 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T15:32:06.376121Z f10175e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Collaborator Author

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.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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\\v1 decodes 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.

@brendanjryan
brendanjryan merged commit 10c7903 into main Nov 29, 2026
25 checks passed
@brendanjryan
brendanjryan deleted the agricola/mppx-1349 branch November 29, 2026 16:22
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