Module9_Database_Security Flashcards
what are the 3 levels of security?
Host based authenticatie through pg_hba.conf
Database user credentials
object credentials (grants/revokes)
how to accept only ssl connections in PG?
change the host type in pg_hba.conf to HOSTSSL
What is the purpose of setting listen_address in postgresql.conf
listen_addresses controls what network interfaces PostgreSQL can accept connections on, not what clients can connect to PostgreSQL.
why does someone implement row Level Secuity (RLS)?
So some users can only see some rows of the tables and not ALL rows of that table.
how to make use of Row level security?
First you enable RLS for that table:
Alter table TABLENAME ENABLE ROW LEVEL SECURITY;
Then you create a policy who to acces it because by default no one can see any data.
create policy POLICYNAME on TABLENAME USING (user=current_user);