You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Justine Olshan (Jira)" <ji...@apache.org> on 2025/05/02 21:25:00 UTC
[jira] [Comment Edited] (KAFKA-19234) broker should return UNAUTHORIZATION error for non-existing topic in produce request
[ https://issues.apache.org/jira/browse/KAFKA-19234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17949028#comment-17949028 ]
Justine Olshan edited comment on KAFKA-19234 at 5/2/25 9:24 PM:
----------------------------------------------------------------
relevant previous discussion here: KAFKA-12394
It looks like the above ticket is slightly different, and we should maintain the previous behavior for produce.
was (Author: jolshan):
relevant previous discussion here: KAFKA-12394
> 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
> Priority: Major
>
> 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)