pgperms: Declarative / config as code for PostgreSQL permissions - Mailing list pgsql-admin

From Jille Timmermans
Subject pgperms: Declarative / config as code for PostgreSQL permissions
Date
Msg-id 94e773aa6934b303dfce44c0ee46c744@quis.cx
Whole thread Raw
List pgsql-admin
Hey all,

I wrote a tool that can manage PostgreSQL permissions from a config 
file. The config file describes your desired roles and grants and syncs 
them to your PostgreSQL cluster. This allows you to manage your 
permissions in Git, for example.

You can find detailed instructions and the binaries at 
https://github.com/SnoozeThis-org/pgperms.

Here's some example config to show its features:

> roles:
>   yourname:
>     password: SCRAM-SHA-256$4096:...
>     createdb: true
> databases:
> - mydatabase
> schemas:
> - mydatabase.myschema
> database_privileges:
> - roles: [yourname]
>   privileges: [CONNECT, TEMPORARY]
>   databases: [mydatabase]
> schema_privileges:
> - roles: [yourname]
>   privileges: [CREATE, USAGE]
>   schemas: [mydatabase.myschema]
> table_privileges:
> - roles: [yourname]
>   privileges: [SELECT, INSERT, UPDATE]
>   tables: [mydatabase.otherschema.*]

Let me know if you find any bugs or need any missing features. It'd be 
great to hear people find this useful :)

-- Jille
Development of pgperms is sponsored by SnoozeThis: a bot that can hold 
on to your blocked issues until they're actionable 
(https://www.snoozethis.com).



pgsql-admin by date:

Previous
From: Sbob
Date:
Subject: Failover / repmgr questions
Next
From: Jerry Sievers
Date:
Subject: Does raising maintenance_work_mem get seen by an already running aucovac?