Skip to content
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

Does it seem to be possible to execute DDLs in Re:dash metadata? #1189

Closed
kitsuyui opened this issue Jul 15, 2016 · 2 comments
Closed

Does it seem to be possible to execute DDLs in Re:dash metadata? #1189

kitsuyui opened this issue Jul 15, 2016 · 2 comments

Comments

@kitsuyui
Copy link
Contributor

Issue Summary

It seems to be possible to create / delete tables in Re:dash metadata.

Steps to Reproduce

  1. Open "New Query"
  2. Write create/drop SQL

create table

It was created!

it is created

#### And also ...

deletable.

drop

Is it safe?
I think that non-administrator users also can do this.

DROP TABLE dashboards, DROP TABLE queries ...

Technical details:

  • Redash Version: v0.10.1.b1834, 0.11.0 - RC
  • Browser/OS: Google Chrome / OSX / Server: Ubuntu Linux 16.04 LTS
  • How did you install Redash: used setup/ubuntu/bootstrap.sh
@arikfr
Copy link
Member

arikfr commented Jul 15, 2016

It's good to remember that Redash allows whatever you allow the database user you supply it with.

In this case the redash_reader user can create new tables and delete tables it created, but it can't touch (delete) the metadata tables. That's apparently the default behavior in Postgres.

I don't mind changing the bootstrap script to prevent this though by basically adding the following:

revoke create on schema public from public;
grant create on schema public to redash;

@kitsuyui
Copy link
Contributor Author

@arikfr Oh! I see.
I'm relieved to hear that.

In this case the redash_reader user can create new tables and delete tables it created, but it can't touch (delete) the metadata tables. That's apparently the default behavior in Postgres.

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

No branches or pull requests

2 participants