Skip to main content

17. User Management and Security

This module focuses on least-privilege access: creating roles, granting only what is required, and using row-level controls when needed.

Decision Guide

NeedPreferNotes
Separate app read/write permissionsroles + grantsUse distinct roles for readers and writers
Tenant isolationRow-level security (RLS)Enforced by the database
Hide base tablesviews + grantsGrant on views, restrict underlying tables
Secure authSCRAM + TLSConfigure in pg_hba.conf and server settings

Lessons

What's Next