DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
Status
Current state: "Under Discussion"
Discussion thread: https://lists.apache.org/thread/x1qn1k5qvcpv3k2brk209zp4w6ndbgjt
JIRA:
KAFKA-20144
-
Getting issue details...
STATUS
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
Motivation
KIP-1142 introduced the LIST_CONFIG_RESOURCES RPC as a way for clients to discover which Kafka resources have non-default configuration properties. It was built on top of KIP-1000, which originally added support for client-metrics resources.
The current implementation requires DESCRIBE_CONFIGS on the CLUSTER resource for all resource types (GROUP, TOPIC, BROKER, BROKER_LOGGER, CLIENT_METRICS). This creates an unintentional permission anomaly with other, well-established RPCs:
LIST_GROUPS: a user needs onlyDESCRIBEonCLUSTERto discover which consumer groups exist.
LIST_CONFIG_RESOURCESfor groups: the same user needs the elevatedDESCRIBE_CONFIGSonCLUSTERto discover which of those groups have custom configurations — a strictly weaker piece of information.
Similarly for topics:
METADATA: a user needs onlyDESCRIBEon a topic (orDESCRIBEonCLUSTER) to learn that a topic exists.
LIST_CONFIG_RESOURCESfor topics: the same user needsDESCRIBE_CONFIGSonCLUSTER.
This anomaly has a direct user-visible impact: kafka-configs.sh --describe --entity-type groups silently returns incomplete results for users who hold DESCRIBE on CLUSTER but not DESCRIBE_CONFIGS on CLUSTER. Specifically, groups that were configured via kafka-configs.sh --alter but have no active consumers are completely invisible to such users, because LIST_CONFIG_RESOURCES is the only RPC that can discover them.
This KIP introduces a new API version that aligns the authorization model with the actual semantics of the API and with existing peer APIs, eliminating the anomaly described above.
Public Interfaces
Changed authorization semantics for LIST_CONFIG_RESOURCES
A new API version (version 2) is introduced for LIST_CONFIG_RESOURCES (API key 74). The wire format is unchanged. The only change is the required ACL operation.
Version ≤ 1 (unchanged):
Protocol | ACL Operation | Resource Type | Notes |
|---|---|---|---|
LIST_CONFIG_RESOURCES (74) |
|
| Required for all resource types; |
Version 2+:
Protocol | ACL Operation | Resource Type | Notes |
|---|---|---|---|
LIST_CONFIG_RESOURCES (74) |
|
| Grants full listing of all requested resource types |
LIST_CONFIG_RESOURCES (74) |
|
| Per-resource fallback; returns only authorized groups |
LIST_CONFIG_RESOURCES (74) |
|
| Per-resource fallback; returns only authorized topics |
CLIENT_METRICS,BROKER, andBROKER_LOGGERare cluster-scoped resources and require cluster-levelDescribe. They are silently omitted if the caller lacks it.- In version 2, the response is always
NONE(success). Resources the caller is not authorized to see are silently omitted rather than returningCLUSTER_AUTHORIZATION_FAILED.
API version bump
ListConfigResourcesRequest.json valid versions updated from 0-1 to 0-2. The version comment is updated accordingly. No new fields are added.
Proposed Changes
KafkaApis.handleListConfigResources
Version ≤ 1: no change to existing behavior.
Version 2+:
Check
DESCRIBEonCLUSTER.If the check passes, return all requested resource types as today.
If the check fails:
For
GROUPandTOPIC: perform per-resourceDESCRIBEchecks. Return only the resources the caller is authorized to see.
For
CLIENT_METRICS,BROKER, andBROKER_LOGGER: silently omit these resource types from the response.
Always return
NONEas the top-level error code (noCLUSTER_AUTHORIZATION_FAILED).If the result set is empty and the caller holds
DescribeConfigsonCLUSTERbut notDescribeonCLUSTER, emit aDEBUG-level log message explaining thatDescribeConfigsonCLUSTERis not sufficient for version 2+ and that the caller must be grantedDescribeonCLUSTER(or per-resourceDescribeonGROUP/TOPIC) to receive results.
This mirrors the behavior of LIST_GROUPS (API key 16), which returns only the groups a caller is authorized to see rather than failing the entire request.
Diagnostics / logging
The broker and the kafka-configs.sh tool each emit a diagnostic message, but under different conditions because the tool operates as a plain client and cannot inspect which ACLs the principal holds.
Broker (KafkaApis) — DEBUG level
Emitted when the result set is empty and the broker has determined that the principal holds DescribeConfigs on CLUSTER but not Describe on CLUSTER. No message is emitted when the caller holds neither permission, because an empty result is the expected and correct outcome in that situation.
LIST_CONFIG_RESOURCES v2 returned an empty result. Grant Describe on CLUSTER (or per-resource Describe on GROUP/TOPIC) to receive results.
kafka-configs.sh (ConfigCommand) — WARN level
The tool receives only the response from the broker; it cannot determine why the result is empty. It therefore emits a warning unconditionally whenever the returned list is empty.
LIST_CONFIG_RESOURCES returned an empty result. Grant Describe on CLUSTER (or per-resource Describe on GROUP/TOPIC) to receive results.
Documentation
docs/security/authorization-and-acls.md
Replace the single-row entry for LIST_CONFIG_RESOURCES:
LIST_CONFIG_RESOURCES (74) | DescribeConfigs | Clusterwith:
LIST_CONFIG_RESOURCES (74) | Describe | Cluster
LIST_CONFIG_RESOURCES (74) | Describe | Group
LIST_CONFIG_RESOURCES (74) | Describe | Topic
docs/getting-started/upgrade.md
add under Notable changes in 4.4.0
LIST_CONFIG_RESOURCES(API key 74) version 2 changes the required ACL fromDESCRIBE_CONFIGSonClustertoDescribeonCluster. ForGROUPandTOPICresource types, per-resourceDescribeis also accepted and returns a filtered result set. Users who hold onlyDESCRIBE_CONFIGSonClustermust be grantedDescribeto use the new API version. Clients using API version ≤ 1 are unaffected. For further details, please refer to KIP-1298.
Compatibility, Deprecation, and Migration Plan
Wire format: unchanged. No new fields are added in version 2.
Behavioral change: version 2 requires Describe instead of DescribeConfigs. Clients that negotiate version 2 but whose principal holds only DESCRIBE_CONFIGS (and not DESCRIBE) will receive an empty success response rather than an authorization error.
Migration path:
- Upgrade brokers to the release that ships version 2 support.
- Grant
DescribeonCLUSTERto principals that currently hold onlyDESCRIBE_CONFIGSonCLUSTERand need to useLIST_CONFIG_RESOURCES. - Migrate clients to version 2.
Clients that remain on version ≤ 1 are completely unaffected; the old behavior is preserved indefinitely for those versions.
Test Plan
Unit tests:
v2, cluster DESCRIBE held: full result set returned for all resource types.
v2, only DESCRIBE_CONFIGS held: empty success response (no
CLUSTER_AUTHORIZATION_FAILED).
v2, per-resource fallback: caller holds
Describeon specific groups/topics but not onCLUSTER— only those resources are returned.
v2, cluster-scoped resources without cluster DESCRIBE:
CLIENT_METRICS,BROKER,BROKER_LOGGERsilently omitted.
v ≤ 1, DESCRIBE_CONFIGS held: full result set returned (existing behavior preserved).
v ≤ 1, DESCRIBE_CONFIGS denied:
CLUSTER_AUTHORIZATION_FAILEDreturned (existing behavior preserved).
Integration tests:
- End-to-end: principal with only
DESCRIBEonCLUSTERuseskafka-configs.sh --listand receives the full resource list. - End-to-end: principal with only per-resource
DESCRIBEon specific groups/topics receives a filtered list.
Rejected Alternatives
Make DESCRIBE imply DESCRIBE_CONFIGS at the ACL engine level
One might consider solving this by making DESCRIBE imply DESCRIBE_CONFIGS in the ACL implication chain (analogous to how ALTER already implies DESCRIBE). This would automatically allow any holder of DESCRIBE to pass any DESCRIBE_CONFIGS check. However, this change would affect every single RPC and resource type that uses DESCRIBE_CONFIGS across the entire broker — DESCRIBE_CONFIGS (API 32), ALTER_CONFIGS (API 33), INCREMENTAL_ALTER_CONFIGS (API 44), and more — potentially granting unintended read access to configurations on topics, groups, and brokers cluster-wide. The blast radius is far too large for what is a narrow, targeted fix. This KIP instead changes only the authorization policy of LIST_CONFIG_RESOURCES itself.
Accept both DESCRIBE and DESCRIBE_CONFIGS without a version bump
An earlier proposal kept the same wire format (no new API version) and changed only the server-side authorization policy to accept either Describe or DescribeConfigs:
| Resource Type | Current | Proposed |
|---|---|---|
| GROUP | DescribeConfigs on CLUSTER | [Describe or DescribeConfigs] on CLUSTER; or [Describe or DescribeConfigs] on the individual group |
| TOPIC | DescribeConfigs on CLUSTER | [Describe or DescribeConfigs] on CLUSTER; or [Describe or DescribeConfigs] on the individual topic |
| CLIENT_METRICS | DescribeConfigs on CLUSTER | DescribeConfigs on CLUSTER (unchanged) |
| BROKER | DescribeConfigs on CLUSTER | DescribeConfigs on CLUSTER (unchanged) |
| BROKER_LOGGER | DescribeConfigs on CLUSTER | DescribeConfigs on CLUSTER (unchanged) |
This was rejected for several reasons:
- Inconsistency with other resource-listing APIs -
LIST_GROUPS(API 16) andMETADATA(API 3) check onlyDescribe— they never acceptDescribeConfigsas an alternative. Accepting both operations inLIST_CONFIG_RESOURCESwould make it with a dual-AclOperation pattern, which is confusing and hard to reason about when setting up ACLs. - Increased complexity - Handler code would need to evaluate two alternative AclOperations per resource type, which is not done anywhere else in the codebase. A clean version bump with a single required operation is simpler to implement, test, and document.
2 Comments
ViquarKhan
Plz update KIP no , we already have kip -KIP-1316:Circuit Breaker for Share Group DLQ Overflow
ViquarKhan
No action required i have updated my KIP