Skip to content

Commit 6e9454e

Browse files
committed
Restrict metabase user to set of tables
* closes #1113 * configuration
1 parent ae784bd commit 6e9454e

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed
Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
CREATE USER ${METABASE_POSTGRES_USER} WITH PASSWORD '${METABASE_POSTGRES_PASSWORD}';
22

3-
-- relies on readonly role aldready existing in the database
4-
GRANT ${POSTGRES_DB}_readonly TO ${METABASE_POSTGRES_USER};
3+
/*
4+
Access to simcore database
5+
*/
6+
7+
GRANT CONNECT ON DATABASE ${POSTGRES_DB} TO ${METABASE_POSTGRES_USER};
8+
9+
-- https://stackoverflow.com/questions/17338621/what-does-grant-usage-on-schema-do-exactly
10+
GRANT USAGE ON SCHEMA public TO ${METABASE_POSTGRES_USER};
11+
12+
GRANT SELECT ON TABLE ${METABASE_POSTGRES_ALLOWED_SIMCORE_TABLES} TO ${METABASE_POSTGRES_USER};
13+
14+
/*
15+
Metabase database to store its data
16+
*/
517

618
CREATE DATABASE ${METABASE_POSTGRES_DB}
719
WITH OWNER ${METABASE_POSTGRES_USER};

0 commit comments

Comments
 (0)