[server] Add authorization to listOffsets for TABLE/DESCRIBE operations#3298
Open
vaibhavk1992 wants to merge 1 commit into
Open
[server] Add authorization to listOffsets for TABLE/DESCRIBE operations#3298vaibhavk1992 wants to merge 1 commit into
vaibhavk1992 wants to merge 1 commit into
Conversation
Implements authorization checks for the listOffsets method as part of issue apache#3247. This completes authorization for all three table metadata read operations: - getTableSchema (already had authorization) - listPartitionInfos (already had authorization) - listOffsets (added in this commit) Changes: - Added authorizeTable(DESCRIBE, tableId) check in TabletService.listOffsets() - Removed TODO comment indicating this work was needed - Added comprehensive authorization tests in FlussAuthorizationITCase - Tests verify both authorization denial and success scenarios This ensures that clients must have DESCRIBE permission on a table before they can query offset information, preventing unauthorized access to table metadata. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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
Implements authorization checks for the
listOffsetsmethod to complete issue #3247.This PR adds TABLE/DESCRIBE authorization for the three table metadata read operations mentioned in the issue:
getTableSchema- Already had authorizationlistPartitionInfos- Already had authorizationlistOffsets- Added in this PRChanges
Server Implementation (
TabletService.java)authorizeTable(DESCRIBE, request.getTableId())check in thelistOffsetsmethodOperationType.DESCRIBEto follow existing code patternsTest Coverage (
FlussAuthorizationITCase.java)OffsetSpecclasstestDescribeTableOperationtest to includelistOffsetsauthorization testinglistOffsetsthrowsAuthorizationExceptionwhen user lacks DESCRIBE permissionlistOffsetssucceeds when user has DESCRIBE permissionTest Plan
fluss-serverandfluss-clientmodulesNote: Integration tests have a pre-existing SASL authentication environment issue (
Subject.getSubject()not supported) that affects all tests inFlussAuthorizationITCase, not just these changes. This is confirmed by testing the main branch without modifications. The CI pipeline should have the correct Java environment configuration.Related Issue
Closes #3247