Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
credentials:
users:
alice:
privileges:
- permissions: [execute]
lua_call: [my_func]
20 changes: 20 additions & 0 deletions doc/reference/configuration/configuration_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3220,6 +3220,26 @@ The ``lua`` section outlines the configuration parameters related to the Lua env
| Default: 2147483648 (2GB)
| Environment variable: TT_LUA_MEMORY

.. _configuration_reference_lua_call:

.. confval:: lua_call

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
the instance during runtime.

Via the ``lua_call`` option, one can grant permissions to the function to any user registered on the instance.

Note that the special option ``lua_call: [all]`` is also supported, granting access to all global Lua functions except built-in ones,
bypassing database restrictions.

After the instance is rebooted, permissions defined via the ``lua_call`` options are reset to the values stored in the database.

Example to grant custom function to the 'alice' user:

.. literalinclude:: /code_snippets/snippets/config/instances.enabled/lua_call/config.yaml
:language: yaml
:dedent:

.. _configuration_reference_memtx:

memtx
Expand Down