Hongten commented on PR #12090:
URL: https://github.com/apache/kafka/pull/12090#issuecomment-1107707655

   > @Hongten , thanks for the PR. So you mean the `*` without single quote 
will be replaced into all files under the current folder by `bash`, right? 
Interesting issue. Could you also update the option description in 
`core/src/main/scala/kafka/admin/AclCommand.scala`? i.e.:
   > 
   > `A value of * indicates ACL should apply to all topics.` -> `A value of 
'*' indicates ACL should apply to all topics.` (add single quote around *)
   > 
   > Thanks.
   
   hi @showuon , the `*` without single quotes will be replaced into One 
file(File names are sorted alphabetically) under the current folder by `bash`. 
   I will update the description. I try to set ACL for other resources(e.g 
transactional-id, group, delegation-token) with wildcard and encountered the 
same issue.  
   One more thing is `User:*` in the bach will encounter `no matches found: 
User:*`. We need to use `User:'*'`.
   So I update all descriptions together.
   
   ```
   > ~/bin/kafka-acls.sh --authorizer-properties 
zookeeper.connect=localhost:2181 --add --allow-principal User:Peter 
--allow-host 198.51.200.1 --operation Describe --delegation-token *
   
   Adding ACLs for resource `ResourcePattern(resourceType=DELEGATION_TOKEN, 
name=foo.txt, patternType=LITERAL)`:
       (principal=User:Peter, host=198.51.200.1, operation=DESCRIBE, 
permissionType=ALLOW)
   
   Current ACLs for resource `ResourcePattern(resourceType=DELEGATION_TOKEN, 
name=foo.txt, patternType=LITERAL)`:
       (principal=User:Peter, host=198.51.200.1, operation=DESCRIBE, 
permissionType=ALLOW)
   > ~/bin/kafka-acls.sh --authorizer-properties 
zookeeper.connect=localhost:2181 --add --allow-principal User:Peter 
--allow-host 198.51.200.1 --operation Read --group *
   
   Adding ACLs for resource `ResourcePattern(resourceType=GROUP, name=foo.txt, 
patternType=LITERAL)`:
       (principal=User:Peter, host=198.51.200.1, operation=READ, 
permissionType=ALLOW)
   
   Current ACLs for resource `ResourcePattern(resourceType=GROUP, name=foo.txt, 
patternType=LITERAL)`:
       (principal=User:Peter, host=198.51.200.1, operation=READ, 
permissionType=ALLOW)
   > ~/bin/kafka-acls.sh --authorizer-properties 
zookeeper.connect=localhost:2181 --add --allow-principal User:Peter 
--allow-host 198.51.200.1 --operation Write --transactional-id *
   
   Adding ACLs for resource `ResourcePattern(resourceType=TRANSACTIONAL_ID, 
name=foo.txt, patternType=LITERAL)`:
       (principal=User:Peter, host=198.51.200.1, operation=WRITE, 
permissionType=ALLOW)
   
   Current ACLs for resource `ResourcePattern(resourceType=TRANSACTIONAL_ID, 
name=foo.txt, patternType=LITERAL)`:
       (principal=User:Peter, host=198.51.200.1, operation=WRITE, 
permissionType=ALLOW)
   
   > ~bin/kafka-acls.sh --authorizer-properties 
zookeeper.connect=mylocalip:2186 --add --allow-principal User:'*' --allow-host 
198.51.200.1 --operation Read --group my_group
   
   Adding ACLs for resource `ResourcePattern(resourceType=GROUP, name=my_group, 
patternType=LITERAL)`:
       (principal=User:*, host=198.51.200.1, operation=READ, 
permissionType=ALLOW)
   
   Current ACLs for resource `ResourcePattern(resourceType=GROUP, 
name=my_group, patternType=LITERAL)`:
       (principal=User:*, host=198.51.200.1, operation=READ, 
permissionType=ALLOW)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to