From 7a542700df25eaf97b794bff63606176433dcdda Mon Sep 17 00:00:00 2001 From: Stephen Frost Date: Fri, 8 Apr 2016 16:56:27 -0400 Subject: Create default roles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This creates an initial set of default roles which administrators may use to grant access to, historically, superuser-only functions. Using these roles instead of granting superuser access reduces the number of superuser roles required for a system. Documention for each of the default roles has been added to user-manag.sgml. Bump catversion to 201604082, as we had a commit that bumped it to 201604081 and another that set it back to 201604071... Reviews by José Luis Tallón and Robert Haas --- doc/src/sgml/func.sgml | 8 ++++--- doc/src/sgml/user-manag.sgml | 51 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 3 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 88145c5b808..cb7fe38000b 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -17454,7 +17454,8 @@ SELECT set_config('log_statement_stats', 'off', false); boolean Cancel a backend's current query. This is also allowed if the - calling role is a member of the role whose backend is being canceled, + calling role is a member of the role whose backend is being canceled or + the calling role has been granted pg_signal_backend, however only superusers can cancel superuser backends. @@ -17478,8 +17479,9 @@ SELECT set_config('log_statement_stats', 'off', false); boolean Terminate a backend. This is also allowed if the calling role - is a member of the role whose backend is being terminated, however only - superusers can terminate superuser backends. + is a member of the role whose backend is being terminated or the + calling role has been granted pg_signal_backend, + however only superusers can terminate superuser backends. diff --git a/doc/src/sgml/user-manag.sgml b/doc/src/sgml/user-manag.sgml index d1b6e5990db..7eaefe58c2f 100644 --- a/doc/src/sgml/user-manag.sgml +++ b/doc/src/sgml/user-manag.sgml @@ -483,6 +483,57 @@ DROP ROLE doomed_role; + + Default Roles + + + role + + + + PostgreSQL provides a set of default roles + which provide access to certain, commonly needed, privileged capabilities + and information. Administrators can GRANT these roles to users and/or + other roles in their environment, providing those users with access to + the specified capabilities and information. + + + + The default roles are described in . + Note that the specific permissions for each of the default roles may + change in the future as additional capabilities are added. Administrators + should monitor the release notes for changes. + + + + Default Roles + + + + Role + Allowed Access + + + + + pg_signal_backend + Send signals to other backends (eg: cancel query, terminate). + + + +
+ + + Administrators can grant access to these roles to users using the GRANT + command: + + +GRANT pg_signal_backend TO admin_user; + + + +
+ Function and Trigger Security -- cgit v1.2.3