7
7
import confluent_kafka
8
8
import confluent_kafka .admin
9
9
10
- from .oidc import set_oauth_cb
11
-
12
10
13
11
def get_config (mode , config , ** kwargs ):
14
12
# Merge configuration from user.
15
13
config = update_config (config , ** kwargs )
16
14
17
15
# SSL configuration.
18
16
if config .setdefault ("security.protocol" , "sasl_ssl" ) == "sasl_ssl" :
19
- if not config .get ("ssl.ca.location" ):
20
- # confluent-kafka wheels are statically linked against openssl,
21
- # but _that_ version of openssl may expect to find the CA cert
22
- # bundle at a different location than the users's system. Provide
23
- # certificate bundle from Certifi.
24
- config ["ssl.ca.location" ] = certifi .where ()
17
+ # confluent-kafka wheels are statically linked against openssl,
18
+ # but _that_ version of openssl may expect to find the CA cert
19
+ # bundle at a different location than the users's system. Provide
20
+ # certificate bundle from Certifi.
21
+ default_cert_location = certifi .where ()
22
+ config .setdefault ("ssl.ca.location" , default_cert_location )
23
+ config .setdefault ("https.ca.location" , default_cert_location )
25
24
26
25
domain = config .pop ("domain" , "gcn.nasa.gov" )
27
26
client_id = config .pop ("client_id" , None )
@@ -46,7 +45,6 @@ def get_config(mode, config, **kwargs):
46
45
if mode == "producer" :
47
46
config .setdefault ("compression.type" , "zstd" )
48
47
49
- set_oauth_cb (config )
50
48
return config
51
49
52
50
@@ -81,9 +79,6 @@ def __init__(
81
79
** kwargs ,
82
80
)
83
81
)
84
- # Workaround for https://github.com/confluentinc/librdkafka/issues/3753#issuecomment-1058272987.
85
- # FIXME: Remove once fixed upstream, or on removal of oauth_cb.
86
- self .poll (0 )
87
82
88
83
89
84
class Consumer (confluent_kafka .Consumer ):
@@ -111,9 +106,6 @@ def __init__(
111
106
** kwargs ,
112
107
)
113
108
)
114
- # Workaround for https://github.com/confluentinc/librdkafka/issues/3753#issuecomment-1058272987.
115
- # FIXME: Remove once fixed upstream, or on removal of oauth_cb.
116
- self .poll (0 )
117
109
118
110
119
111
class AdminClient (confluent_kafka .admin .AdminClient ):
@@ -141,6 +133,3 @@ def __init__(
141
133
** kwargs ,
142
134
)
143
135
)
144
- # Workaround for https://github.com/confluentinc/librdkafka/issues/3753#issuecomment-1058272987.
145
- # FIXME: Remove once fixed upstream, or on removal of oauth_cb.
146
- self .poll (0 )
0 commit comments