Y
Y
Yuri2019-11-08 09:40:21
PostgreSQL
Yuri, 2019-11-08 09:40:21

How to delimit data visibility in Postgresql tables?

There is a certain Postgresql system serving several client companies. Due to the specifics of the activity, customer data cannot be divided into different databases, schemas, tables (i.e., data from different customers are in the same tables). At the moment, the separation of access to data is implemented at the level of the client application. The client is given an application with its specific identifier, and it "does not show" other people's data, but the logins / passwords of users within the client company are different (necessary for auditing). If you connect using third-party software with these logins / passwords, you will have access to all data. Naturally, it’s hard to even call this a security hole, it’s just open data in the palm of your hand.
We need advice on how to distinguish between the visibility of data, and indeed on the architecture of such systems.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Melkij, 2019-11-08
@ploop

RLS is what you want to hear.
A separate service between the database and clients not controlled by you is what you need to do. The base in the world should not be open. DoS is done quite simply even without knowing the passwords, and even with access ...

R
Rsa97, 2019-11-08
@Rsa97

Move from direct access to the database to the client-server option. Then the client will see only what your server gives him.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question