supautils

Extension that secures a cluster on a cloud environment

Overview

PackageVersionCategoryLicenseLanguage
supautils3.1.0SECApache-2.0C
IDExtensionBinLibLoadCreateTrustRelocSchema
7010supautilsNoYesYesNoNoNo-
Relatedpasswordcheck_cracklib pgsodium supabase_vault pg_session_jwt anon pg_tde pgsmcrypto pgaudit

Version

TypeRepoVersionPG VerPackageDeps
EXTPIGSTY3.1.01817161514supautils-
RPMPIGSTY3.1.01817161514supautils_$v-
DEBPIGSTY3.1.01817161514postgresql-$v-supautils-
OS / PGPG18PG17PG16PG15PG14
el8.x86_64
el8.aarch64
el9.x86_64
el9.aarch64
el10.x86_64
el10.aarch64
d12.x86_64
d12.aarch64
d13.x86_64
PIGSTY 3.1.0
PIGSTY 3.1.0
PIGSTY 3.1.0
PIGSTY 3.1.0
PIGSTY 3.1.0
d13.aarch64
PIGSTY 3.1.0
PIGSTY 3.1.0
PIGSTY 3.1.0
PIGSTY 3.1.0
PIGSTY 3.1.0
u22.x86_64
PIGSTY 3.1.0
PIGSTY 3.1.0
PIGSTY 3.1.0
PIGSTY 3.1.0
PIGSTY 3.1.0
u22.aarch64
PIGSTY 3.1.0
PIGSTY 3.1.0
PIGSTY 3.1.0
PIGSTY 3.1.0
PIGSTY 3.1.0
u24.x86_64
PIGSTY 3.1.0
PIGSTY 3.1.0
PIGSTY 3.1.0
PIGSTY 3.1.0
PIGSTY 3.1.0
u24.aarch64
PIGSTY 3.1.0
PIGSTY 3.1.0
PIGSTY 3.1.0
PIGSTY 3.1.0
PIGSTY 3.1.0

Build

You can build the RPM / DEB packages for supautils using pig build:

pig build pkg supautils         # build RPM / DEB packages

Install

You can install supautils directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:

pig repo add pgsql -u          # Add repo and update cache

Install the extension using pig or apt/yum/dnf:

pig install supautils;          # Install for current active PG version
pig ext install -y supautils -v 18  # PG 18
pig ext install -y supautils -v 17  # PG 17
pig ext install -y supautils -v 16  # PG 16
pig ext install -y supautils -v 15  # PG 15
pig ext install -y supautils -v 14  # PG 14
dnf install -y supautils_18       # PG 18
dnf install -y supautils_17       # PG 17
dnf install -y supautils_16       # PG 16
dnf install -y supautils_15       # PG 15
dnf install -y supautils_14       # PG 14
apt install -y postgresql-18-supautils   # PG 18
apt install -y postgresql-17-supautils   # PG 17
apt install -y postgresql-16-supautils   # PG 16
apt install -y postgresql-15-supautils   # PG 15
apt install -y postgresql-14-supautils   # PG 14

Preload:

shared_preload_libraries = 'supautils';

Usage

supautils: Extension that secures a cluster on a cloud environment

supautils is a loadable library that securely allows creating event triggers, publications, and extensions for non-superusers. It is completely managed by configuration – no tables, functions, or security labels are added to your database.

Configuration

Add to postgresql.conf:

shared_preload_libraries = 'supautils'
supautils.privileged_role = 'your_privileged_role'

Or enable per-role:

ALTER ROLE role1 SET session_preload_libraries TO 'supautils';

Key GUC Parameters

ParameterDescription
supautils.privileged_roleProxy role for superuser operations
supautils.superuserThe actual superuser (defaults to bootstrap user)
supautils.privileged_extensionsExtensions allowed for non-superuser installation
supautils.privileged_role_allowed_configsSuperuser-only settings the privileged role may change
supautils.reserved_rolesRoles protected from mutation by CREATEROLE users
supautils.reserved_membershipsRole memberships restricted from being granted
supautils.constrained_extensionsJSON defining resource constraints for extensions
supautils.extensions_parameter_overridesJSON overriding CREATE EXTENSION parameters
supautils.policy_grantsJSON granting RLS policy management to non-owners
supautils.drop_trigger_grantsJSON granting trigger drop permission to non-owners

Non-Superuser Publications

SET ROLE privileged_role;
CREATE PUBLICATION p FOR ALL TABLES;
DROP PUBLICATION p;

Privileged Extensions

supautils.privileged_extensions = 'hstore'

Non-superusers can then create extensions that normally require superuser:

CREATE EXTENSION hstore;

Reserved Roles

supautils.reserved_roles = 'connector, storage_admin'

Users with CREATEROLE cannot ALTER or DROP these roles.

Table Ownership Bypass (RLS Policy Management)

supautils.policy_grants = '{ "my_role": ["public.not_my_table"] }'

Allows my_role to manage RLS policies on tables it does not own.


Last Modified 2026-03-12: add pg extension catalog (95749bf)