-
Notifications
You must be signed in to change notification settings - Fork 35
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
Privileges for PostgreSQL procedures #655
Comments
Hi @kkrasnov1 , thanks for reaching. Can you share a sample procedure object, with ACL and owner ? Use |
DDLCREATE SCHEMA ldap2pg_test AUTHORIZATION xxx;
create or replace procedure ldap2pg_test.proc1()
language plpgsql
as $$
begin
commit;
end;$$;; psqlxxx=# \df+ ldap2pg_test.proc1
List of functions
-[ RECORD 1 ]-------+-------------
Schema | ldap2pg_test
Name | proc1
Result data type |
Argument data types |
Type | proc
Volatility | volatile
Parallel | unsafe
Owner | postgres
Security | invoker
Access privileges |
Language | plpgsql
Source code | +
| begin +
| +
| commit; +
| end;
Description | ldap2pg outputGE Revoke privilege. grant="EXECUTE ON ALL FUNCTIONS IN SCHEMA xxx.ldap2pg_test TO public" database=xxx
GE Grant privilege. grant="EXECUTE ON ALL FUNCTIONS IN SCHEMA xxx.ldap2pg_test TO db_pg_test_xxx_datawriter" database=xxx
GE Grant privilege. grant="EXECUTE ON ALL FUNCTIONS IN SCHEMA xxx.ldap2pg_test TO db_pg_test_xxx_owner" database=xxx
GE Grant privilege. grant="EXECUTE ON ALL FUNCTIONS IN SCHEMA xxx.ldap2pg_test TO db_pg_test_xxx_owner" database=xxx
|
Hi @bersace, |
You can manage EXECUTE on all functions with |
You can manage only privileges per schema. No finer granularity. |
Thank you. It works correctly. |
@bersace, every time I start, I get a message Am I doing something wrong or is it a bug in ldap2pg? |
ldap2pg.yml
Expectations
Hi,
We use procedures in PostgreSQL and builtin priviledge execute_on_functions. If there are procedures, ldap2pg constantly tries to grant privileges to all functions, but cannot.
If privileges for procedures are granted manually, then ldap2pg no longer tries to grant privileges for all functions.
ldap2pg probably correctly determines that there are not enough privileges for procedures, but tries to issue them for functions.
Verbose output of ldap2pg execution
Grant privilege. grant="EXECUTE ON ALL FUNCTIONS IN SCHEMA xxxx.schema1 TO owner_group" database=xxxx
The text was updated successfully, but these errors were encountered: