[server] Enforce access control on admin API routes - #19233
Draft
xiangfu0 wants to merge 1 commit into
Draft
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19233 +/- ##
============================================
- Coverage 66.97% 57.78% -9.20%
+ Complexity 1417 1 -1416
============================================
Files 3453 2657 -796
Lines 218858 159207 -59651
Branches 34787 26115 -8672
============================================
- Hits 146591 91999 -54592
+ Misses 60556 59393 -1163
+ Partials 11711 7815 -3896
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
xiangfu0
force-pushed
the
xiangfu0/server-admin-auth-coverage
branch
from
August 13, 2026 09:04
1f0d91b to
70348bb
Compare
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.
Summary
AccessControlFactorycentrally across the admin listenerThe inventoried boundary is 3 public JAX-RS declarations, 2 table-data declarations, 48 privileged JAX-RS declarations, and 3 privileged static-handler prefixes. New or custom routes fail closed as privileged unless the built-in classification is deliberately extended.
Root cause and reproduction
The Server admin application bound an
AccessControlFactory, but only handlers that explicitly performed table-data authorization consulted it. As a result, configuring Server access control did not consistently cover non-table administrative operations.To reproduce the previous behavior, configure a Server access-control factory and send an unauthenticated request to a non-table administrative operation. The request could reach the resource without consulting the configured factory. With this change, missing or invalid credentials receive 401, authenticated identities without administrative authority receive 403, and authorized administrators succeed.
Compatibility
AllowAllAccessFactorypreserves the unconfigured/default behavior.authorizeAdminAccessSPI method defaults to deny, so custom implementations remain binary compatible and must opt into administrative access explicitly.adminpermission; ZK-backed authentication requires roleADMINand componentSERVER.Validation
spotless:apply,license:format,checkstyle:check, andlicense:checkpassed for all affected modules.test-compilepassed for all affected modules.git diff --checkpassed.