tarantool / tarantool/doc

feedback: Access control | Tarantool

Open
#5,070 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

admin doc_gap
Dominant language
CSS
Stars
15
Forks
49
Avg merge
1d 13h
Merged PRs (30d)
3

Description

Product: Tarantool
Audience/target: admin
Root document: https://www.tarantool.io/en/doc/latest/admin/access_control/
SME: @ sergepetrenko

<…>ox.schema.user.grant('testuser', 'write', 'space', '_priv')

**|Executing code
To let testuser execute Lua code, grant the execute privilege to the lua_eval object:
box.schema.user.grant('testuser','execute','lua_eval')

Similarly, executing an arbitrary SQL expression requires the execute privilege to the sql object:
box.schema.user.grant('testuser','execute','sql')

|Example**
In the example below, the created Lua function is execut<…>

https://www.tarantool.io/en/doc/latest/admin/access_control/

Please mention explicitly that only 'admin' user can grant 'execute' privilege on 'lua_eval', 'lua_call', 'sql', 'universe'.

Generally speaking, any non-admin user, even the one having a 'super' privilege, cannot grant any privilege for an object that this user doesn't own. No one, except admin, "owns" 'lua_eval', 'lua_call', 'sql', 'universe' and so on.

This also means non-admin 'super' user cannot grant access to spaces (or functions or any other type of object) he hasn't created:

tarantool> _ = box.schema.space.create('test')
---
...

tarantool> box.schema.user.create('tester')
---
...

tarantool> box.schema.user.grant('tester', 'super')
---
...

tarantool> box.session.su('tester')
---
...

tarantool> box.schema.user.grant('guest', 'read', 'space', 'test')
---
- error: Grant access to space 'test' is denied for user 'tester'
...

tarantool> 

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the root document at https://www.tarantool.io/en/doc/latest/admin/access_control/ and find the sections covering execute privileges and the examples for lua_eval, lua_call, sql, and universe. Update the text to state that only the admin user can grant these privileges, and clarify the non-admin super-user example. Done means the access-control rules and example error behavior are documented accurately.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, sql
Domain
authorization, documentation, security
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.