kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Stysiak <filip.stys...@altalog.pl>
Subject Incjecting custom classes to Kafka / custom LoginModule or custom CallbackHandler
Date Tue, 02 Jul 2019 11:49:16 GMT
Hello everyone,

I am currently working on implementing simple authentication to a system
that manages topics and ACLs in our Kafka. The plan is to use a simple
login/password system, but instead of storing the user/password pairs
directly in JAAS configuation file we intend to store it in a PostgreSQL
database and check for them there;

I've found that the way to do it is to either implement custom class that
implements LoginModule and  point to it in the JAAS file passed in
KAFKA_OPTS; or to implement custom class for a CallbackHandler and set
sasl.client.callback.handler.class property.

However, I cannot achieve any kind of success with either of these
approaches. The container I run Kafka in won't start, telling me it
couldn't find the class.

My custom classes reside in a jar that I:
- put in the $(kafka_home)/libs directory
- pointed directly and indirectly in PATH and (or) CLASSPATH


So my question is:
- which of the approaches is the correct one - custom LoginModule or custom
CallbackHandler?
- how do you inject your own classes into Kafka the right way?

Regards,
Filip

-- 
_Uwaga: Wiadomość wraz z załącznikami może zawierać informacje poufne 
_stanowiące tajemnicę przedsiębiorstwa Altalog Sp. z. o.o., przeznaczone 
tylko dla jej adresata.__
_Dostęp osób trzecich do tej wiadomości jest 
zabroniony. Jeśli nie jesteś adresatem niniejszej wiadomości, informujemy,_

_że jej rozpowszechnianie, kopiowanie, rozprowadzanie lub inne działanie o 
podobnym charakterze jest zabronione_
_i może być nielegalne. Prosimy o 
poinformowanie nadawcy o niewłaściwym otrzymaniu wiadomości oraz jej trwałe 
usunięcie bez otwierania załączników._
_
_
_*Note: The message with 
attachments may contain confidential information constituting the secret of 
the company Altalog Ltd., intended only for its addressee.*_
_*Access by 
third parties to this message is prohibited. If you are not the recipient 
of this message,*_
_*we would like to inform you that its dissemination, 
copying, distribution or other similar activities is prohibited*_
_*and may 
be illegal. Please inform the sender about the improper receipt of the 
message and its permanent removal without opening attachments.*_

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