Search interop runner compares results as JSON strings, so member order decides PASS/FAIL
Maintainers usually reply within 1 day
Nobody has claimed this yet.
- #736 by @nikhilred2619 — closed without merging
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- node.js, typescript
Research direction
Start in interop/authzen-search-demo/test-harness/src/runner.ts and inspect how the sorted results are serialized and compared. Preserve the null-stripping behavior while comparing parsed values rather than JSON strings, then run the interop search cases and confirm that equivalent member orders pass, including the Subject and Resource Search cases.
Written by the indexing model from the issue text.
Description
interop/authzen-search-demo/test-harness/src/runner.ts sorts the actual and expected results arrays, then compares them as strings:
const actualJson = JSON.stringify(sortedActualResults, (_, value) => value === null ? undefined : value);
const expectedjson = JSON.stringify(sortedExpectedResults, (_, value) => value === null ? undefined : value);
return actualJson === expectedjson ? "PASS" : "FAIL"
JSON.stringify keeps the member order of the parsed response, so a PDP that returns {"id": "alice", "type": "user"} fails a case that expects {"type": "user", "id": "alice"}. RFC 8259 Section 4 defines an object as an unordered collection, and Section 8 of the Authorization API does not constrain member order in results.
This fails all 78 Subject and Resource Search cases (of 198) for a PDP whose encoder sorts keys, which is the default for Go maps. Action Search is not affected since its entities only have name.
Comparing the parsed values instead, for example with util.isDeepStrictEqual from Node, removes the dependency on member order. The null-stripping replacer can still be applied first.
- Dominant language
- TypeScript
- Stars
- 170
- Forks
- 46
- Avg merge
- 18h 5m
- Merged PRs (30d)
- 43
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openid/authzen
-
Certification Scenario §7.2.2, §7.3.2 and §7.4.2: identical results, or identical fixture results?Possibly taken @alexolivier claimed this 3 days ago. Openauthorization-api certification
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
certification
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openid/authzen#640 · 1 comment ·
Maintainers usually reply within 1 day
-
access-requests
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
openid/authzen#578 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
openid/authzen#789 · 2 comments ·
Maintainers usually reply within 1 day
Similar issues
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
🎙️ task - drop the raw `./node_modules/.bin/rhachet roles boot` line from bhuild's feedback templateOpen
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ehmpathy/rhachet-roles-bhuild#639 ·
Maintainers usually reply within 1 day
-
e2e-failure ready-to-code
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
redhat-developer/rhdh-plugin-export-overlays#4650 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 13 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
omdsh-dev/DSH-better-sidebar#1098 ·
Maintainers usually reply within 2 days