Roles, privileges & pg_hba
For PostgreSQL clusters the Database tab has a Roles & Grants view with role management, a privilege viewer and a pg_hba.conf editor. Every change is validated before it is applied, recorded in the change history and the audit log, and destructive changes go through approvals. In the console: Database tab (?tab=database) → Roles & Grants, with the sub-tabs Roles, pg_hba and history.
Roles
- Create and edit roles with login, create-database, create-role, inherit, connection limit, password and expiry (
VALID UNTIL). Passwords are never written to logs or the audit trail. - Membership: grant a role to another role (optionally with admin option) or revoke it. Circular membership is rejected.
- Lock / unlock: locking makes a role
NOLOGINand can end its open sessions; unlocking restores login. Useful for an incident without dropping the role. - Delete is destructive: it creates an approval request and nothing happens until an administrator approves it. On approval Jarwis drops the role's owned objects and then the role.
- Roles Jarwis itself depends on (
postgres,replicator, the admin account andjarwis_*roles) are marked protected; they cannot be locked, altered or dropped.
Privileges
Select a role to see what it can access across databases, schemas, tables, sequences and functions, then grant or revoke privileges per object. The view reads the live catalog, so it also reflects grants made outside Jarwis.
pg_hba.conf
The pg_hba sub-tab shows every rule in order — order matters in pg_hba.conf — with a parse status per line. You can add a rule (as raw text or by fields: type, databases, users, address, method, options), move it up or down, or delete it (delete needs approval).
Standalone & streaming
Jarwis edits the server's pg_hba.conf.
Patroni
The source of truth is Patroni's dynamic configuration (the postgresql.pg_hba key in the DCS). Jarwis writes the rules there, so all members stay identical and a failover never reverts a rule.
trust rules carry a warning badge. Rules are validated with pg_hba_file_rules before the reload and rolled back on error.Safe writes
Each change is backed up, written, checked against pg_hba_file_rules for errors, then reloaded and verified. If the file does not parse, or the change would lock out the admin, replication or Jarwis' own connections, it is rejected and rolled back automatically. A short Jarwis-managed block is protected and cannot be edited. Container clusters show the rules read-only.