wbarnha / kafka-python-ng

Fork for Python client for Apache Kafka
https://wbarnha.github.io/kafka-python-ng/
Apache License 2.0
67 stars 8 forks source link

add validate_config function for msk module #176

Closed Sharu95 closed 6 months ago

Sharu95 commented 6 months ago

What

I had issues connecting to our MSK cluster using the kafka-python-ng library and noticed that there was a call to the function validate_config() when using SASL_SSL, which was not implemented for the MSK module.

Similar to the other oauth modules, it is assumed in the conn.py code that there is a function that does the same check that is found in conn.py and added this.

Why

Connection issues to MSK

References

170 and potentially also @mattoberle's implementation in https://github.com/mattoberle/kafka-python/tree/feature/2232-AWS_MSK_IAM

Sharu95 commented 6 months ago

@wbarnha, let me know what you think. With the current release, authenticating towards MSK using the AWS_MSK_IAM mechanism won't work, but I'm not even sure if it's properly tested for release or just silently released, as I saw no updated docs 😅

wbarnha commented 6 months ago

@wbarnha, let me know what you think. With the current release, authenticating towards MSK using the AWS_MSK_IAM mechanism won't work, but I'm not even sure if it's properly tested for release or just silently released, as I saw no updated docs 😅

To be honest, I haven't had the chance to appropriately update documentation in my own GitHub Pages environment yet. Thank you for this PR, I took it in good faith that the original implementation was properly tested against an AWS MSK instance and there were no issues.

Sharu95 commented 6 months ago

The original implementation seemed good, it was just this minor thing that was off! No worries, happy to contribute 🙌🏾 Thanks for fast approval and release, appreciate it 👌🏾