To briefly explain what we are trying to get here: we want to have permission to read and write Kafka topics. Our Kafka is protected by Kerberos. It means, before we start accessing Kafka, we need to obtain a ticket from Kerberos. To get the ticket we have to provide…