Skip to content

Adds description of `lua_call option specifics #5149

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

Open
wants to merge 2 commits into
base: latest
Choose a base branch
from

Conversation

AArdeev
Copy link
Contributor

@AArdeev AArdeev commented May 30, 2025

  • 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

* ``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
@AArdeev AArdeev requested review from Totktonada and mandesero May 30, 2025 12:44
@AArdeev AArdeev self-assigned this May 30, 2025
@AArdeev AArdeev added the 3.3 label May 30, 2025
@github-actions github-actions bot temporarily deployed to branch-gh-4552-runtime-access-to-lua-functions May 30, 2025 12:46 Destroyed
@github-actions github-actions bot temporarily deployed to branch-gh-4552-runtime-access-to-lua-functions May 30, 2025 12:53 Destroyed
@github-actions github-actions bot temporarily deployed to branch-gh-4552-runtime-access-to-lua-functions May 30, 2025 13:12 Destroyed
@github-actions github-actions bot temporarily deployed to branch-gh-4552-runtime-access-to-lua-functions May 30, 2025 13:58 Destroyed
Comment on lines +3223 to +3225
.. _configuration_reference_lua_call:

.. confval:: lua_call
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it on the top level? The deployment fails, so I can't check how it is rendered.

Comment on lines +3227 to +3228
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perform the Lua function? I guess you tell about granting a permission to call it, not about the call itself.

Comment on lines +3227 to +3228
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'During runtime' and 'in runtime' feels a bit different. The first is just 'when the instance is run', but 'in runtime' may mean 'without persistence'. Maybe the formal documentation should use less informal words.

Comment on lines +3232 to +3233
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imagine I've no needed context: it seems I have no chance to understand what does 'database restriction' mean.

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. We discussed that and it is correct to some extent. However, the permissions that are granted using lua_call via the YAML config are both runtime and persistent. It is possible that we have no RW instance at the moment and the permission is not persisted, right. But usually it is persisted and read from the data files after restart.

Don't know how to better formalize it.

@Totktonada
Copy link
Member

It seems, we should work together here to provide a correct formal description. It would be nice to give a concise, but easy to understand explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants