feat: use different creds for api and consumer with restrictive rights

This commit is contained in:
Alexis Fourmaux 2026-05-13 18:25:23 +02:00
parent 611600c2d8
commit 11b7c14dc7
7 changed files with 16 additions and 1 deletions

View 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;