Skip to content

bug: insufficient privileges for sbroad's temp tables breaks legit sql queries

TLDR: select count(*) from table fails while select * from table works fine.

Repro:

$ picodata run -i
> \s l sql
> create user "borat" with password 'Password1'
> grant create table to "borat"

> \s l lua
> box.session.su('borat')

> \s l sql
> create table foo (i int not null, primary key(i)) distributed by (i);
> select * from foo;          # OK
> select count(*) from foo;   # FAIL!

Details:

picodata> select * from foo;
---
- metadata:
  - {'name': 'I', 'type': 'integer'}
  rows: []
...

picodata> select count(*) from foo;
---
- null
- 'sbroad: failed to create space: TMP_138fdc6c71644edf82d41e897e877fb1_7: box error:
  AccessDenied: Read access to space ''_space'' is denied for user ''borat'''
...
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information