Skip to content

Commit 227ff6c

Browse files
committed
Remove curl dependency and disable OAuth Bearer SASL mechanism
# Motivation The curl dependency is just necessary for the OAuth Bearer SASL mechanism. Let's remove that configuration option for now. # Modification Removes the curl dependency.
1 parent 51c5f72 commit 227ff6c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Diff for: Package.swift

-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ let package = Package(
7272
.define("_GNU_SOURCE", to: "1"), // Fix build error for Swift 5.9 onwards
7373
],
7474
linkerSettings: [
75-
.linkedLibrary("curl"),
7675
.linkedLibrary("sasl2"),
7776
.linkedLibrary("z"), // zlib
7877
]

Diff for: Sources/Crdkafka/custom/config/config.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#define ENABLE_ZSTD 1
2222
#define ENABLE_SSL 1
2323
#define ENABLE_GSSAPI 1
24-
#define ENABLE_CURL 1
24+
#define ENABLE_CURL 0
2525
#define ENABLE_DEVEL 0
2626
#define ENABLE_VALGRIND 0
2727
#define ENABLE_REFCNT_DEBUG 0

Diff for: Sources/Kafka/Configuration/KafkaConfiguration+Security.swift

+5-4
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ extension KafkaConfiguration {
309309
}
310310
}
311311

312-
public struct OAuthBearerMethod: Sendable, Hashable {
312+
struct OAuthBearerMethod: Sendable, Hashable {
313313
internal enum _OAuthBearerMethod: Sendable, Hashable {
314314
case `default`(
315315
configuration: String?
@@ -337,7 +337,7 @@ extension KafkaConfiguration {
337337
/// For example: `principalClaimName=azp principal=admin scopeClaimName=roles scope=role1,role2 lifeSeconds=600`.
338338
/// In addition, SASL extensions can be communicated to the broker via `extension_NAME=value`.
339339
/// For example: `principal=admin extension_traceId=123`
340-
public static func `default`(configuration: String? = nil) -> OAuthBearerMethod {
340+
static func `default`(configuration: String? = nil) -> OAuthBearerMethod {
341341
return OAuthBearerMethod(_internal: .default(configuration: configuration))
342342
}
343343

@@ -359,7 +359,7 @@ extension KafkaConfiguration {
359359
/// - scope: The client uses this to specify the scope of the access request to the broker.
360360
/// - extensions: Allow additional information to be provided to the broker.
361361
/// Comma-separated list of key=value pairs. E.g., "supportFeatureX=true,organizationId=sales-emea".
362-
public static func oidc(
362+
static func oidc(
363363
configuration: String? = nil,
364364
clientID: String,
365365
clientSecret: String,
@@ -419,7 +419,8 @@ extension KafkaConfiguration {
419419
}
420420

421421
/// Use the OAUTHBEARER mechanism.
422-
public static func oAuthBearer(method: OAuthBearerMethod) -> SASLMechanism {
422+
// This is currently disabled since it requires a curl dependency otherwise.
423+
static func oAuthBearer(method: OAuthBearerMethod) -> SASLMechanism {
423424
return SASLMechanism(
424425
_internal: .oAuthBearer(method: method)
425426
)

0 commit comments

Comments
 (0)