RE: Security for individual partitions

2018-06-25 Thread 赖剑清
Hi, Yash

I don't know the version and language of consumer client you use.
Java client [kafka-clients-0.9.0.0] provides a method [public void 
assign(List partitions)] in KafkaConsumer.class to manually 
assign a list of partition to this consumer.

This may be what you want.

>-Original Message-
>From: Yash Ganthe [mailto:yas...@gmail.com]
>Sent: Monday, June 25, 2018 7:50 PM
>To: users@kafka.apache.org
>Subject: Security for individual partitions
>
>Hi,
>
>If I have a topic with 10 partitions, I would like each partition to be 
>accessible
>to only certain consumers. Consumer 1 should be able to read from partition 1
>but no other partition and so on. Is this possible in Kafka?
>
>-Yash


Re: Security for individual partitions

2018-06-25 Thread Hans Jespersen
Kafka ACLs are at the topic level, not partition level.

Probably better to make 10 topics of 1 partition each and use topic ACLs to 
control access.

-hans

> On Jun 25, 2018, at 9:50 PM, Yash Ganthe  wrote:
> 
> Hi,
> 
> If I have a topic with 10 partitions, I would like each partition to be
> accessible to only certain consumers. Consumer 1 should be able to read
> from partition 1 but no other partition and so on. Is this possible in
> Kafka?
> 
> -Yash


Re: Security for individual partitions

2018-06-25 Thread Sönke Liebau
Hi Yash,

I'm afraid this is not easily possible with existing functionality.
Even if you created your own authorizer, I'm fairly certain that the
partition is not available as part of the resource that is being
accessed.

Is there any specific reason why you can't create more than one topic
and give every customer access to a dedicated topic instead of trying
to manage this by partition?

Best regards,
Sönke

On Mon, Jun 25, 2018 at 1:50 PM, Yash Ganthe  wrote:
> Hi,
>
> If I have a topic with 10 partitions, I would like each partition to be
> accessible to only certain consumers. Consumer 1 should be able to read
> from partition 1 but no other partition and so on. Is this possible in
> Kafka?
>
> -Yash



-- 
Sönke Liebau
Partner
Tel. +49 179 7940878
OpenCore GmbH & Co. KG - Thomas-Mann-Straße 8 - 22880 Wedel - Germany


Security for individual partitions

2018-06-25 Thread Yash Ganthe
Hi,

If I have a topic with 10 partitions, I would like each partition to be
accessible to only certain consumers. Consumer 1 should be able to read
from partition 1 but no other partition and so on. Is this possible in
Kafka?

-Yash