Skip to content

[server] Add ACL support for consumer groups - #5073

Merged
wuchong merged 3 commits into
apache:mainfrom
pisceslj:feature/fip-53-consumer-group-acl-main
Nov 13, 2026
Merged

wuchong merged 3 commits into
apache:mainfrom
pisceslj:feature/fip-53-consumer-group-acl-main

Conversation

@pisceslj

@pisceslj pisceslj commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #5071
Part of #4608.

Add consumer group ACLs so administrators can manage group permissions
independently of database and table permissions. Require group DESCRIBE
permission before owner discovery initializes the consumer-offset system table.

Brief change log

  • Add GROUP resources with cluster permission inheritance and consistent group
    ID validation across RPC and ACL entry points.
  • Enforce group DESCRIBE permission for FIND_CONSUMER_GROUP_OWNER.
  • Support group resources in Flink ACL procedures and preserve their names when
    listing ACLs.
  • Cover permission isolation, inheritance, persistence, synchronization,
    validation, and SQL ACL operations with tests.

Tests

Targeted Maven verify completed with JDK 11 for the affected modules. The client
dependency was rebuilt so Flink tests used the updated common classes.

  • ConsumerGroupUtilsTest and ResourceTest: 43 cases.
  • DefaultAuthorizerTest, GroupManagerTest, ConsumerGroupAuthorizationITCase,
    and ConsumerOffsetTableITCase: 48 cases.
  • AbstractAclProcedureTest: 19 cases.
  • Flink120ProcedureITCase ACL methods: 8 cases.
    All 118 distinct cases passed. Checkstyle, Spotless for the changed Java files,
    license header checks, and git diff --check passed. The reserved-prefix error
    message test was confirmed to fail before the correction and pass afterward.

API and Format

Adds ResourceType.GROUP with resource code 5 and Resource.group(String).
Existing resource codes and RPC message schemas remain unchanged. Group ACLs
use the existing ACL persistence format.
Group ID validation becomes stricter: IDs must contain 1 to 200 ASCII letters,
digits, underscores, or hyphens and must not start with __. The * name is
accepted only as an ACL resource.

Documentation

Updates website/docs/security/authorization.md with group resource semantics,
naming rules, owner discovery permissions, and Flink ACL syntax.

@pisceslj
pisceslj force-pushed the feature/fip-53-consumer-group-acl-main branch 5 times, most recently from 5aa65f6 to 14f8da9 Compare November 10, 2026 05:16

@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.

I think GROUP should be a cluster-scoped resource, alongside DATABASE. The existing ACL hierarchy lets a CLUSTER grant apply to databases and tables for the same operation. I’d extend that rule to consumer groups as well. For example, READ on CLUSTER should imply READ on every group, while READ on a specific group should remain scoped to that group. Database and table grants would continue to apply only within their own hierarchy.

Could we update the resource hierarchy, tests, and documentation to reflect this?

Comment thread website/docs/security/authorization.md Resolved
Comment thread website/docs/security/authorization.md Resolved
Comment thread website/docs/security/authorization.md Resolved
Comment thread website/docs/security/authorization.md Resolved
Comment thread website/docs/security/authorization.md Resolved
Comment thread website/docs/security/authorization.md Resolved
Comment thread website/docs/security/authorization.md Resolved
Comment thread website/docs/security/authorization.md Resolved
Comment thread website/docs/security/authorization.md Resolved
@pisceslj
pisceslj force-pushed the feature/fip-53-consumer-group-acl-main branch from 14f8da9 to a18ff81 Compare November 12, 2026 10:13
@pisceslj pisceslj closed this Nov 12, 2026
@pisceslj pisceslj reopened this Nov 12, 2026
@pisceslj
pisceslj force-pushed the feature/fip-53-consumer-group-acl-main branch from a18ff81 to 3a1f7b0 Compare November 12, 2026 12:40
@wuchong

wuchong commented Nov 12, 2026

Copy link
Copy Markdown
Member

Please fix the test coverage: [WARNING] Rule violated for class org.apache.fluss.security.acl.ResourceFilter: lines covered ratio is 0.68, but expected minimum is 0.70.

Others LGTM.

Add GROUP resources and require DESCRIBE permission for consumer group
owner discovery before initializing the consumer-offset system table.

Validate group IDs consistently across RPC and ACL entry points, and
support group resources in Flink ACL procedures. Add tests for permission
inheritance, persistence, invalid group IDs, and SQL ACL operations.

Refs apache#4608
Keep consumer-group permissions independent of cluster permissions and
require cluster permissions to manage Group ACLs.

Add authorizer.group-acl-bypass.enabled to skip Group operation checks in
the default authorizer while preserving table authorization, group ID
validation, and ACL administration. Cover both modes and document the
configuration.

Refs apache#5071
Generated-by: JoyCode
Model GROUP as a Cluster child and reuse the generic ACL authorization paths. Introduce GroupId to validate concrete group IDs before authorization, add explicit database/table/group resource syntax to the Flink ACL procedures, and bump ListAcls and DropAcls to v1 so v0 responses omit GROUP entries for older clients.

Refs apache#4608

Generated-by: JoyCode
@pisceslj
pisceslj force-pushed the feature/fip-53-consumer-group-acl-main branch from 8390dcf to bf24074 Compare November 13, 2026 06:10
@wuchong
wuchong merged commit a45f227 into apache:main Nov 13, 2026
21 checks passed
@wuchong

wuchong commented Nov 13, 2026

Copy link
Copy Markdown
Member

The group DESCRIBE check now covers both forms of GET_CONSUMER_OFFSETS. One table-level gap remains after the merge: explicit fetches check each source table, while the all-offsets response can include committed offsets and metadata for tables the caller cannot describe.

I opened #5216 to track filtering the all-offsets response by table DESCRIBE, as Kafka does for topics. A caller with access to only some tables should see only those tables. If none are visible, the fetch should succeed with an empty result. Kafka 3.6 implementation

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 ACL support for consumer groups

2 participants