Search code examples
apache-kafkaspring-kafka

Renew Kerberos Ticket with Spring Kafka


We have implemented kerberos in our kafka cluster recently.Clients need to use SASL_SSL for talking to this cluster.As we are using spring-kafka in our projects,I came across this KafkaJaasLoginModuleInitializer module from spring documentation.I think we can leverage this feature but wanted to understand if this provides any feature to renew the ticket (may be on a different thread)when ticket expires. I looked at the code and see that the options passed in the map are then used to initiate a javax.security.auth.login.AppConfigurationEntry instance but did not see a way to do auto renewal.


Solution

  • Correct, it's simply a Spring-friendly alternative to providing the -Djava.security.auth.login.config JVM argument.

    Renewing kerberos tickets is outside the scope of Spring for Apache Kafka; all broker connection-related operations are delegated to the kafka-clients; refer to the Kafka documentation.