Repository navigation
[DT-3848][risk=no] Add the typed search request check (5b/6) - #3351
Open
otchet-broad wants to merge 2 commits into
Open
otchet-broad wants to merge 2 commits into
otchet-broad wants to merge 2 commits into
Conversation
Add TypedSearchRequestCheck, which checks a request against the contract and the registry key lists, and TypedSearchRequestTest, which checks that the status of each fixture fits the order of the checks: a scope that the roles cannot use gets 403 before any 400, a 400 request breaks a rule or names a serverCheck, and a 200 request breaks none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
otchet-broad
requested review from
fboulnois and
kevinmarete
and removed request for
a team
November 25, 2026 22:00
…t-check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kevinmarete
approved these changes
Nov 26, 2026
rushtong
approved these changes
Nov 27, 2026
rushtong
left a comment
Contributor
There was a problem hiding this comment.
Reviewed with Claude and Codex, no medium or high findings 👍
Low Findings
- Offset check is not exact:
src/test/java/org/broadinstitute/consent/http/typedsearch/TypedSearchRequestCheck.java:94An offset above the largestlongwraps and is rejected. An offset of1.0passes, butlimitmust be an integer. - Possible null pointer:
src/test/java/org/broadinstitute/consent/http/typedsearch/TypedSearchRequestCheck.java:107A scope with noscopeProjectionsentry makesrulenull, and the check throws.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Addresses
https://broadworkbench.atlassian.net/browse/DT-3848 (epic DT-4500)
Security risk: no — test files only; no application code or configuration changes.
Summary
Adds
TypedSearchRequestCheck, which checks a request against the contract (#3342) and the registry key lists: the scope (its value, the branded library keys, the scopes of each view and the roles that can use them), the fields each view accepts, filter keys and kinds (values, number and date ranges, booleans), facets, sort keys, page limits, and the projection allowed for each scope and role.TypedSearchRequestTestchecks that the status of each fixture fits the order of the checks in contract section 9: a scope that the roles cannot use gets 403 before any other 400; a 400 request breaks a rule of the check or names aserverCheck; any other request breaks none.Stacked on 5a (#3350); merge that first. This is slice 5b of 6 for DT-3848.
Have you read CONTRIBUTING.md lately? If not, do that first.
🤖 Generated with Claude Code