Spatial DB ownership issue

5 views
Skip to first unread message

shawncrawley

unread,
Jul 3, 2017, 2:56:33 PM7/3/17
to Tethys Platform
So with the new Tethys PersistentStoreSettings (which are great), there is a shortcoming that I'm trying to decide how to best address. Enabling the postgis extension on databases requires super user permissions. However, how should the case be implemented where you want the spatial extension, but you still want the database owned by a non-super user. I guess this raises the question of if ownership of the db really matters, or if the security concern would be introduced more based on which user is performing i/o operations on the db. I haven't actually done testing to see if a non-super user can read and write to a super-owned db without issue... If that is the case then maybe this isn't an issue. 

Anyway, my application, prior to Tethys 2.0, was programmed to create the database and add the spatial plugin with the superuser, and then change the ownership to the desired user. Would it maybe be useful to implement something similar in tethys core? Allow the user to pass a second db connection (i.e. a super user connection) that will be used to enable the spatial extension if it is desired that the db not be owned by that same user.

What are your thoughts?
Reply all
Reply to author
Forward
0 new messages