Skip to content

fix: IPROTO_ID auth method encoding #275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion tarantool/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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))
53 changes: 22 additions & 31 deletions test/suites/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down