Skip to content
This repository was archived by the owner on Mar 24, 2021. It is now read-only.

Feature SASL SCRAM support #972

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
d9222cf
enable loading hosts from file during testing
Oct 4, 2019
12503c9
make _kafka_version a tuple to make comparisons easier
Oct 4, 2019
ce10315
refactor server.properties generation for test brokers
Oct 4, 2019
0fe66e7
enable sasl for test broker
Oct 4, 2019
5889a99
add tests for plain and scram sasl authentication
Oct 4, 2019
5199db2
refactor test code
Oct 4, 2019
88a5bfc
add sasl handshake to protocol
Oct 4, 2019
e74099c
fix bug where queued.max.messages.kbytes is larger than its max value
Oct 7, 2019
97b277b
Add more output to test kafka startup
Oct 7, 2019
7bec7be
make sure get_cluster picks up new sasl endpoints
Oct 7, 2019
1bce4a4
fix kafka_version in sasl test
Oct 7, 2019
19c6e5b
add new sasl authentication mechanism
Oct 7, 2019
142c52f
create and use new exceptions
Oct 7, 2019
ec7e9b3
add security_protocol parameter to Authenticators
Oct 7, 2019
203f0b3
add docstrings to sasl authenticators
Oct 7, 2019
47b0927
add sasl config sections to docs
Oct 7, 2019
60468f6
implement SaslAuthenticate request and response
Oct 7, 2019
d078467
add advertisted listeners to test kafka config
Oct 7, 2019
4d1db54
fix wrong class names in protocol.sasl
Oct 7, 2019
f3c0d57
implement advanced authentication using new SASL API
Oct 7, 2019
ed889e0
add BROKERS_SASL to ci scripts
Oct 7, 2019
cc8d9b7
fix bug in protocol.sasl
Oct 7, 2019
6595497
add more output to authenticator
Oct 7, 2019
1ea009e
tie authenticators send and receive methods together
Oct 7, 2019
beaa6b8
improve docs and refactor pykafka.sasl_authenticators
Oct 7, 2019
823da3d
add -keyalg RSA to keystore generation in order to support newer ciphers
Oct 7, 2019
55dbc5b
add timeout when waiting for kafka cluster
Oct 8, 2019
46e981f
add log-level parameter to test kafka instance
Oct 8, 2019
9a57cac
print logs on failed kafka startup
Oct 8, 2019
ffe575c
increase timeout for kafka cluster and fail if cluster dies
Oct 8, 2019
5fc3418
increase timeout for kafka test instance startup
Oct 8, 2019
835be51
check if subprocesses are still running during test kafka startup
Oct 8, 2019
05824ce
add environment variable PYTHONUNBUFFERED=1 to travis.yaml
Oct 8, 2019
8e0b7bb
set line buffering for test kafka logfiles
Oct 8, 2019
77b5a8b
use logging.basicConfig
Oct 8, 2019
962aa31
keep track of all logs and procs and output logs if they fail
Oct 8, 2019
4f57c0d
add repair java version parser in kafka-run-class.sh for certain kafk…
Oct 9, 2019
c8e554f
bump librdkafka version
Oct 9, 2019
0a75ce0
switch tests from kafka 0.8 to kafka 2.0
Oct 9, 2019
7b55fab
remove pytest from test-requirements again
Oct 9, 2019
8b42a20
downgrade librdkafka to 0.11.3
Oct 10, 2019
55e2791
renamed test module to avoid naming conflict with pykafka
Oct 10, 2019
a11b7ce
add inheritance from object to sasl_authenticators classes
Oct 10, 2019
12399ce
skip sasl rdkafka tests if it's not installed
Oct 10, 2019
19d87f8
fix bug in SaslAuthenticateResponseV1
Oct 16, 2019
73f8e8e
use sasl_authenticator also for offset channel
Jan 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make _kafka_version a tuple to make comparisons easier
  • Loading branch information
Swen Wenzel committed Oct 4, 2019

Verified

This commit was signed with the committer’s verified signature.
tisonkun tison
commit 12503c9df073cb66e0bffc769dd0afac409c63f3
6 changes: 3 additions & 3 deletions pykafka/test/kafka_instance.py
Original file line number Diff line number Diff line change
@@ -151,7 +151,7 @@ def __init__(self,
use_gevent=False):
"""Start kafkainstace with given settings"""
self._num_instances = num_instances
self._kafka_version = kafka_version
self._kafka_version = tuple(int(v) for v in kafka_version.split('.'))
self._scala_version = scala_version
self._bin_dir = bin_dir
self._processes = []
@@ -201,7 +201,7 @@ def _download_kafka(self):
url_fmt = 'https://archive.apache.org/dist/kafka/{kafka_version}/kafka_{scala_version}-{kafka_version}.tgz'
url = url_fmt.format(
scala_version=self._scala_version,
kafka_version=self._kafka_version
kafka_version='.'.join(str(v) for v in self._kafka_version)
)
p1 = subprocess.Popen(['curl', '-vs', url], stdout=subprocess.PIPE)
p2 = subprocess.Popen(['tar', 'xvz', '-C', self._bin_dir,
@@ -248,7 +248,7 @@ def _gen_ssl_certs(self):

:returns: :class:`CertManager` or None upon failure
"""
if self._kafka_version >= "0.9": # no SSL support in earlier versions
if self._kafka_version >= (0, 9): # no SSL support in earlier versions
try:
return CertManager(self._bin_dir)
except: # eg. because openssl or other tools not installed