Skip to content

Commit 7bc4b7e

Browse files
authored
update references in order to make this work with kafka 3.6.1 (#2)
* update references in order to make this work with kafka 3.6.1 * fix review comments
1 parent e663b0b commit 7bc4b7e

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33

44
Initial version, client code adapted from Apache Kafka 3.3.1. Allows JWT
55
OAuth tokens to be fetch from Azure IMDS via HTTP GET.
6+
7+
# 1.1-SNAPSHOT
8+
9+
Updated to use Apache Kafka 3.6.1.

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ plugins {
33
}
44

55
group 'io.confluent.oauth'
6-
version '1.0-SNAPSHOT'
6+
version '1.1-SNAPSHOT'
77

88
repositories {
99
mavenCentral()
1010
}
1111

1212
dependencies {
13-
implementation group: 'org.apache.kafka', name: 'kafka-clients', version: '3.3.1'
14-
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.3'
15-
implementation 'org.bitbucket.b_c:jose4j:0.7.9'
13+
implementation group: 'org.apache.kafka', name: 'kafka-clients', version: '3.6.1'
14+
implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.2'
15+
implementation 'org.bitbucket.b_c:jose4j:0.9.3'
1616
implementation 'org.slf4j:slf4j-api:1.7.36'
1717
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
1818
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'

src/main/java/io/confluent/oauth/HttpAccessTokenRetriever.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,17 @@
4444
import javax.net.ssl.SSLSocketFactory;
4545
import org.apache.kafka.common.KafkaException;
4646

47-
import org.apache.kafka.common.security.oauthbearer.secured.AccessTokenRetriever;
48-
import org.apache.kafka.common.security.oauthbearer.secured.Retry;
49-
import org.apache.kafka.common.security.oauthbearer.secured.UnretryableException;
47+
48+
import org.apache.kafka.common.security.oauthbearer.internals.secured.AccessTokenRetriever;
49+
import org.apache.kafka.common.security.oauthbearer.internals.secured.Retry;
50+
import org.apache.kafka.common.security.oauthbearer.internals.secured.UnretryableException;
5051
import org.apache.kafka.common.utils.Utils;
5152
import org.slf4j.Logger;
5253
import org.slf4j.LoggerFactory;
5354

5455
/**
5556
* <code>HttpAccessTokenRetriever</code> is an {@link AccessTokenRetriever} copied and derived from Apacha Kafka
56-
* {@link org.apache.kafka.common.security.oauthbearer.secured.HttpAccessTokenRetriever}.
57+
* {@link org.apache.kafka.common.security.oauthbearer.internals.secured.HttpAccessTokenRetriever}.
5758
*
5859
* This version is designed to work with Azure Managed Identities via the link-local Instance Metadata Service (IMDS).
5960
* This service does not require authentication, and while an id/secret config is required, it is ignored. Other

src/main/java/io/confluent/oauth/azure/managedidentity/OAuthBearerLoginCallbackHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
import org.apache.kafka.common.security.oauthbearer.OAuthBearerToken;
4444
import org.apache.kafka.common.security.oauthbearer.OAuthBearerTokenCallback;
4545
import org.apache.kafka.common.security.oauthbearer.internals.OAuthBearerClientInitialResponse;
46-
import org.apache.kafka.common.security.oauthbearer.secured.*;
46+
import org.apache.kafka.common.security.oauthbearer.OAuthBearerValidatorCallbackHandler;
47+
import org.apache.kafka.common.security.oauthbearer.internals.secured.*;
4748
import org.slf4j.Logger;
4849
import org.slf4j.LoggerFactory;
4950

0 commit comments

Comments
 (0)