From a5d25df56d959924b1710230f68cc4b928136e01 Mon Sep 17 00:00:00 2001 From: Georgy Moiseev Date: Tue, 27 Dec 2022 17:55:11 +0300 Subject: [PATCH 1/2] fix: IPROTO_ID auth method encoding If encoding=None is used (or similar decoder configuration), authentication method received in IPROTO_ID response is not an str, but a bytes object, which is unexpected. This patch fixed the behavior. Follows #269 --- tarantool/response.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tarantool/response.py b/tarantool/response.py index 07a37cc5..ece616d4 100644 --- a/tarantool/response.py +++ b/tarantool/response.py @@ -30,6 +30,7 @@ SchemaReloadException, tnt_strerror ) +from tarantool.schema import to_unicode from tarantool.msgpack_ext.unpacker import ext_hook as unpacker_ext_hook @@ -397,4 +398,4 @@ def auth_type(self): if self._return_code != 0: return None - return self._body.get(IPROTO_AUTH_TYPE) + return to_unicode(self._body.get(IPROTO_AUTH_TYPE)) From 24cf1fda9d10d9d3b8ab530410faf086ccfbe987 Mon Sep 17 00:00:00 2001 From: Georgy Moiseev Date: Tue, 27 Dec 2022 18:20:06 +0300 Subject: [PATCH 2/2] ci: bump master EE version Use SDK with Tarantool which supports auth method in IPROTO_ID response [1]. 1. https://github.com/tarantool/tarantool/commit/13b0ce9c673d2ed9baea4de7714e8604e613ae94 Follows #269 --- .github/workflows/testing.yml | 4 +-- test/suites/test_ssl.py | 53 +++++++++++++++-------------------- 2 files changed, 24 insertions(+), 33 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 4214e9ee..6c18acd0 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -119,7 +119,7 @@ jobs: path: '' - bundle: 'bundle-2.10.0-1-gfa775b383-r486-linux-x86_64' path: '' - - bundle: 'sdk-gc64-2.11.0-entrypoint-107-ga18449d54-r524.linux.x86_64' + - bundle: 'sdk-gc64-2.11.0-entrypoint-113-g803baaffe-r529.linux.x86_64' path: 'dev/linux/x86_64/master/' python: ['3.6', '3.7', '3.8', '3.9', '3.10'] @@ -169,7 +169,7 @@ jobs: make test env: TEST_TNT_SSL: ${{ matrix.tarantool.bundle == 'bundle-2.10.0-1-gfa775b383-r486-linux-x86_64' || - matrix.tarantool.bundle == 'sdk-gc64-2.11.0-entrypoint-107-ga18449d54-r524.linux.x86_64'}} + matrix.tarantool.bundle == 'sdk-gc64-2.11.0-entrypoint-113-g803baaffe-r529.linux.x86_64'}} run_tests_pip_branch_install_linux: # We want to run on external PRs, but not on our own internal diff --git a/test/suites/test_ssl.py b/test/suites/test_ssl.py index 71d075d7..36e172de 100644 --- a/test/suites/test_ssl.py +++ b/test/suites/test_ssl.py @@ -440,15 +440,12 @@ def test_single(self): server_cert_file=self.cert_file, server_auth_type=AUTH_TYPE_PAP_SHA256, client_auth_type=AUTH_TYPE_CHAP_SHA1), - # uncomment after this Tarantool EE SDK will be available on CI: - # tarantool-enterprise-sdk-nogc64-2.11.0-entrypoint-110 - # - # SslTestCase( - # name="auth_type_use_server_id", - # ok=True, - # server_key_file=self.key_file, - # server_cert_file=self.cert_file, - # server_auth_type=AUTH_TYPE_PAP_SHA256), + SslTestCase( + name="auth_type_use_server_id", + ok=True, + server_key_file=self.key_file, + server_cert_file=self.cert_file, + server_auth_type=AUTH_TYPE_PAP_SHA256), ] for t in testcases: with self.subTest(msg=t.name): @@ -559,15 +556,12 @@ def test_pool(self): client_cert_file=self.cert_file, client_ca_file=self.ca_file, client_auth_type=AUTH_TYPE_PAP_SHA256), - # uncomment after this Tarantool EE SDK will be available on CI: - # tarantool-enterprise-sdk-nogc64-2.11.0-entrypoint-110 - # - # SslTestCase( - # name="auth_type_use_server_id", - # ok=True, - # server_key_file=self.key_file, - # server_cert_file=self.cert_file, - # server_auth_type=AUTH_TYPE_PAP_SHA256), + SslTestCase( + name="auth_type_use_server_id", + ok=True, + server_key_file=self.key_file, + server_cert_file=self.cert_file, + server_auth_type=AUTH_TYPE_PAP_SHA256), ] for t in testcases: cnt = 5 @@ -683,19 +677,16 @@ def test_mesh(self): client_cert_file=self.cert_file, client_ca_file=self.ca_file, client_auth_type=AUTH_TYPE_PAP_SHA256), - # uncomment after this Tarantool EE SDK will be available on CI: - # tarantool-enterprise-sdk-nogc64-2.11.0-entrypoint-110 - # - # SslTestCase( - # name="auth_type_use_server_id", - # ok=True, - # server_key_file=self.key_file, - # server_cert_file=self.cert_file, - # server_ca_file=self.ca_file, - # server_auth_type=AUTH_TYPE_PAP_SHA256 - # client_key_file=self.key_file, - # client_cert_file=self.cert_file, - # client_ca_file=self.ca_file,), + SslTestCase( + name="auth_type_use_server_id", + ok=True, + server_key_file=self.key_file, + server_cert_file=self.cert_file, + server_ca_file=self.ca_file, + server_auth_type=AUTH_TYPE_PAP_SHA256, + client_key_file=self.key_file, + client_cert_file=self.cert_file, + client_ca_file=self.ca_file), ] for t in testcases: cnt = 5