ro_user: grant execute only on defined functions
GRANT EXECUTE ON ALL FUNCTIONS in SCHEMA public
is causing an error
on prod:
Traceback (most recent call last):
File "/home/appuser/app/src/AbstractHandler.py", line 101, in on_message
self.act(content, message)
File "/home/appuser/app/src/CreateThingInPostgresHandler.py", line 59, in act
self.grant_sta_select(thing, user_prefix=sta_prefix)
File "/home/appuser/app/src/CreateThingInPostgresHandler.py", line 227, in grant_sta_select
c.execute(
psycopg2.errors.InsufficientPrivilege: permission denied for function pg_stat_statements_reset
the grant on execution on all functions in public should be removed and replaced by only the functions from postgis that are needed (e.g. ST_AsGeoJSON
, ...)
Edited by Joost Hemmen