Repository navigation
Add pagination support for Collection APIs - #6378
itsmevichu wants to merge 11 commits into
Conversation
Signed-off-by: Vishnutheep B <vishnutheep@gmail.com>
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit 2a631dd. ⛔ Hard block: Issues at High severity or above will block this PR from merging.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
PR Reviewer Guide 🔍(Review updated until commit 3b6474f)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 3b6474f Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 93769ed
Suggestions up to commit 8f9ede6
Suggestions up to commit 94a2be6
Suggestions up to commit 6fe9022
Suggestions up to commit 6fe9022
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6378 +/- ##
==========================================
+ Coverage 75.98% 76.07% +0.08%
==========================================
Files 466 471 +5
Lines 31128 31269 +141
Branches 4694 4715 +21
==========================================
+ Hits 23654 23789 +135
- Misses 5301 5306 +5
- Partials 2173 2174 +1
🚀 New features to boost your workflow:
|
Signed-off-by: Vishnutheep B <vishnutheep@gmail.com>
Signed-off-by: Vishnutheep B <vishnutheep@gmail.com>
Signed-off-by: Vishnutheep B <vishnutheep@gmail.com>
Signed-off-by: Vishnutheep B <vishnutheep@gmail.com>
|
Persistent review updated to latest commit 3585239 |
Signed-off-by: Vishnutheep B <vishnutheep@gmail.com>
|
Persistent review updated to latest commit 6fe9022 |
1 similar comment
|
Persistent review updated to latest commit 6fe9022 |
Signed-off-by: Vishnutheep B <vishnutheep@gmail.com>
|
Persistent review updated to latest commit 94a2be6 |
|
Persistent review updated to latest commit 8f9ede6 |
|
Persistent review updated to latest commit 93769ed |
Signed-off-by: Vishnutheep B <vishnutheep@gmail.com>
|
@cwperks @DarshitChanpura Could you please review this PR when you get a chance? It’s been inactive for a while, and I’d really appreciate your feedback. Thanks! |
|
Persistent review updated to latest commit 3b6474f |
I will take a look this week. Sorry for delay. Ty for taking this on, its certainly something that I think can be done more broadly for any category of configuration. |
|
@itsmevichu one high-level comment: How would pagination work for APIs that may support a filter? I think that Same on |
Description
Large deployments can have thousands of security configuration entities (users, roles, mappings, etc.). Returning everything in one response creates unbounded payloads. This PR adds opt-in cursor-based pagination to the six Security configuration collection APIs, using the same surface contract (size, sort, next_token) as OpenSearch core's _list APIs.
Without pagination parameters, all six collection endpoints behave identically to before — fully backward compatible.
With the new opt-in parameters, responses use a paginated envelope:
Affected endpoints: internalusers, roles, rolesmapping, actiongroups, tenants, nodesdn.
Pagination applies after authorization and redaction — hidden entities cannot leak through page contents or cursor values.
Cursors are bound to endpoint and sort direction; misuse returns 400.
Pagination params on single-entity GETs return 400.
Lexicographic cursor continuation - safe across additions and deletions between page requests.
Issues Resolved
#6339
Is this a backport? If so, please add backport PR # and/or commits #, and remove
backport-failedlabel from the original PR.Do these changes introduce new permission(s) to be displayed in the static dropdown on the front-end? If so, please open a draft PR in the security dashboards plugin and link the draft PR here
Testing
Unit tests, Integration tests and manual testing.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.