Re: exposing pg_controldata and pg_config as functions
От | Josh berkus |
---|---|
Тема | Re: exposing pg_controldata and pg_config as functions |
Дата | |
Msg-id | 56C50377.8030503@agliodbs.com обсуждение исходный текст |
Ответ на | exposing pg_controldata and pg_config as functions (Andrew Dunstan <andrew@dunslane.net>) |
Ответы |
Re: exposing pg_controldata and pg_config as functions
|
Список | pgsql-hackers |
On 02/17/2016 03:02 PM, Tom Lane wrote: > Joe Conway <mail@joeconway.com> writes: >> On 02/17/2016 02:14 PM, Tom Lane wrote: >>> I thought we'd agreed on requiring superuser access for this function. >>> I concur that letting just anyone see the config data is inappropriate. > >> It does not let anyone see config data out of the box: > >> + CREATE VIEW pg_config AS >> + SELECT * FROM pg_config(); >> + >> + REVOKE ALL on pg_config FROM PUBLIC; >> + REVOKE EXECUTE ON FUNCTION pg_config() FROM PUBLIC; > > Ah, that's fine. I'd looked for a superuser() check and not seen one, > but letting the SQL permissions system handle it seems good enough. What I like about this is that if I want to expose it to a non-superuser, I can just do a GRANT instead of needing to write a security definer view. -- -- Josh Berkus Red Hat OSAS (any opinions are my own)
В списке pgsql-hackers по дате отправления: