Skip to content

KAFKA-19234: broker should return UNAUTHORIZATION error for non-exist… #19632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

Joker-5
Copy link

@Joker-5 Joker-5 commented May 4, 2025

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.

    else if (!metadataCache.contains(topicPartition))
      nonExistingTopicResponses += new TopicIdPartition(topicId, topicPartition) -> new PartitionResponse(Errors.UNKNOWN_TOPIC_OR_PARTITION)

@github-actions github-actions bot added triage PRs from the community core Kafka Broker small Small PRs labels May 4, 2025
@frankvicky
Copy link
Contributor

Hi @Joker-5
I have checked the jira. It seems that you are not the assignee of this ticket.
Do you discuss with @FrankYang0529 ?

@FrankYang0529
Copy link
Member

@frankvicky I have created a PR for this, could you help me review it? Thanks.

#19635

@Joker-5
Copy link
Author

Joker-5 commented May 4, 2025

@frankvicky I have created a PR for this, could you help me review it? Thanks.

#19635

@FrankYang0529 Sorry, after I created this PR, I noticed you reassign this jira to yourself and I did not notice the comment in the jira. So could you add a co-author tag in your comment, thanks so much.

@chia7712
Copy link
Member

chia7712 commented May 5, 2025

@Joker-5 I've added you as a co-author to #19635 (see the description). This will be included when merging the code. Therefore, I'm closing this PR as a duplicate. Thanks!

@chia7712 chia7712 closed this May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-approved core Kafka Broker small Small PRs triage PRs from the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants