2024-05-14 15:05:32 +08:00
|
|
|
<!DOCTYPE import-control PUBLIC
|
|
|
|
"-//Puppy Crawl//DTD Import Control 1.1//EN"
|
|
|
|
"http://www.puppycrawl.com/dtds/import_control_1_1.dtd">
|
|
|
|
<!--
|
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<import-control pkg="org.apache.kafka">
|
|
|
|
|
|
|
|
<!-- THINK HARD ABOUT THE LAYERING OF THE PROJECT BEFORE CHANGING THIS FILE -->
|
|
|
|
|
|
|
|
<!-- common library dependencies -->
|
|
|
|
<allow pkg="java" />
|
|
|
|
<allow pkg="javax.management" />
|
|
|
|
<allow pkg="org.slf4j" />
|
|
|
|
<allow pkg="org.junit" />
|
|
|
|
<allow pkg="org.mockito" />
|
|
|
|
<allow pkg="org.opentest4j" />
|
|
|
|
<allow pkg="java.security" />
|
|
|
|
<allow pkg="javax.net.ssl" />
|
|
|
|
<allow pkg="javax.security" />
|
|
|
|
<allow pkg="javax.crypto" />
|
|
|
|
<allow pkg="net.jqwik.api" />
|
|
|
|
|
|
|
|
<!-- no one depends on the server -->
|
|
|
|
<disallow pkg="kafka" />
|
|
|
|
|
|
|
|
<!-- anyone can use public classes -->
|
|
|
|
<allow pkg="org.apache.kafka.common" exact-match="true" />
|
KAFKA-18813: ConsumerGroupHeartbeat API and ConsumerGroupDescribe API must check topic describe (#18989)
This patch filters out the topic describe unauthorized topics from the
ConsumerGroupHeartbeat and ConsumerGroupDescribe response.
In ConsumerGroupHeartbeat,
- if the request has `subscribedTopicNames` set, we directly check the
authz in `KafkaApis` and return a topic auth failure in the response if
any of the topics is denied.
- Otherwise, we check the authz only if a regex refresh is triggered and
we do it based on the acl of the consumer that triggered the refresh. If
any of the topic is denied, we filter it out from the resolved
subscription.
In ConsumerGroupDescribe, we check the authz of the coordinator
response. If any of the topic in the group is denied, we remove the
described info and add a topic auth failure to the described group.
(similar to the group auth failure)
Reviewers: David Jacot <djacot@confluent.io>, Lianet Magrans
<lmagrans@confluent.io>, Rajini Sivaram <rajinisivaram@googlemail.com>,
Chia-Ping Tsai <chia7712@gmail.com>, TaiJuWu <tjwu1217@gmail.com>,
TengYao Chi <kitingiao@gmail.com>
2025-02-27 02:05:36 +08:00
|
|
|
<allow pkg="org.apache.kafka.common.acl" />
|
|
|
|
<allow pkg="org.apache.kafka.common.resource" />
|
2024-05-14 15:05:32 +08:00
|
|
|
<allow pkg="org.apache.kafka.common.security" />
|
|
|
|
<allow pkg="org.apache.kafka.common.serialization" />
|
|
|
|
<allow pkg="org.apache.kafka.common.utils" />
|
|
|
|
<allow pkg="org.apache.kafka.common.errors" exact-match="true" />
|
|
|
|
<allow pkg="org.apache.kafka.common.memory" />
|
2025-01-24 22:03:43 +08:00
|
|
|
<allow pkg="org.apache.kafka.common.test.api" />
|
2024-05-14 15:05:32 +08:00
|
|
|
|
|
|
|
<subpackage name="coordinator">
|
|
|
|
<subpackage name="group">
|
KAFKA-17747: [2/N] Add compute topic and group hash (#19523)
* Add `com.dynatrace.hash4j:hash4j:0.22.0` to dependencies.
* Add `computeTopicHash` to `org.apache.kafka.coordinator.group.Utils`.
* If topic name is non-existent, return 0.
* If topic name is existent, use streaming XXH3 to compute topic hash
with magic byte, topic id, topic name, number of partitions, partition
id and sorted racks.
* Add `computeGroupHash` to `org.apache.kafka.coordinator.group.Utils`.
* If topic map is empty, return 0.
* If topic map is not empty, use streaming XXH3 to compute group
metadata hash with sorted topic hashes by topic names.
* Add related unit test.
Reviewers: Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>, Sean Quah <squah@confluent.io>, David Jacot <djacot@confluent.io>
---------
Signed-off-by: PoAn Yang <payang@apache.org>
2025-05-15 16:48:45 +08:00
|
|
|
<allow pkg="net.jpountz.xxhash" />
|
2024-05-14 15:05:32 +08:00
|
|
|
<allow pkg="org.apache.kafka.clients.consumer" />
|
|
|
|
<allow pkg="org.apache.kafka.common.annotation" />
|
|
|
|
<allow pkg="org.apache.kafka.common.config" />
|
2024-05-21 23:58:49 +08:00
|
|
|
<allow pkg="org.apache.kafka.common.compress" />
|
2024-05-14 15:05:32 +08:00
|
|
|
<allow pkg="org.apache.kafka.common.internals" />
|
|
|
|
<allow pkg="org.apache.kafka.common.message" />
|
|
|
|
<allow pkg="org.apache.kafka.common.metadata" />
|
|
|
|
<allow pkg="org.apache.kafka.common.network" />
|
|
|
|
<allow pkg="org.apache.kafka.common.protocol" />
|
|
|
|
<allow pkg="org.apache.kafka.common.record" />
|
|
|
|
<allow pkg="org.apache.kafka.common.requests" />
|
|
|
|
<allow pkg="org.apache.kafka.coordinator.group" />
|
|
|
|
<allow pkg="org.apache.kafka.deferred" />
|
|
|
|
<allow pkg="org.apache.kafka.image"/>
|
KAFKA-18813: ConsumerGroupHeartbeat API and ConsumerGroupDescribe API must check topic describe (#18989)
This patch filters out the topic describe unauthorized topics from the
ConsumerGroupHeartbeat and ConsumerGroupDescribe response.
In ConsumerGroupHeartbeat,
- if the request has `subscribedTopicNames` set, we directly check the
authz in `KafkaApis` and return a topic auth failure in the response if
any of the topics is denied.
- Otherwise, we check the authz only if a regex refresh is triggered and
we do it based on the acl of the consumer that triggered the refresh. If
any of the topic is denied, we filter it out from the resolved
subscription.
In ConsumerGroupDescribe, we check the authz of the coordinator
response. If any of the topic in the group is denied, we remove the
described info and add a topic auth failure to the described group.
(similar to the group auth failure)
Reviewers: David Jacot <djacot@confluent.io>, Lianet Magrans
<lmagrans@confluent.io>, Rajini Sivaram <rajinisivaram@googlemail.com>,
Chia-Ping Tsai <chia7712@gmail.com>, TaiJuWu <tjwu1217@gmail.com>,
TengYao Chi <kitingiao@gmail.com>
2025-02-27 02:05:36 +08:00
|
|
|
<allow pkg="org.apache.kafka.server.authorizer"/>
|
2024-05-14 15:05:32 +08:00
|
|
|
<allow pkg="org.apache.kafka.server.common"/>
|
|
|
|
<allow pkg="org.apache.kafka.server.record"/>
|
2025-02-05 22:38:09 +08:00
|
|
|
<allow pkg="org.apache.kafka.server.share.persister"/>
|
2024-05-14 15:05:32 +08:00
|
|
|
<allow pkg="org.apache.kafka.server.util"/>
|
|
|
|
<allow pkg="org.apache.kafka.storage.internals.log"/>
|
|
|
|
<allow pkg="org.apache.kafka.test" />
|
|
|
|
<allow pkg="org.apache.kafka.timeline" />
|
2024-08-18 21:48:44 +08:00
|
|
|
<allow pkg="org.apache.kafka.coordinator.common" />
|
|
|
|
<allow pkg="org.apache.kafka.coordinator.common.runtime" />
|
2024-11-04 22:38:09 +08:00
|
|
|
<allow pkg="com.google.re2j" />
|
KAFKA-17747: [2/N] Add compute topic and group hash (#19523)
* Add `com.dynatrace.hash4j:hash4j:0.22.0` to dependencies.
* Add `computeTopicHash` to `org.apache.kafka.coordinator.group.Utils`.
* If topic name is non-existent, return 0.
* If topic name is existent, use streaming XXH3 to compute topic hash
with magic byte, topic id, topic name, number of partitions, partition
id and sorted racks.
* Add `computeGroupHash` to `org.apache.kafka.coordinator.group.Utils`.
* If topic map is empty, return 0.
* If topic map is not empty, use streaming XXH3 to compute group
metadata hash with sorted topic hashes by topic names.
* Add related unit test.
Reviewers: Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>, Sean Quah <squah@confluent.io>, David Jacot <djacot@confluent.io>
---------
Signed-off-by: PoAn Yang <payang@apache.org>
2025-05-15 16:48:45 +08:00
|
|
|
<allow pkg="com.dynatrace.hash4j.hashing" />
|
2025-02-21 20:13:16 +08:00
|
|
|
<allow pkg="org.apache.kafka.metadata" />
|
2024-05-14 15:05:32 +08:00
|
|
|
<subpackage name="metrics">
|
|
|
|
<allow pkg="com.yammer.metrics"/>
|
2024-08-23 19:53:22 +08:00
|
|
|
<allow pkg="org.HdrHistogram" />
|
2024-05-14 15:05:32 +08:00
|
|
|
<allow pkg="org.apache.kafka.common.metrics" />
|
|
|
|
<allow pkg="org.apache.kafka.server.metrics" />
|
|
|
|
</subpackage>
|
|
|
|
<subpackage name="generated">
|
|
|
|
<allow pkg="com.fasterxml.jackson" />
|
|
|
|
</subpackage>
|
|
|
|
</subpackage>
|
|
|
|
</subpackage>
|
|
|
|
|
|
|
|
</import-control>
|