Skip to content

Commit ad07f4f

Browse files
authored
Adds description of `lua_call option specifics (#5149)
* ``lua_call`` option allows granting users privileges to call specified lua function on the instance in runtime * ``lua_call: [all]`` grants access to all global Lua functions except built-in ones * Fixes 4552
1 parent 7814e54 commit ad07f4f

File tree

2 files changed

+17
-1
lines changed

2 files changed

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

doc/reference/configuration/configuration_reference.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1447,11 +1447,21 @@ credentials.users.*
14471447
.. confval:: <user_or_role_name>.privileges.lua_call
14481448

14491449
A list of global user-defined Lua functions that this user or a user with this role can call.
1450-
To allow calling all such functions, specify the ``all`` value.
1450+
To allow calling a specific function, specify its name as the value.
1451+
To allow calling all global Lua functions except built-in ones functions, specify the ``all`` value.
14511452

14521453
This option should be configured together with the ``execute``
14531454
:ref:`permission <configuration_reference_credentials_privileges_permissions>`.
14541455

1456+
Since version :doc:`3.3.0 </release/3.3.0>`, the ``lua_call`` option allows granting users privileges to call specified lua function on
1457+
the instance in runtime (thus it doesn't require an ability to write to the database).
1458+
1459+
Example to grant custom functions to the 'alice' user:
1460+
1461+
.. literalinclude:: /code_snippets/snippets/config/instances.enabled/lua_call/config.yaml
1462+
:language: yaml
1463+
:dedent:
1464+
14551465
.. _configuration_reference_credentials_privileges_sql:
14561466

14571467
.. confval:: <user_or_role_name>.privileges.sql

0 commit comments

Comments
 (0)