Skip to content

Commit f3742c0

Browse files
committed
Adds description of `lua_call option specifics
* ``lua_call`` option allows the specified user to perform the specified lua function on the instance * permissions can be granted to any user registered on the instance * ``lua_call: [all]`` grants access to all global Lua functions except built-in ones * grants are valid until instance is rebooted * Fixes 4552
1 parent a009ed8 commit f3742c0

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
credentials:
2+
users:
3+
alice:
4+
privileges:
5+
- permissions: [execute]
6+
lua_call: [my_func]
7+

doc/reference/configuration/configuration_reference.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3220,6 +3220,26 @@ The ``lua`` section outlines the configuration parameters related to the Lua env
32203220
| Default: 2147483648 (2GB)
32213221
| Environment variable: TT_LUA_MEMORY
32223222
3223+
.. _configuration_reference_lua_call:
3224+
3225+
.. confval:: lua_call
3226+
3227+
Since version :doc:`3.3.0 </release/3.3.0>`, the ``lua_call`` option allows the specified user to perform the specified lua function on
3228+
the instance during runtime.
3229+
3230+
Via the ``lua_call`` option, one can grant permissions to the function to any user registered on the instance.
3231+
3232+
Note that the special option ``lua_call: [all]`` is also supported, granting access to all global Lua functions except built-in ones,
3233+
bypassing database restrictions.
3234+
3235+
After the instance is rebooted, permissions defined via the ``lua_call`` options are reset to the values stored in the database.
3236+
3237+
Example to grant custom function to the 'alice' user:
3238+
3239+
.. literalinclude:: /code_snippets/snippets/config/instances.enabled/lua_call/config.yaml
3240+
:language: yaml
3241+
:dedent:
3242+
32233243
.. _configuration_reference_memtx:
32243244

32253245
memtx

0 commit comments

Comments
 (0)