Configure Security and Permissions

These topics cover three layers of protection: controlling who can connect, controlling what they can do once connected, and protecting data at rest and in transit.

Authentication and passwords

Password Policies

Set client authentication methods in pg_hba.conf; passwords are stored encrypted with MD5 or SCRAM.

Configure Password Policies
Password Strength

Use the PasswordCheck plugin to reject weak passwords.

Check Password Security

Access control

Roles and Privileges

Control access through roles and privileges, administered with SQL statements or command-line tools.

Manage Roles and Privileges
pgAudit

Detailed session-level or object-level audit logging through the standard PostgreSQL logging facility.

Audit Logs with pgAudit

Protect data

pgcrypto

An encryption module protecting data at rest and in transit.

Encrypt Columns with pgcrypto
TDE

Transparent Data Encryption operates at the data file level, invisible to applications above.

Encrypt Data at Rest with TDE
Anon

An anonymization extension based on PostgreSQL Anonymizer, for sharing data with unauthorized parties.

Anonymize Data with Anon