feat: use different creds for api and consumer with restrictive rights
This commit is contained in:
parent
611600c2d8
commit
11b7c14dc7
7 changed files with 16 additions and 1 deletions
6
server/initdb/02_roles.sql
Normal file
6
server/initdb/02_roles.sql
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
CREATE USER simugaz_api WITH PASSWORD 'changeme';
|
||||
GRANT SELECT ON TABLE device, reading TO simugaz_api;
|
||||
|
||||
CREATE USER simugaz_consumer WITH PASSWORD 'changemetoo';
|
||||
GRANT SELECT, INSERT ON TABLE device TO simugaz_consumer;
|
||||
GRANT INSERT ON TABLE reading TO simugaz_consumer;
|
||||
Loading…
Add table
Add a link
Reference in a new issue