Repository navigation
fix(api_v2): REST API v2 defects found by the OpenFn adaptor (#554) #555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
c501599
test(spp_api_v2_programs): add failing tests for unambiguous membersh…
gonzalesedwin1123 fc9d419
fix(spp_api_v2_programs): address program memberships unambiguously (…
gonzalesedwin1123 9ca16c0
test(spp_api_v2): add failing tests for fail-closed search filters (#…
gonzalesedwin1123 370e07f
fix(spp_api_v2): make search filters fail closed (#554)
gonzalesedwin1123 d6d0b9d
test(spp_api_v2): add failing tests that returned references can be f…
gonzalesedwin1123 cc4b2f6
fix(spp_api_v2): build followable references from the id type's code …
gonzalesedwin1123 d19e5d8
test(spp_api_v2): add failing tests that ending a membership now is i…
gonzalesedwin1123 91d20fc
fix(spp_api_v2): end memberships on the ORM clock so removal is immed…
gonzalesedwin1123 10b6cfc
test(spp_api_v2): add failing tests for ambiguous and in-use identifi…
gonzalesedwin1123 a0ef75f
fix(spp_api_v2): resolve identifiers to exactly one registrant (#554)
gonzalesedwin1123 55d8933
test(spp_api_v2): add failing tests for staff-review findings on #554
gonzalesedwin1123 d01e218
fix(spp_api_v2): address staff-review findings on #554
gonzalesedwin1123 2193218
docs(spp_api_v2, spp_api_v2_programs): regenerate README from CI (#554)
gonzalesedwin1123 24bbf26
fix(spp_api_v2): apply _offset in GET /Group search (#554)
gonzalesedwin1123 b1895c1
docs(spp_api_v2): regenerate README from CI (#554)
gonzalesedwin1123 2a7b61d
test(spp_api_v2_programs): GET /Program without scope must be 403, no…
gonzalesedwin1123 d70a43e
test(spp_api_v2): PATCH /Individual gender must update and reject unk…
gonzalesedwin1123 7f484e4
test(spp_api_v2): unknown membership role must be rejected on add/upd…
gonzalesedwin1123 b30d1c3
test(spp_api_v2_programs): membership search fails closed; duplicate …
gonzalesedwin1123 da2bcee
test(spp_api_v2): group= and membership-role= must hold on the same m…
gonzalesedwin1123 af9a89e
test(spp_api_v2): consent-filtered paging must not skip rows or stop …
gonzalesedwin1123 913052b
fix(spp_api_v2_programs): GET /Program without scope returns 403, not…
gonzalesedwin1123 ddaf59e
fix(spp_api_v2): PATCH /Individual updates gender and rejects unknown…
gonzalesedwin1123 9505964
fix(spp_api_v2): group= and membership-role= match on the same member…
gonzalesedwin1123 0a8bda9
fix(spp_api_v2): reject unknown membership role codes on add/update m…
gonzalesedwin1123 5b79734
fix(spp_api_v2_programs): membership search fails closed; duplicate e…
gonzalesedwin1123 39329fb
fix(spp_api_v2): consent-filtered pages no longer skip rows or drop n…
gonzalesedwin1123 c0dcef7
docs(spp_api_v2, spp_api_v2_programs): HISTORY for #554 items K-Q
gonzalesedwin1123 0c7802d
test(spp_api_v2, spp_api_v2_programs): review round for #554 J-Q (S1 …
gonzalesedwin1123 5022165
fix(spp_api_v2, spp_api_v2_programs): never count hidden records in s…
gonzalesedwin1123 f260c8d
fix(spp_api_v2, spp_api_v2_programs): 409 only for the membership con…
gonzalesedwin1123 da2815f
fix(spp_api_v2): gender accepts only ISO 5218 codes on create and PAT…
gonzalesedwin1123 6643862
docs(spp_api_v2, spp_api_v2_programs): HISTORY for the #554 review round
gonzalesedwin1123 edd89d7
test(spp_api_v2): legal-basis clients keep the exact GET /Group total…
gonzalesedwin1123 038745c
docs(spp_api_v2, spp_api_v2_programs): HISTORY states only the total …
gonzalesedwin1123 5d1f80d
docs(spp_api_v2, spp_api_v2_programs): regenerate README from CI (#554)
gonzalesedwin1123 56df5df
docs(spp_api_v2): HISTORY example lists only messages the API can ret…
gonzalesedwin1123 c219df9
docs(spp_api_v2): regenerate README from CI (#554)
gonzalesedwin1123 27bc12a
fix(spp_api_v2): decide consent by legal basis on not-found paths too…
gonzalesedwin1123 a848f78
fix(spp_api_v2_programs): keep an archived beneficiary's memberships …
gonzalesedwin1123 9b102b4
fix(spp_api_v2): only say an identifier is ambiguous in bundles to a …
gonzalesedwin1123 783a1d5
fix(spp_api_v2): keep identifier values out of bundle logs (#555 review)
gonzalesedwin1123 8cbfb20
refactor(spp_api_v2): read one list of non-consent legal bases (#555 …
gonzalesedwin1123 8c8a00b
refactor(spp_api_v2_programs): one versionId formula for the ETag and…
gonzalesedwin1123 8a87845
perf(spp_api_v2_programs): refuse an ambiguous membership without cou…
gonzalesedwin1123 3f7e889
refactor(spp_api_v2_programs): parse search filters with the referenc…
gonzalesedwin1123 4c7a533
refactor(spp_api_v2): drop lookup code nothing calls (#555 review)
gonzalesedwin1123 8dff435
fix(spp_api_v2): map member errors to a status by type, not message t…
gonzalesedwin1123 033859e
docs(spp_api_v2): changelog for the #555 review fixes
gonzalesedwin1123 89e8602
fix(spp_api_v2): log a malformed bundle resource by type too (#555 re…
gonzalesedwin1123 89d2178
docs(spp_api_v2): scope the consent and log changelog lines; name ret…
gonzalesedwin1123 632476a
docs(spp_api_v2): regenerate READMEs from CI (#555 review)
gonzalesedwin1123 6ac8ce3
docs(spp_api_v2): describe the anti-enumeration rule instead of citin…
kneckinator 8efece5
Merge branch '19.0' into fix-554-api-v2-openfn-defects
kneckinator File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The single-resource endpoints only say "ambiguous" to a client that may read every match (
ambiguous_identifier_status). This handler andBundleProcessor._create_error_response(bundle_service.py:584) return the 409 to anyone.A consent-filtered client can send a batch entry
GET Individual/{system}|{value}. It gets 409 when two registrants hold the value and the not-found answer when none do, so it learns the identifier exists, and is duplicated, for registrants it can't read. That's the leakraise_ambiguous_identifiercloses on/Individual/{id}.AmbiguousIdentifierErrorcarriespartners, so both places can useambiguous_identifier_status()and give the not-found answer when it says 403._create_error_responsewould need the client passed in for that.IdentifierInUseErroris a create-side conflict and can keep its 409.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 9b102b4.
ambiguous_identifier_status()says 403, theclient gets exactly the entry's not-found answer (same status and same diagnostics, apart from the value it sent).
_create_error_response(now passed the client) and the transaction path in the router.IdentifierInUseErrorkeeps its 409, and a client that may read every match still gets 409 (tested).