Repository navigation
fix(zk-tls): refuse a policy redaction that selects nothing - #293
Conversation
fa12350 to
9b3c6d5
Compare
|
Nit on wording in the two prose spots: "refuses a redaction with no non-empty
-`zkFetchPolicySchema` refuses a redaction with no non-empty `regex`, `jsonPath` or `xPath`. Reclaim's attestor-core refused such a redaction on every prove, so a policy that has one now fails when the client starts.
+`zkFetchPolicySchema` refuses an empty redaction: one whose `regex`, `jsonPath` and `xPath` are all absent or empty. Reclaim's attestor-core refused such a redaction on every prove, so a policy that has one now fails when the client starts.
-signed rules carry them is refused too. It also refuses a redaction with no
-non-empty `regex`, `jsonPath` or `xPath`, which Reclaim would refuse on every
-prove.
+signed rules carry them is refused too. It also refuses an empty redaction,
+whose `regex`, `jsonPath` and `xPath` are all absent or empty, which Reclaim
+would refuse on every prove."A redaction needs a non-empty One thing that tripped me up reading this: the paragraph just above says the selected slices are "the only parts of the response the witness, and so the evidence, ever sees". That isn't true for |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Summary
Part of #211, split out of #248. Stack: #291 → #292 → #293 → #294; merge in that order. Based on #292.
zkFetchPolicySchemaaccepted a redaction that selects nothing:{},{ regex: '' }, or all three keys empty. Reclaim's attestor-core then threwExpected either xPath, jsonPath or regex for redactionon every prove with a 2xx response. I checked that offline against the installed attestor-core 5.1.6. The schema now refuses it:The dApp guide says so. It also fixes a typo there: the escape for a literal
*in a body is*, and the guide showed a bare*.Evidence
Before:
zkFetchPolicySchema.parseacceptedresponseRedactions: [{}].After: this passes in
law.test.ts:Build, types, Biome and the full suite pass with the stack up to this PR: 770 passed, 4 skipped (the opt-in live checks).
No verification skill in this repo.
Merge Danger
Door: two-way
Blast Radius: zk-tls consumers
A policy with an empty redaction now fails when the client or attestor parses it. Before, it failed on every prove.