Skip to content

Release 0.9.0 #221

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
Jun 20, 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
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased

### Added
- SSL support (PR #220, #217).
- Tarantool Enterprise testing workflow on GitHub actions (PR #220).

### Changed

### Fixed

## 0.9.0 - 2022-06-20

### Added
- SSL support (PR #220, #217).
- Tarantool Enterprise testing workflow on GitHub actions (PR #220).

## 0.8.0 - 2022-04-29

### Added
Expand Down
104 changes: 104 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,107 @@
tarantool-python (0.9.0-0) unstable; urgency=medium
## Overview

This release features SSL support.

To use encrypted connection with Tarantool Enterprise Edition
instance, pass "ssl" `transport` parameter on connect:

```python
con = tarantool.Connection(
host, port,
user=user,
password=pass,
transport="ssl")
```

To verify the server, set client trusted certificate
authorities (CA) file with `ssl_ca_file` parameter:

```python
con = tarantool.Connection(
host, port,
user=user,
password=password,
transport="ssl",
ssl_ca_file=client_ca_file)
```

If the server authenticates clients using certificates issued by
given CA, you must provide private SSL key file with `ssl_key_file`
parameter and SSL certificate file with `ssl_cert_file` parameter.
Otherwise, these parameters are optional.

```python
con = tarantool.Connection(
host, port,
user=user,
password=password,
transport="ssl",
ssl_key_file=client_key_file,
ssl_cert_file=client_cert_file)
```

To set SSL ciphers, set them with `ssl_ciphers` parameter as
a colon-separated (:) string:

```python
con = tarantool.Connection(
host, port,
user=user,
password=password,
transport="ssl",
ssl_ciphers=client_ssl_ciphers)
```

ConnectionPool and MeshConnection also support these parameters.

```python
mesh = tarantool.MeshConnection(
addrs={
"host": host,
"post": port,
"transport": "ssl",
"ssl_key_file": client_key_file,
"ssl_cert_file": client_cert_file,
"ssl_ca_file": client_ca_file,
"ssl_ciphers": client_ssl_ciphers,
},
user=user,
password=password)
```

```python
pool = tarantool.ConnectionPool(
addrs={
"host": host,
"post": port,
"transport": "ssl",
"ssl_key_file": client_key_file,
"ssl_cert_file": client_cert_file,
"ssl_ca_file": client_ca_file,
"ssl_ciphers": client_ssl_ciphers,
},
user=user,
password=password)
```

See [Tarantool Enterprise Edition manual](https://www.tarantool.io/en/enterprise_doc/security/#enterprise-iproto-encryption)
for details.

## Breaking changes

There are no breaking changes in the release.

## New features

* SSL support (PR #220, #217).

## Testing

* Tarantool Enterprise testing workflow on GitHub actions (PR #220).

-- Georgy Moiseev <[email protected]> Mon, 20 Jun 2022 18:00:00 +0300

tarantool-python (0.8.0-0) unstable; urgency=medium

## Overview
Expand Down
2 changes: 1 addition & 1 deletion rpm/tarantool-python.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Summary: Python client library for Tarantool Database
Name: tarantool-python
Version: 0.8.0
Version: 0.9.0
Release: 1%{?dist}
Source0: tarantool-python-%{version}.tar.gz
License: BSD
Expand Down
22 changes: 18 additions & 4 deletions tarantool/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
SOCKET_TIMEOUT,
RECONNECT_MAX_ATTEMPTS,
RECONNECT_DELAY,
DEFAULT_TRANSPORT,
DEFAULT_SSL_KEY_FILE,
DEFAULT_SSL_CERT_FILE,
DEFAULT_SSL_CA_FILE,
DEFAULT_SSL_CIPHERS
)

from tarantool.error import (
Expand All @@ -24,14 +29,18 @@
)

from tarantool.utils import (
ENCODING_DEFAULT
ENCODING_DEFAULT,
)

__version__ = "0.8.0"
__version__ = "0.9.0"


def connect(host="localhost", port=33013, user=None, password=None,
encoding=ENCODING_DEFAULT):
encoding=ENCODING_DEFAULT, transport=DEFAULT_TRANSPORT,
ssl_key_file=DEFAULT_SSL_KEY_FILE,
ssl_cert_file=DEFAULT_SSL_CERT_FILE,
ssl_ca_file=DEFAULT_SSL_CA_FILE,
ssl_ciphers=DEFAULT_SSL_CIPHERS):
'''
Create a connection to the Tarantool server.

Expand All @@ -50,7 +59,12 @@ def connect(host="localhost", port=33013, user=None, password=None,
reconnect_max_attempts=RECONNECT_MAX_ATTEMPTS,
reconnect_delay=RECONNECT_DELAY,
connect_now=True,
encoding=encoding)
encoding=encoding,
transport=transport,
ssl_key_file=ssl_key_file,
ssl_cert_file=ssl_cert_file,
ssl_ca_file=ssl_ca_file,
ssl_ciphers=ssl_ciphers)


def connectmesh(addrs=({'host': 'localhost', 'port': 3301},), user=None,
Expand Down