-
Notifications
You must be signed in to change notification settings - Fork 9
feat: enable for native api entrypoint connect phase #103
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
base: alpha
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @mukul-tyagi08, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces support for applying the IP filtering policy to Native Kafka APIs. By integrating this policy into the 'ENTRYPOINT_CONNECT' phase, it enables robust, early-stage access control at the TCP connection level, preventing unauthorized clients from establishing a connection before any protocol-specific handshakes or authentication occur. The changes include adapting the policy's logic to the unique characteristics of Kafka's raw TCP connections and thoroughly documenting the specific operational considerations and limitations for this new capability. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| <properties> | ||
| <gravitee-bom.version>8.3.39</gravitee-bom.version> | ||
| <gravitee-gateway-api.version>3.13.0</gravitee-gateway-api.version> | ||
| <gravitee-gateway-api.version>4.3.0-APIM-12432-interrupt-exception-entrypoint-connect-SNAPSHOT</gravitee-gateway-api.version> |
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.
Will replace after gravitee-io/gravitee-gateway-api#321 gets merged
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.
I wonder if it's not a BC. Because I'm not sure if the policy still works for an apim 3.13.0 for example 🤔
Since this dependency is provided, won't there be an error in the NativePolicy import, in version of apim without it ?
I'm not really sure, but I have my doubts 🤷♂️
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.
I guess it is
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.
Code Review
This pull request enables IP filtering for the native Kafka API entrypoint connect phase. The changes are well-implemented across the policy logic, documentation, and configuration. The new onEntrypointConnect method correctly handles IP filtering with the documented limitations for Kafka, such as ignoring hostnames and using only the first IP from a custom list. The code is clean, and the new functionality is well-tested. I have reviewed the changes and found no issues.
| * @author GraviteeSource Team | ||
| */ | ||
| public class IPFilteringPolicy { | ||
| public class IPFilteringPolicy implements KafkaPolicy { |
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.
| public class IPFilteringPolicy implements KafkaPolicy { | |
| public class IPFilteringPolicy implements NativePolicy { |
|
I drafted the PR because we have to decide what we do with https://github.com/gravitee-io/gravitee-policy-kafka-ip-filtering/tree/ipfiltering Please don't merge until we took a decision ! |
Issue
https://gravitee.atlassian.net/browse/APIM-12433
Description
Enable policy for native api's entrypoint connect phase.
Additional context (Assumptions/Limitations)
Gravitee.io Automatic Deployment
🚀 A prerelease version of this package has been published on Gravitee's private artifactory, you can:
2.1.0-APIM-12433-enable-for-native-api-SNAPSHOT