Hands-on task
PostgreSQL: read-only user
PostgreSQL is already installed, but the server isn't running. Start it and configure: a database appdb, a table items inside it (any columns, at least one row) and a user reader with password readpass who can SELECT from items but cannot INSERT. The server must accept TCP connections on 127.0.0.1 — and right now TCP is turned off in its config.
The server config is /etc/postgresql/16/main/postgresql.conf — open it in the Editor tab.
- postgresql
- roles and grant
- least privilege
- pg_hba and tcp
- psql