Skip to content

Commit be975cf

Browse files
connectioln_pool: clarify how to give grants
Add a short guide how to setup Tarantool user to able to work with connection pool. Follows up #196
1 parent fb7f9a3 commit be975cf

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
ConnectionPool is supported only for Python 3.7 or newer.
1515
Authenticated user must be able to call `box.info` on instances.
16+
For example, to give grants to `'guest'` user, evaluate
17+
```lua
18+
box.schema.func.create('box.info')
19+
box.schema.user.grant('guest', 'execute', 'function', 'box.info')
20+
```
21+
on Tarantool instances.
1622

1723
ConnectionPool updates information about each server state (RO/RW)
1824
on initial connect and then asynchronously in separate threads.

tarantool/connection_pool.py

+6
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,12 @@ def __init__(self,
220220
221221
:param list addrs: List of {host: , port:} dictionaries,
222222
describing server addresses.
223+
:user str Username used to authenticate. User must be able
224+
to call box.info function. For example, to give grants to
225+
'guest' user, evaluate
226+
box.schema.func.create('box.info')
227+
box.schema.user.grant('guest', 'execute', 'function', 'box.info')
228+
on Tarantool instances.
223229
:param int reconnect_max_attempts: Max attempts to reconnect
224230
for each connection in the pool. Be careful with reconnect
225231
parameters in ConnectionPool since every status refresh is

0 commit comments

Comments
 (0)