Repository navigation
[server] Add ACL support for consumer groups - #5073
Conversation
5aa65f6 to
14f8da9
Compare
wuchong
left a comment
There was a problem hiding this comment.
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?
14f8da9 to
a18ff81
Compare
a18ff81 to
3a1f7b0
Compare
|
Please fix the test coverage: 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
3a1f7b0 to
8390dcf
Compare
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
8390dcf to
bf24074
Compare
|
The group I opened #5216 to track filtering the all-offsets response by table |
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
ID validation across RPC and ACL entry points.
listing ACLs.
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.
and ConsumerOffsetTableITCase: 48 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.