Skip to content
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(kafka-logger): support sasl config in brokers #8050

Merged
merged 45 commits into from
Oct 11, 2022

Conversation

starsz
Copy link
Contributor

@starsz starsz commented Oct 9, 2022

Description

Fixes #8046

Thanks to @biubiue and the original PR #7782.

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@biubiue
Copy link
Contributor

biubiue commented Oct 9, 2022

I think it is not good to put sasl_config under borkers node, if more than one borker node, you need to configure duplicate sasl_config

@biubiue
Copy link
Contributor

biubiue commented Oct 9, 2022

I'm glad you continue this feat PR

@starsz
Copy link
Contributor Author

starsz commented Oct 10, 2022

I think it is not good to put sasl_config under borkers node, if more than one borker node, you need to configure duplicate sasl_config

Hi, @biubiue .I think we can put the sasl_config under brokers first so that we can support configuring different sasl_config under different brokers.

Then we can add sasl_config besides sasl_config as global sasl_config, if the broker doesn't configure sasl_config then it will use global sasl_config instead.

@starsz starsz marked this pull request as ready for review October 10, 2022 05:55
docs/en/latest/plugins/kafka-logger.md Outdated Show resolved Hide resolved
docs/en/latest/plugins/kafka-logger.md Outdated Show resolved Hide resolved
docs/zh/latest/plugins/kafka-logger.md Outdated Show resolved Hide resolved
docs/zh/latest/plugins/kafka-logger.md Outdated Show resolved Hide resolved
properties = {
mechanism = {
type = "string",
default = "PLAIN"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use enum to make sure the passing mechanism is legal? Although only PLAIN is currently supported.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion. Let me add the enum and add a test case to cover it.

@tzssangglass
Copy link
Member

LGTM

starsz and others added 5 commits October 10, 2022 14:33
Co-authored-by: 罗泽轩 <spacewanderlzx@gmail.com>
Co-authored-by: 罗泽轩 <spacewanderlzx@gmail.com>
Co-authored-by: 罗泽轩 <spacewanderlzx@gmail.com>
Co-authored-by: 罗泽轩 <spacewanderlzx@gmail.com>
tzssangglass
tzssangglass previously approved these changes Oct 10, 2022
volumes:
- ./ci/pod/kafka/kafka-server/kafka_jaas.conf:/opt/bitnami/kafka/config/kafka_jaas.conf:ro
- ./ci/pod/kafka/kafka-server/selfsigned.jks:/opt/bitnami/kafka/config/certs/kafka.keystore.jks:ro
- ./ci/pod/kafka/kafka-server/selfsigned.jks:/opt/bitnami/kafka/config/certs/kafka.truststore.jks:ro
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The selfsigned.jks file is only generated when the last test is executed, look: https://github.com/apache/apisix/blob/master/.github/workflows/build.yml#L117-L120, and should not exist when the plugin test is executed. Why can CI still pass, very puzzled.....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry.My fault.

Why can CI still pass, very puzzled....

The file or directory does not need to exist on the Docker host already. It is created on demand if it does not yet exist.
So it wouldn't influence the CI.

refer: https://docs.docker.com/storage/bind-mounts/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it ~~~

@spacewander spacewander merged commit c201d72 into apache:master Oct 11, 2022
@starsz starsz deleted the kafka_sasl branch October 11, 2022 05:45
Liu-Junlin pushed a commit to Liu-Junlin/apisix that referenced this pull request Nov 4, 2022
Co-authored-by: 罗泽轩 <spacewanderlzx@gmail.com>
Co-authored-by: biubiue <hichuanbiao@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants