Skip to content

Commit

Permalink
feat!: Add support for Kafka 3.3.2 (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurUT authored Oct 31, 2023
1 parent 973bd5f commit 1fdab2c
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 547 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
- name: Checkout
uses: actions/[email protected]

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
server-id: github
settings-path: ${{ github.workspace }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
- name: Checkout
uses: actions/[email protected]

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

- name: Build with Gradle
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

- name: Cache SonarCloud packages
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:11-jdk as build
FROM openjdk:17-jdk-slim as build

WORKDIR /kafka-plain-saslserver-2-ad

Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
[![Gradle build](https://github.com/ultratendency/kafka-ldap-integration/actions/workflows/gradle.yml/badge.svg)](https://github.com/ultratendency/kafka-ldap-integration/actions/workflows/gradle.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ultratendency_kafka-ldap-integration&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=ultratendency_kafka-ldap-integration)

Enhancing kafka 2.x with
Enhancing kafka 3.x with
- customized SimpleLDAPAuthentication using LDAPS simple bind for authentication
- customized SimpleACLAuthorizer using LDAPS compare-matched for group membership verification
- In release 1.1.0 we have had support for authorization which is compatible to Kafka 2.8.1
- The authorization feature was removed due to incompatibilites with latest Kafka versions (3.0 onwards) starting with release 2.0.0.

Thus, moving authentication from user and passwords in JAAS context file on kafka brokers to LDAP server

By defining Read/Write allowance with LDAP groups, authorization is moved from
Zookeeper Access Control Lists to group membership verification.

Binding and group membership information is cached (limited lifetime after write),
giving minor performance penalty and reduced LDAPS traffic.

Expand Down Expand Up @@ -44,7 +42,7 @@ A tutorial with configuration examples is available in the [User Guide](docs/ind
./gradlew clean build shadowJar -x test
```

The result is `build/libs/kafka-ldap-integration-<version>.jar`, which contains the authentication and authorization classes, along with all of their dependencies.
The result is `build/libs/kafka-ldap-integration-<version>.jar`, which contains the authentication classes, along with all of their dependencies.

**N.B.** This jar must be added to the classpath for the Kafka broker. The easist way to do that is to copy the jar into the directory `$KAFKA_HOME/libs`.

Expand Down
11 changes: 7 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kafka_version = '2.8.1'
ext.kafka_version = '3.3.2'
ext.scala_version = '2.13'
ext.kotlin_version = '1.9.20'
ext.unboundid_version = '6.0.10'
Expand All @@ -11,8 +11,8 @@ buildscript {
ext.shadow_version = '8.1.1'
ext.versions_version = '0.49.0'
ext.sonarqube_version = '4.4.1.3373'

ext.java_version = '11'
ext.slf4j_version = '1.7.32'
ext.java_version = '17'

ext.org_jetbrains_kotlin = 'org.jetbrains.kotlin'
}
Expand All @@ -28,7 +28,7 @@ plugins {
}

group 'com.ultratendency.kafka.ldap'
version '1.2.0-SNAPSHOT' // x-release-please-version
version '2.0.0' // x-release-please-version

sourceCompatibility = "$java_version"

Expand All @@ -53,6 +53,7 @@ dependencies {

implementation "org.apache.kafka:kafka_$scala_version:$kafka_version"
implementation "com.github.ben-manes.caffeine:caffeine:$caffeine_version"
implementation "org.slf4j:slf4j-api:$slf4j_version"

testImplementation "org.amshove.kluent:kluent:$kluent_version"
testImplementation("org.spekframework.spek2:spek-dsl-jvm:$spek_version") {
Expand Down Expand Up @@ -83,6 +84,8 @@ test {
}
}



shadowJar {
archiveBaseName = "${project.name}-$scala_version-$kafka_version"

Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1fdab2c

Please sign in to comment.