Skip to content

Conversation

ducnt114
Copy link
Contributor

@ducnt114 ducnt114 commented Dec 2, 2020

support authen by sasl-plain

@fgeller
Copy link
Owner

fgeller commented Dec 3, 2020

@ducnt114 that's awesome - thanks mate!
do you think it would be possible to provide a test setup for the docker environment we use to test?

@fgeller
Copy link
Owner

fgeller commented Dec 3, 2020

the system test currently uses test-secrets/auth.json to setup tls, but we'd have to re-configure the dockerized kafka as well. i won't have time for that in the near future, but would gladly pull that in as well if you could find the time to add it.

@fgeller
Copy link
Owner

fgeller commented Dec 3, 2020

meanwhile, i'm assuming you tested it for your setup? (i.e. i can't test it actually works at this point and would pull the changes in optimistically? 😬 )

@fgeller
Copy link
Owner

fgeller commented Dec 3, 2020

also, this partially fixes #113 -- thanks again @ducnt114

@ducnt114
Copy link
Contributor Author

ducnt114 commented Dec 3, 2020

meanwhile, i'm assuming you tested it for your setup? (i.e. i can't test it actually works at this point and would pull the changes in optimistically? 😬 )

Yes, I tested on my cluster with sasl_plaintext setup and it worked.

Config file server.properties:

# List of enabled mechanisms, can be more than one
sasl.enabled.mechanisms=PLAIN

# Specify one of of the SASL mechanisms
sasl.mechanism.inter.broker.protocol=PLAIN

security.inter.broker.protocol=SASL_PLAINTEXT

listeners=SASL_PLAINTEXT://localhost:9093
advertised.listeners=SASL_PLAINTEXT://localhost:9093

listener.name.sasl_plaintext.plain.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \
   username="admin" \
   password="admin-secret" \
   user_admin="admin-secret" \
   user_kafkabroker1="kafkabroker1-secret";

Auth file for kt auth.json:

{
    "mode": "SASL",
    "sasl_plain_user": "admin",
    "sasl_plain_password": "admin-secret"
}

@fgeller
Copy link
Owner

fgeller commented Dec 3, 2020

@ducnt114 sweet - i'll merge as is then, thanks!

@fgeller fgeller merged commit 9b1d1e0 into fgeller:master Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants