Module9_Database_Security Flashcards

1
Q

what are the 3 levels of security?

A

Host based authenticatie through pg_hba.conf
Database user credentials
object credentials (grants/revokes)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

how to accept only ssl connections in PG?

A

change the host type in pg_hba.conf to HOSTSSL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the purpose of setting listen_address in postgresql.conf

A

listen_addresses controls what network interfaces PostgreSQL can accept connections on, not what clients can connect to PostgreSQL.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

why does someone implement row Level Secuity (RLS)?

A

So some users can only see some rows of the tables and not ALL rows of that table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

how to make use of Row level security?

A

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);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly