Giter VIP home page Giter VIP logo

kafka-security-ssl-sasl's Introduction

Kafka security

Implementation of Kafka authentication and authorisation using different approaches.

Run locally

Every directory has its own compose file and scripts to test. In the compose file all services are using a network with name kafka-cluster-network which means, all other containers outside the compose file could access Kafka and Zookeeper nodes by being attached to this network. For example

docker run -it --network kafka-cluster-network confluentinc/cp-kafka:5.0.1 kafka-topics --zookeeper \ zookeeper-1:22181 --list

Setup environment variables

There are 2 environment variables need to be configured

  • export KAFKA_SSL_SECRETS_DIR=$PWD/secrets
  • export KAFKA_SASL_SCRAM_SECRETS_DIR=$PWD/sasl-scram/secrets

SSL only

To start Kafka and Zookeeper cluster configured only with SSL, you could run the script start_ssl_only_cluster.sh

SASL/SCRAM

Configured both Zookeeper and Kafka to use SASL/SCRAM. To run it

  • Make sure you have the SSL keystore and truststore generated and stored in the directory kafka-security-ssl-sasl/secrets
  • Run command kafka-security-ssl-sasl/start_sasl_scram_cluster.sh
  • To run console producer and consumer, you could check the commands in the file kafka-security-ssl-sasl/sasl-scram/kafka-consumers-producers.sh
  • To add any new account to connect to Kafka, you could find commands in the script file sasl-scram/add_kafka_accounts_in_zookeeper.sh

References

kafka-security-ssl-sasl's People

Contributors

hussein-joe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.