Jun Rao created KAFKA-19234:
-------------------------------
Summary: 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
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, 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)