Giter Club home page Giter Club logo

Comments (5)

cfontes avatar cfontes commented on July 20, 2024 1

Hey, great, RTFM right...

I will give it a try!

from kafka-shell.

devshawn avatar devshawn commented on July 20, 2024

Hey @cfontes -- thank you very much!!

So, what support are you looking for? Can you give an example of the stuff you would like to skip typing on kafka-acls? I don't use that command much so I'm fairly unaware of the things that you have to repeatedly type. We can definitely add what you're looking for, though! 😄

from kafka-shell.

cfontes avatar cfontes commented on July 20, 2024

Hey @devshawn, basically when you are using kafka-console-consumer or producer in a topic with ACL on it you have to do this:

--consumer-property sasl.mechanism=PLAIN
--consumer-property security.protocol=SASL_SSL
--consumer-property ssl.truststore.location= ....
--consumer-property ssl.truststore.password= .....
--consumer-property ssl.enabled.protocols=TLSv1.2
--consumer-property ssl.cipher.suites=TLS_ECDHE_ECDSA_WITH_AES_256 ....
--consumer-property ssl.truststore.type=JKS
--consumer-property ssl.secure.random.implementation=........
--consumer-property ssl.endpoint.identification.algorithm="" \

But this is not available in all kafka shell commands, so there is also a way to setup a file that you import before running the kafka shell scripts so ACL kicks in and you can talk to the cluster.

from kafka-shell.

devshawn avatar devshawn commented on July 20, 2024

Hey @cfontes! Ah, yes! So, right now, kafka-console-consumer and kafka-console-producer (and the avro variants) can take the properties file as a part of the configuration of kafka-shell.

If you put those properties in a properties file, such as config.properties:

security.protocol=SASL_SSL
ssl.enabled.protocols=TLSv1.2 
ssl.truststore.type=JKS 

You can then set up your kafka-shell config (in ~/.kafka-shell/config.yaml) to look like this:

...
clusters:
  my-cluster:
    bootstrap_servers: localhost:9092
    zookeeper_connect: localhost:2181
    schema_registry_url: http://localhost:8081
    ksql_server_url: http://localhost:8081
    consumer_settings:
      config: config.properties
    producer_settings:
      config: config.properties

Then, it will automatically add --consumer.config and --producer.config when you use the consumer/producer commands. This is detailed a bit more in CONFIGURATION.md. Note that the paths given above would be relative so wherever you started the shell, so you may want to configure them as absolute paths. Is that what you're looking for? :)

In the next release, I'm planning to add the ability to configure the --command-config (which takes a similar properties file, used in commands like kafka-acls).

from kafka-shell.

devshawn avatar devshawn commented on July 20, 2024

Let me know how it goes!

from kafka-shell.

Related Issues (15)

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.