Live Coding - Kafka Security SASL_PLAINTEXT | SASL handshake | Producer and Consumer App

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ก.ย. 2024
  • step by step guide to secure your kafka server along with spring-kafka producer and consumer app
    spring.kafka.producer.properties.sasl.jaas.config
    spring.kafka.consumer.properties.sasl.jaas.config
    security.inter.broker.protocol=SASL_PLAINTEXT
    Failed authentication SASL handshake
    #kafka #security #springboot

ความคิดเห็น • 20

  • @sptrivedi1989
    @sptrivedi1989  ปีที่แล้ว +2

    Hi All, kindly get the steps and code from git link : github.com/sptrivedigit1989/kafka_sasl_plain_ws

  • @Iam_Goutam
    @Iam_Goutam หลายเดือนก่อน +1

    Hi Boss nice tutorial, excellent, just one question the .conf file you created and added to system path, but in realtime how we can do without adding in system path. By truststore.jks file? If yes please say how we can do?

    • @sptrivedi1989
      @sptrivedi1989  5 วันที่ผ่านมา

      @@Iam_Goutam sorry brother i was away , i will try to upload similar video. For production app we can use k8s and provide dynamic inputs using env variable

  • @Surjith-mr2sn
    @Surjith-mr2sn 4 หลายเดือนก่อน +1

    what if am having three node kafka cluster means ? what are the things i need to change ?

  • @AayushAgrawal-s5y
    @AayushAgrawal-s5y 6 วันที่ผ่านมา +1

    Hi All, I am implementing same thing using micronaut. Even I followed the exact same steps but still getting Unexpected Kafka request of type METADATA during SASL handshake error

    • @AayushAgrawal-s5y
      @AayushAgrawal-s5y 6 วันที่ผ่านมา +1

      My application.yml looks like this
      kafka:
      bootstrap:
      servers: localhost:9092
      producers:
      default:
      retries: 5
      bootstrap:
      servers: localhost:9092
      properties:
      security:
      protocol: SASL_PLAINTEXT
      sasl:
      mechanism: PLAIN
      jaas:
      config: org.apache.kafka.common.security.plain.PlainLoginModule required \
      username="admin" \
      password="admin-secret";

    • @sptrivedi1989
      @sptrivedi1989  5 วันที่ผ่านมา

      @@AayushAgrawal-s5y I will check and revert back.

  • @sptrivedi1989
    @sptrivedi1989  4 หลายเดือนก่อน

    Apply group of Kafka brokers in your application, security configuration is at parent level so code should be fine

  • @AayushAgrawal-s5y
    @AayushAgrawal-s5y 6 วันที่ผ่านมา

    Hi All, I am implmenting same thing using Micronaut. Even I followed the exact same steps, still I am getting Unexpected Kafka request of type METADATA during SASL handshake error
    My application.yaml for micronaut looks like this
    kafka:
    bootstrap:
    servers: localhost:9092
    producers:
    default:
    retries: 5
    bootstrap:
    servers: localhost:9092
    properties:
    security:
    protocol: SASL_PLAINTEXT
    sasl:
    mechanism: PLAIN
    jaas:
    config: org.apache.kafka.common.security.plain.PlainLoginModule required \
    username="admin" \
    password="admin-secret";

  • @subbareddyyarragudi1950
    @subbareddyyarragudi1950 ปีที่แล้ว +1

    Could not find a 'kafaclient entry in the Jaas Configuration, while setting ssl configuration in code level and configuration level, How to resolve this

    • @sptrivedi1989
      @sptrivedi1989  ปีที่แล้ว

      Code level in ConsumerFactory map use sasl.jaas.config as a key and get value from properties

  • @darshanp1267
    @darshanp1267 8 หลายเดือนก่อน +1

    Sir Please make the videos of
    SSL/TLS
    SASL/SSL
    Inkafka

    • @sptrivedi1989
      @sptrivedi1989  8 หลายเดือนก่อน

      Hi , I will try to upload in few days.

    • @darshanp1267
      @darshanp1267 8 หลายเดือนก่อน

      Thank you sir... I really appreciate your response.

    • @newstn8581
      @newstn8581 4 หลายเดือนก่อน

      @@sptrivedi1989 Yes please do it, i'm waiting!

    • @sptrivedi1989
      @sptrivedi1989  4 หลายเดือนก่อน +2

      @@newstn8581 now I will publish asap , thanks for the reminder 💝

  • @Sudheer_Sahu
    @Sudheer_Sahu ปีที่แล้ว +1

    please provide the github link for steps

    • @sptrivedi1989
      @sptrivedi1989  ปีที่แล้ว

      Sure brother I will share asap and confirm 💝

    • @Sudheer_Sahu
      @Sudheer_Sahu ปีที่แล้ว +1

      ​@@sptrivedi1989and please do sasl_ssl one also

    • @sptrivedi1989
      @sptrivedi1989  ปีที่แล้ว +1

      github.com/sptrivedigit1989/kafka_sasl_plain_ws