ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chia-Ping Tsai <chia7...@gmail.com>
Subject Re: Review Request 73344: RANGER-3231 Ranger should use kafka Authorizer from KIP-504
Date Thu, 27 May 2021 17:09:15 GMT


> On 五月 18, 2021, 6:25 a.m., Ramesh Mani wrote:
> > plugin-kafka/src/main/java/org/apache/ranger/authorization/kafka/authorizer/RangerKafkaAuthorizer.java
> > Line 176 (original), 231 (patched)
> > <https://reviews.apache.org/r/73344/diff/1/?file=2249924#file2249924line238>
> >
> >     can resourcePattern() be null. please check
> 
> Chia-Ping Tsai wrote:
>     https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/server/authorizer/Authorizer.java#L181
>     https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/server/AuthHelper.scala#L48
>     https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/server/AuthHelper.scala#L63
>     https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/server/AuthHelper.scala#L122
>     
>     I have checked all usages and there is no null. Also, the fields in ResourcePattern
are not null (see https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/resource/ResourcePattern.java#L48)

BTW, I have filed a patch to kafka to make sure the field is NOT null (see https://github.com/apache/kafka/pull/10764)


- Chia-Ping


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73344/#review223006
-----------------------------------------------------------


On 五月 18, 2021, 4:16 a.m., Chia-Ping Tsai wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73344/
> -----------------------------------------------------------
> 
> (Updated 五月 18, 2021, 4:16 a.m.)
> 
> 
> Review request for ranger.
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> As described in the KIP, `org.apache.kafka.server.authorizer.Authorizer` is an improvement
over `kafka.security.auth.Authorizer` and it's a pure Java interface (instead of Scala).
> `kafka.security.auth.Authorizer` has been deprecated since December 2019 and it will
be removed in Apache Kafka 3.0 (roughly planned for July/August).
> See the KIP for more details:
> https://cwiki.apache.org/confluence/display/KAFKA/KIP-504+-+Add+new+Java+Authorizer+Interface
> 
> 
> Diffs
> -----
> 
>   plugin-kafka/src/main/java/org/apache/ranger/authorization/kafka/authorizer/RangerKafkaAuthorizer.java
2a1b812e0 
>   ranger-kafka-plugin-shim/src/main/java/org/apache/ranger/authorization/kafka/authorizer/RangerKafkaAuthorizer.java
9d72ae0c8 
> 
> 
> Diff: https://reviews.apache.org/r/73344/diff/2/
> 
> 
> Testing
> -------
> 
> run `mvn clean test` and all pass on my local.
> 
> 
> File Attachments
> ----------------
> 
> RANGER-3231.v1.patch
>   https://reviews.apache.org/media/uploaded/files/2021/05/18/4e2f190f-c871-4115-b554-0e6041a5a5a6__RANGER-3231.v1.patch
> 
> 
> Thanks,
> 
> Chia-Ping Tsai
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message