Skip to content

[server] Filter all-offset responses by table describe permission - #5219

Merged
wuchong merged 1 commit into
apache:mainfrom
pisceslj:fix/consumer-offset-all-offsets-table-acl
Nov 13, 2026
Merged

wuchong merged 1 commit into
apache:mainfrom
pisceslj:fix/consumer-offset-all-offsets-table-acl

Conversation

@pisceslj

Copy link
Copy Markdown
Contributor

Filter all-offset consumer offset fetches by the caller's DESCRIBE permission on each source table, omitting unauthorized tables. Add integration coverage for mixed table permissions, no visible tables, and missing group permission, and update the authorization guide.

Purpose

Linked issue: close #5216

Fix an authorization gap in GET_CONSUMER_OFFSETS. When allOffsets is enabled, the response previously returned committed offsets for every source table in the group, including tables the caller did not have DESCRIBE permission on. This could expose table IDs, bucket IDs, committed offsets, and offset metadata.

Brief change log

  • Keep the existing consumer-group DESCRIBE authorization check for both request forms.
  • For allOffsets requests, filter the returned offsets by the caller’s effective DESCRIBE permission on each source table.
  • Omit unauthorized source tables entirely instead of failing the whole request.
  • Return an empty successful response when the caller can describe the group but none of its source tables.
  • Preserve the existing behavior for explicitly requested buckets: every requested source table still requires DESCRIBE.
  • Update the authorization guide to document the filtered allOffsets behavior.

Tests

  • ConsumerOffsetFetchAuthorizationITCase
    • testAllOffsetsOmitUnauthorizedSourceTables
    • testAllOffsetsReturnsEmptyWhenCallerCannotDescribeAnySourceTable
    • testAllOffsetsRequiresGroupDescribePermission
    • testSelectedFetchRequiresSourceDescribePermission

Filter all-offset consumer offset fetches by the caller's DESCRIBE permission on each source table, omitting unauthorized tables. Add integration coverage for mixed table permissions, no visible tables, and missing group permission, and update the authorization guide.

@wuchong wuchong left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@wuchong
wuchong merged commit f241df4 into apache:main Nov 13, 2026
21 checks passed
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] Filter consumer group offsets by source-table DESCRIBE permission

2 participants