Skip to content

Conversation

@scholzj
Copy link
Collaborator

@scholzj scholzj commented Mar 27, 2025

Kafka has recently had a new major release 4.0. This PR updates the OPA Authorizer to use Kafka 4.0 as well:

  • In the examples, it uses now the official Apache Kafka image and KRaft instead of ZooKeeper
  • It uses Kafka 4.0 as a dependency. The code (mainly test code) is updated to handle different refactorings in Kafka classes (movements between packages etc.). It also updates the packaging as the recent Kafka version dropped some dependencies such as the Jackson Scala module which now need to be used as the OPA Authroizer dependency.

Signed-off-by: Jakub Scholz <www@scholzj.com>
@anderseknert
Copy link
Contributor

Hey Jakub, and thanks! Just got back from KubeCon with a hefty backlog 😅 Reviewing this is on my TODO list!

@scholzj
Copy link
Collaborator Author

scholzj commented Apr 7, 2025

No worries, it is not urgent. The current code works with Kafka 4.0. I just wanted to keep it a bit up to date.

Copy link
Contributor

@anderseknert anderseknert left a comment

Choose a reason for hiding this comment

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

Very nice! Just some questions but nothing blocking.

- "--set=bundles.authz.resource=bundle.tar.gz"
depends_on:
- nginx
zookeeper:
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

README.md Outdated

### Prerequisites

* Kafka 2.7.0+
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still true? i.e. you can still drop this jar into a Kafka that old?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point. The code itself is not really changed much. But the changes around Jackson dependencies make it compatible with Kafka 3.8 and newer (because of the Jackson versions it uses). I guess that should be fine as there are no real new feature here and users of older Kafka versions can use the previous release of the OPA Authorizer?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, fine with me 👍

Signed-off-by: Jakub Scholz <www@scholzj.com>
@anderseknert
Copy link
Contributor

Changes LGTM, feel free to merge whenever you want.

@scholzj scholzj merged commit 9c79c6d into StyraOSS:main Apr 14, 2025
@scholzj scholzj deleted the update-to-kafka-4.0 branch April 14, 2025 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants