[
https://issues.apache.org/jira/browse/KAFKA-19234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jun Rao resolved KAFKA-19234.
-----------------------------
Fix Version/s: 4.1.0
Resolution: Fixed
merged the PR to trunk
> broker should return UNAUTHORIZATION error for non-existing topic in produce
> request
> ------------------------------------------------------------------------------------
>
> Key: KAFKA-19234
> URL: https://issues.apache.org/jira/browse/KAFKA-19234
> Project: Kafka
> Issue Type: Bug
> Components: core
> Reporter: Jun Rao
> Assignee: PoAn Yang
> Priority: Major
> Fix For: 4.1.0
>
>
> In [https://github.com/apache/kafka/pull/15968/files], we changed the
> authorization logic slightly. If a produce request includes a topic name that
> doesn't exist and is not authorized, it now returns an
> UNKNOWN_TOPIC_OR_PARTITION error. Since topic name is sensitive information,
> it should return a TOPIC_AUTHORIZATION_FAILED error as before that PR.
> {code:java}
> else if (!metadataCache.contains(topicPartition))
> nonExistingTopicResponses += new TopicIdPartition(topicId,
> topicPartition) -> new PartitionResponse(Errors.UNKNOWN_TOPIC_OR_PARTITION)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)