Skip to content

Commit 8e7b78e

Browse files
FranzBuschmimischi
authored andcommitted
Remove curl dependency and disable OAuth Bearer SASL mechanism
The curl dependency is just necessary for the OAuth Bearer SASL mechanism. Let's remove that configuration option for now. Removes the curl dependency.
1 parent 09aca6b commit 8e7b78e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Package.swift

Lines changed: 0 additions & 1 deletion
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
]

Sources/Crdkafka/custom/config/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#define ENABLE_ZSTD 1
2424
#define ENABLE_SSL 1
2525
#define ENABLE_GSSAPI 1
26-
#define ENABLE_CURL 1
26+
#define ENABLE_CURL 0
2727
#define ENABLE_DEVEL 0
2828
#define ENABLE_VALGRIND 0
2929
#define ENABLE_REFCNT_DEBUG 0

Sources/Kafka/Configuration/KafkaConfiguration+Security.swift

Lines changed: 5 additions & 4 deletions
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
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
SASLMechanism(
424425
_internal: .oAuthBearer(method: method)
425426
)

0 commit comments

Comments
 (0)