-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(pubsub): support kafka tls and sasl/plain auth #7046
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -79,6 +79,8 @@ jobs: | |||
|
|||
- name: Run other docker containers for test | |||
run: | | |||
# generating SSL certificates for Kafka | |||
keytool -genkeypair -keyalg RSA -dname "CN=127.0.0.1" -alias 127.0.0.1 -keystore ./ci/pod/kafka/kafka-server/selfsigned.jks -validity 365 -keysize 2048 -storepass changeit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it more appropriate to put it in the linux-ci-init-service.sh
script ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -21,6 +21,9 @@ | |||
before_install() { | |||
sudo cpanm --notest Test::Nginx >build.log 2>&1 || (cat build.log && exit 1) | |||
|
|||
# generating SSL certificates for Kafka | |||
keytool -genkeypair -keyalg RSA -dname "CN=127.0.0.1" -alias 127.0.0.1 -keystore ./ci/pod/kafka/kafka-server/selfsigned.jks -validity 365 -keysize 2048 -storepass changeit | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, add this to linux-ci-init-service.sh
script ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
LGTM |
apisix/upstream.lua
Outdated
@@ -435,7 +435,7 @@ local function check_upstream_conf(in_dp, conf) | |||
end | |||
end | |||
|
|||
if conf.tls then | |||
if conf.tls and conf.tls.client_cert and conf.tls.client_key then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if conf.tls and conf.tls.client_cert and conf.tls.client_key then | |
if conf.tls and conf.tls.client_cert then |
is enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's enough, we ensure client_cert
and client_key
both exist by jsonschema's dependencies. Any one of them separate exist is forbidden.
Lines 416 to 419 in 99bced1
dependencies = { | |
client_cert = {"client_key"}, | |
client_key = {"client_cert"}, | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's provide a doc about the kafka-proxy plugin.
apisix/plugins/kafka-proxy.lua
Outdated
}, | ||
password = { | ||
type = "string", | ||
default = "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove the default if these fields are required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
Description
Part of #6995 to implement TLS and SASL/PLAIN authentication support for kafka.
Checklist