[hotfix] Add missing authentication for CoordinatorService RPC calls#2359
Open
LiebingYu wants to merge 1 commit intoapache:mainfrom
Open
[hotfix] Add missing authentication for CoordinatorService RPC calls#2359LiebingYu wants to merge 1 commit intoapache:mainfrom
LiebingYu wants to merge 1 commit intoapache:mainfrom
Conversation
Contributor
Author
|
Hi @luoyuxia @swuferhong. Could you help review this? |
a6ce397 to
28ce576
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This hotfix adds missing authentication checks for CoordinatorService RPC calls, specifically targeting lake-related operations and internal server-to-server communications. The PR introduces two new helper methods to standardize authorization patterns across the codebase.
Changes:
- Added
authorizeInternal()method to restrict certain RPC calls to internal connections only (server-to-server communication) - Added
authorizeCluster()method to simplify cluster-level authorization checks - Applied authentication to previously unprotected lake-related RPC endpoints (
prepareLakeTableSnapshot,commitLakeTableSnapshot,lakeTieringHeartbeat) - Applied authentication to internal RPC endpoints (
adjustIsr,commitKvSnapshot,commitRemoteLogManifest,controlledShutdown) - Simplified existing authorization code by replacing inline checks with helper method calls
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| fluss-server/src/main/java/org/apache/fluss/server/RpcServiceBase.java | Added two new authorization helper methods: authorizeCluster() for cluster-level operations and authorizeInternal() for internal-only requests |
| fluss-server/src/main/java/org/apache/fluss/server/coordinator/CoordinatorService.java | Applied authentication to 7 RPC methods: 3 internal operations, 3 lake operations, and simplified 4 existing authorization checks |
| fluss-client/src/test/java/org/apache/fluss/client/security/acl/FlussAuthorizationITCase.java | Added comprehensive test coverage for all newly protected RPC endpoints, verifying both rejection of unauthorized requests and successful authorized access |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Purpose
Linked issue: close #xxx
Brief change log
Add missing authentication for RPC calls in
CoordinatorService. Mainly for lake related RPC calls and simplify the rebalance authentication.Tests
API and Format
Documentation