-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Evaluate alternatives for table lookups #292
Comments
What on earth would be the point of that? Encapsulating database access in functions is full on enterprise nonsense... |
I want to revoke SELECT permissions for the cgimap user on one particular table. With the database function in place, you need to provide the correct lookup value. Otherwise, you have no access to any of the table contents. |
Surely if you revoke select on the table (and why would you want to do that?) then the function will be no more able to read it than a direct select would. Plus you will need us to create functions on the master database for you! |
Ah I see that's the point of |
Yes, exactly, that's the point... the db function needs to be created outside of cgimap by another user, and could then be consumed by cgimap instead of directly reading from the table. |
What table exactly is it that you don't want to be able to read, except that you do because you're going to create a function to read it? Is the goal to limit what columns you can read or something? |
The idea was to limit access to oauth_access_tokens. This may seem a bit far fetched at first. However, since tokens are stored in a particular way, we should probably avoid uncontrolled read access that could happen due some programming mistake, or something similar. |
Evaluate if PostgreSQL CREATE FUNCTION could be used for table lookups.
https://www.postgresql.org/docs/current/sql-createfunction.html
(...)
The text was updated successfully, but these errors were encountered: