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

[kafka] Filter requests by API key #36978

Closed
adamkotwasinski opened this issue Nov 4, 2024 · 3 comments
Closed

[kafka] Filter requests by API key #36978

adamkotwasinski opened this issue Nov 4, 2024 · 3 comments
Assignees
Labels
area/kafka enhancement Feature requests. Not bugs or questions.

Comments

@adamkotwasinski
Copy link
Contributor

adamkotwasinski commented Nov 4, 2024

Title: Filter requests by API key

Description:
Filter requests by API key.
This allows us to provide finer-grained control over what Kafka clients (consumers/producers) can do when they use particular endpoints for the Kafka cluster.
The perfect world would be single Kafka cluster with two sets of listeners where clients can connect - one set dedicated for producers, and one for consumers. Connecting to the wrong one and sending an unsupported request would then deny the forwarding upstream. Response rewriting would take care of advertising two sets of listeners, so the real Kafka addresses would not be propagated to the users.

This allows the proxy to control the access to Kafka without requiring any changes to the upstream cluster's / downstream clients' configuration.

envoy-broker-filtering-requests

@adamkotwasinski adamkotwasinski added enhancement Feature requests. Not bugs or questions. triage Issue requires triage labels Nov 4, 2024
@adamkotwasinski
Copy link
Contributor Author

/assign @adamkotwasinski

mattklein123 pushed a commit that referenced this issue Nov 5, 2024
Commit Message: kafka: close connection when rejectable request appears
Additional Description: provides
#36978 by making the broker
filter check the requests' API key against allow/denylists in the config
- if we find a request to reject, we just close the connection. There is
also a bonus: this sets up a framework for "_close connection if we
don't like the request_" that we can expand upon later.
Risk Level: Low
Testing: automated (no filtering) + manual (filtering)
Docs Changes: Kafka broker .rst
Release Notes: n/a
Platform Specific Features: n/a

---------

Signed-off-by: Adam Kotwasinski <adam.kotwasinski@gmail.com>
update-envoy bot added a commit to envoyproxy/data-plane-api that referenced this issue Nov 5, 2024
Commit Message: kafka: close connection when rejectable request appears
Additional Description: provides
envoyproxy/envoy#36978 by making the broker
filter check the requests' API key against allow/denylists in the config
- if we find a request to reject, we just close the connection. There is
also a bonus: this sets up a framework for "_close connection if we
don't like the request_" that we can expand upon later.
Risk Level: Low
Testing: automated (no filtering) + manual (filtering)
Docs Changes: Kafka broker .rst
Release Notes: n/a
Platform Specific Features: n/a

---------

Signed-off-by: Adam Kotwasinski <adam.kotwasinski@gmail.com>

Mirrored from https://github.com/envoyproxy/envoy @ c30d173544a6ac6646201f8766eb851c7c9e0bc6
@KBaichoo KBaichoo added area/kafka and removed triage Issue requires triage labels Nov 5, 2024
@KBaichoo
Copy link
Contributor

KBaichoo commented Nov 5, 2024

cc @mattklein123

@adamkotwasinski
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kafka enhancement Feature requests. Not bugs or questions.
Projects
None yet
Development

No branches or pull requests

2 participants