KAFKA-13983: Fail the creation with "/" in resource name in zk ACL#12359
Merged
omkreddy merged 5 commits intoapache:trunkfrom Jul 8, 2022
Merged
KAFKA-13983: Fail the creation with "/" in resource name in zk ACL#12359omkreddy merged 5 commits intoapache:trunkfrom
omkreddy merged 5 commits intoapache:trunkfrom
Conversation
hachikuji
reviewed
Jul 1, 2022
Contributor
hachikuji
left a comment
There was a problem hiding this comment.
Thanks for the fix. Are there any test cases we can add?
Contributor
Author
|
Sanitizing the resource name have a compatibility issue with already existing ACLs, and also there are very few special characters which are not allowed by the zookeeper which can be found here https://zookeeper.apache.org/doc/r3.1.2/zookeeperProgrammers.html so we decided to fail the creation with Not allowed characters: |
omkreddy
reviewed
Jul 7, 2022
| throw new UnsupportedVersionException(s"Adding ACLs on prefixed resource patterns requires " + | ||
| s"${KafkaConfig.InterBrokerProtocolVersionProp} of $IBP_2_0_IV1 or greater") | ||
| } | ||
| if (inValidAclBindingResourceName(aclBinding.pattern().name())) { |
Contributor
There was a problem hiding this comment.
Can we this to validateAclBinding method?
omkreddy
approved these changes
Jul 8, 2022
Contributor
omkreddy
left a comment
There was a problem hiding this comment.
@singhnama Thanks for the PR. LGTM.
ijuma
added a commit
to confluentinc/kafka
that referenced
this pull request
Aug 3, 2022
> $ git merge-base apache-github/3.3 apache-github/trunk > 23c92ce > $ git show 23c92ce > commit 23c92ce > Author: SC <pch838811@gmail.com> > Date: Mon Jul 11 11:36:56 2022 +0900 > > MINOR: Use String#format for niceMemoryUnits result (apache#12389) > > Reviewers: Luke Chen <showuon@gmail.com>, Divij Vaidya <diviv@amazon.com> * commit '23c92ce79366e86ca719e5e51c550c27324acd83': MINOR: Use String#format for niceMemoryUnits result (apache#12389) KAFKA-14055; Txn markers should not be removed by matching records in the offset map (apache#12390) KAFKA-13474: Allow reconfiguration of SSL certs for broker to controller connection (apache#12381) KAFKA-13996: log.cleaner.io.max.bytes.per.second can be changed dynamically (apache#12296) KAFKA-13983: Fail the creation with "/" in resource name in zk ACL (apache#12359) KAFKA-12943: update aggregating documentation (apache#12091) KAFKA-13846: Follow up PR to address review comments (apache#12297)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Sanitizing the resource name have a compatibility issue with already existing ACLs, and also there are very few special characters which are not allowed by the zookeeper which can be found here so we decided to fail the creation with
/in the resource name since this is allowed by zookeeper but it's creating the problem in acl operation.Not allowed characters by zookeeper: