Skip to content

[server] Add authorization to Remote Log & Tiering RPCs#3301

Open
vaibhavk1992 wants to merge 3 commits into
apache:mainfrom
vaibhavk1992:add-remote-log-tiering-authorization
Open

[server] Add authorization to Remote Log & Tiering RPCs#3301
vaibhavk1992 wants to merge 3 commits into
apache:mainfrom
vaibhavk1992:add-remote-log-tiering-authorization

Conversation

@vaibhavk1992
Copy link
Copy Markdown
Contributor

Summary

Changes

Server Side

TabletService.java:

  • notifyRemoteLogOffsets - Added CLUSTER/WRITE authorization check

CoordinatorService.java:

  • commitRemoteLogManifest - Added CLUSTER/WRITE authorization check
  • lakeTieringHeartbeat - Added CLUSTER/WRITE authorization check

Test Coverage

FlussAuthorizationITCase.java:

  • Added testRemoteLogAndTieringAuthorization() with comprehensive coverage:
    • Authorization denial tests (no permission) - verifies AuthorizationException for all 3 operations
    • Authorization success tests (with permission) - verifies operations succeed after CLUSTER/WRITE permission granted
    • Internal session bypass tests - verifies internal server calls automatically bypass authorization

Technical Details

These are internal server-to-server RPCs used for remote log tiering and lake tiering operations:

  • notifyRemoteLogOffsets: TabletServers receive notifications about remote log tier offsets from CoordinatorServer
  • commitRemoteLogManifest: TabletServers commit remote log manifests to CoordinatorServer
  • lakeTieringHeartbeat: Lake tiering service sends heartbeats to CoordinatorServer for monitoring

The authorization prevents external clients from calling internal cluster management APIs while allowing legitimate internal operations via session.isInternal() bypass.

All operations use CLUSTER/WRITE permission type because they modify cluster-wide tiering state, consistent with other internal cluster management operations.

Test Plan

  • Compiled successfully: mvn compile test-compile -pl fluss-server,fluss-client -am
  • All authorization checks follow existing patterns from rebalance/ISR/snapshot operations
  • Tests verify complete authorization lifecycle: denial → grant → success

Closes #3251

vaibhav kumar and others added 3 commits May 11, 2026 16:28
This commit adds CLUSTER/WRITE authorization checks for remote log and
tiering internal RPCs as specified in issue apache#3251:

Server Changes:
- TabletService: Add authorization to notifyRemoteLogOffsets
- CoordinatorService: Add authorization to commitRemoteLogManifest and lakeTieringHeartbeat
- All methods check CLUSTER/WRITE permission before processing requests
- Internal sessions automatically bypass authorization via session.isInternal()

Test Coverage:
- Add comprehensive test testRemoteLogAndTieringAuthorization()
- Test 1-3: Verify AuthorizationException when client lacks CLUSTER/WRITE permission
- Test 4: Grant CLUSTER/WRITE permission and verify operations succeed
- Test 5: Verify internal server-to-server calls bypass authorization
- Tests all 3 remote log/tiering operations with complete authorization lifecycle

These are internal server-to-server RPCs used for:
- notifyRemoteLogOffsets: Notify TabletServers about remote log tier offsets
- commitRemoteLogManifest: Commit remote log manifests to CoordinatorServer
- lakeTieringHeartbeat: Lake tiering service heartbeats to CoordinatorServer

The authorization prevents external clients from calling internal cluster
management APIs while allowing legitimate internal operations to proceed.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…st objects

The test was failing because Protocol Buffer request objects require certain
fields to be set before validation. Added required fields to all remote log
and tiering RPC requests:

- NotifyRemoteLogOffsetsRequest: tableId, bucketId, coordinatorEpoch, remoteStartOffset, remoteEndOffset
- CommitRemoteLogManifestRequest: tableId, bucketId, remoteLogManifestPath, remoteLogStartOffset, remoteLogEndOffset, coordinatorEpoch, bucketLeaderEpoch
- LakeTieringHeartbeatRequest: (no required fields)

This ensures requests pass validation and reach the authorization check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[server] Add authorization to Remote Log & Tiering RPCs (commitRemoteLogManifest, notifyRemoteLogOffsets, lakeTieringHeartbeat)

1 participant